CVE-2024-46741 (GCVE-0-2024-46741)
Vulnerability from cvelistv5
Published
2024-09-18 07:12
Modified
2026-08-27 12:39
Summary
In the Linux kernel, the following vulnerability has been resolved: misc: fastrpc: Fix double free of 'buf' in error path smatch warning: drivers/misc/fastrpc.c:1926 fastrpc_req_mmap() error: double free of 'buf' In fastrpc_req_mmap() error path, the fastrpc buffer is freed in fastrpc_req_munmap_impl() if unmap is successful. But in the end, there is an unconditional call to fastrpc_buf_free(). So the above case triggers the double free of fastrpc buf.
Impacted products
Vendor Product Version
Linux Linux Version: 13327ed95222e70fa98805382b65636b872d87cb
Version: 72fa6f7820c4cf96c5f7aabc4e54bdf52d1e2ac2
Version: 72fa6f7820c4cf96c5f7aabc4e54bdf52d1e2ac2
Version: 72fa6f7820c4cf96c5f7aabc4e54bdf52d1e2ac2
Version: 911737ad0c860251f640a05feb75f9dc7e41f0d7
Version: b10e064ca0f708c4b4401ac5eab0f76cf7cec93d
Version: 5.10.267   
Version: 5.15.218   
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-46741",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-09-29T14:50:16.910976Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-09-29T14:50:31.769Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/misc/fastrpc.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "4753cc37b6606ef9a7ec22861d380d45e2707f9a",
              "status": "affected",
              "version": "13327ed95222e70fa98805382b65636b872d87cb",
              "versionType": "git"
            },
            {
              "lessThan": "f77dc8a75859e559f3238a6d906206259227985e",
              "status": "affected",
              "version": "72fa6f7820c4cf96c5f7aabc4e54bdf52d1e2ac2",
              "versionType": "git"
            },
            {
              "lessThan": "bfc1704d909dc9911a558b1a5833d3d61a43a1f2",
              "status": "affected",
              "version": "72fa6f7820c4cf96c5f7aabc4e54bdf52d1e2ac2",
              "versionType": "git"
            },
            {
              "lessThan": "e8c276d4dc0e19ee48385f74426aebc855b49aaf",
              "status": "affected",
              "version": "72fa6f7820c4cf96c5f7aabc4e54bdf52d1e2ac2",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "911737ad0c860251f640a05feb75f9dc7e41f0d7",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "b10e064ca0f708c4b4401ac5eab0f76cf7cec93d",
              "versionType": "git"
            },
            {
              "lessThan": "5.11",
              "status": "affected",
              "version": "5.10.267",
              "versionType": "semver"
            },
            {
              "lessThan": "5.16",
              "status": "affected",
              "version": "5.15.218",
              "versionType": "semver"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/misc/fastrpc.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.2"
            },
            {
              "lessThan": "6.2",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.51",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.10.*",
              "status": "unaffected",
              "version": "6.10.10",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.11",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.51",
                  "versionStartIncluding": "6.2",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.10.10",
                  "versionStartIncluding": "6.2",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.11",
                  "versionStartIncluding": "6.2",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionStartIncluding": "5.10.267",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionStartIncluding": "5.15.218",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nmisc: fastrpc: Fix double free of \u0027buf\u0027 in error path\n\nsmatch warning:\ndrivers/misc/fastrpc.c:1926 fastrpc_req_mmap() error: double free of \u0027buf\u0027\n\nIn fastrpc_req_mmap() error path, the fastrpc buffer is freed in\nfastrpc_req_munmap_impl() if unmap is successful.\n\nBut in the end, there is an unconditional call to fastrpc_buf_free().\nSo the above case triggers the double free of fastrpc buf."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The vulnerable code is reached only via `ioctl(FASTRPC_IOCTL_MMAP)` on the `/dev/fastrpc-*` misc device node, requiring local access to the system. No network or remote peer input reaches this path.\nAC:L - The attacker deterministically forces the error path by passing a read-only user mapping as `argp`, so `copy_from_user()` succeeds but the final `copy_to_user()` returns `-EFAULT`, and the subsequent DSP munmap of the just-mapped buffer always succeeds \u2014 no race or uncontrolled condition is involved.\nPR:L - The fastrpc driver contains no `capable()` or `CAP_*` checks on any path to `fastrpc_req_mmap()`; any local user able to open the fastrpc device node (routinely granted to unprivileged applications on Qualcomm Android/embedded/laptop systems) can trigger it.\nUI:N - The attacking process performs the entire sequence itself with two ioctls and its own memory mapping; no action by another user or victim is required.\nS:U - The corruption is confined to the kernel\u0027s own slab and DMA/CMA allocators within the same security authority; there is no VM, IOMMU, or sandbox boundary crossed.\nC:H - The second `fastrpc_buf_free()` reads `buf-\u003edev/size/virt/phys` from freed slab memory, and the duplicated `dma_free_coherent()` releases pages that remain mappable to userspace via this driver\u0027s dma-buf `.mmap`, allowing an attacker-mapped page to be re-issued to another kernel consumer and read \u2014 an arbitrary kernel-memory disclosure primitive.\nI:H - A same-object double free poisons the SLUB freelist so the same chunk is handed out to two owners, yielding overlapping-object heap corruption and, together with the still-mapped doubly-freed DMA pages, an arbitrary kernel write suitable for privilege escalation.\nA:H - Even without successful exploitation the double free corrupts the slab and page allocators, and on kernels with SLUB debugging or freelist hardening it trips an immediate BUG, causing a kernel panic that any local user can trigger at will."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-27T12:39:34.666Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/4753cc37b6606ef9a7ec22861d380d45e2707f9a"
        },
        {
          "url": "https://git.kernel.org/stable/c/f77dc8a75859e559f3238a6d906206259227985e"
        },
        {
          "url": "https://git.kernel.org/stable/c/bfc1704d909dc9911a558b1a5833d3d61a43a1f2"
        },
        {
          "url": "https://git.kernel.org/stable/c/e8c276d4dc0e19ee48385f74426aebc855b49aaf"
        }
      ],
      "title": "misc: fastrpc: Fix double free of \u0027buf\u0027 in error path",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-46741",
    "datePublished": "2024-09-18T07:12:02.496Z",
    "dateReserved": "2024-09-11T15:12:18.263Z",
    "dateUpdated": "2026-08-27T12:39:34.666Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2024-46741\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-09-29T14:50:16.910976Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-09-29T14:50:21.013Z\"}}], \"cna\": {\"title\": \"misc: fastrpc: Fix double free of \u0027buf\u0027 in error path\", \"metrics\": [{\"cvssV3_1\": {\"version\": \"3.1\", \"baseScore\": 7.8, \"baseSeverity\": \"HIGH\", \"vectorString\": \"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\"}, \"scenarios\": [{\"lang\": \"en\", \"value\": \"AV:L - The vulnerable code is reached only via `ioctl(FASTRPC_IOCTL_MMAP)` on the `/dev/fastrpc-*` misc device node, requiring local access to the system. No network or remote peer input reaches this path.\\nAC:L - The attacker deterministically forces the error path by passing a read-only user mapping as `argp`, so `copy_from_user()` succeeds but the final `copy_to_user()` returns `-EFAULT`, and the subsequent DSP munmap of the just-mapped buffer always succeeds \\u2014 no race or uncontrolled condition is involved.\\nPR:L - The fastrpc driver contains no `capable()` or `CAP_*` checks on any path to `fastrpc_req_mmap()`; any local user able to open the fastrpc device node (routinely granted to unprivileged applications on Qualcomm Android/embedded/laptop systems) can trigger it.\\nUI:N - The attacking process performs the entire sequence itself with two ioctls and its own memory mapping; no action by another user or victim is required.\\nS:U - The corruption is confined to the kernel\u0027s own slab and DMA/CMA allocators within the same security authority; there is no VM, IOMMU, or sandbox boundary crossed.\\nC:H - The second `fastrpc_buf_free()` reads `buf-\u003edev/size/virt/phys` from freed slab memory, and the duplicated `dma_free_coherent()` releases pages that remain mappable to userspace via this driver\u0027s dma-buf `.mmap`, allowing an attacker-mapped page to be re-issued to another kernel consumer and read \\u2014 an arbitrary kernel-memory disclosure primitive.\\nI:H - A same-object double free poisons the SLUB freelist so the same chunk is handed out to two owners, yielding overlapping-object heap corruption and, together with the still-mapped doubly-freed DMA pages, an arbitrary kernel write suitable for privilege escalation.\\nA:H - Even without successful exploitation the double free corrupts the slab and page allocators, and on kernels with SLUB debugging or freelist hardening it trips an immediate BUG, causing a kernel panic that any local user can trigger at will.\"}]}], \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"13327ed95222e70fa98805382b65636b872d87cb\", \"lessThan\": \"4753cc37b6606ef9a7ec22861d380d45e2707f9a\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"72fa6f7820c4cf96c5f7aabc4e54bdf52d1e2ac2\", \"lessThan\": \"f77dc8a75859e559f3238a6d906206259227985e\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"72fa6f7820c4cf96c5f7aabc4e54bdf52d1e2ac2\", \"lessThan\": \"bfc1704d909dc9911a558b1a5833d3d61a43a1f2\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"72fa6f7820c4cf96c5f7aabc4e54bdf52d1e2ac2\", \"lessThan\": \"e8c276d4dc0e19ee48385f74426aebc855b49aaf\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"911737ad0c860251f640a05feb75f9dc7e41f0d7\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"b10e064ca0f708c4b4401ac5eab0f76cf7cec93d\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"5.10.267\", \"lessThan\": \"5.11\", \"versionType\": \"semver\"}, {\"status\": \"affected\", \"version\": \"5.15.218\", \"lessThan\": \"5.16\", \"versionType\": \"semver\"}], \"programFiles\": [\"drivers/misc/fastrpc.c\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"6.2\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"6.2\", \"versionType\": \"semver\"}, {\"status\": \"unaffected\", \"version\": \"6.6.51\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.6.*\"}, {\"status\": \"unaffected\", \"version\": \"6.10.10\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.10.*\"}, {\"status\": \"unaffected\", \"version\": \"6.11\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"drivers/misc/fastrpc.c\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/4753cc37b6606ef9a7ec22861d380d45e2707f9a\"}, {\"url\": \"https://git.kernel.org/stable/c/f77dc8a75859e559f3238a6d906206259227985e\"}, {\"url\": \"https://git.kernel.org/stable/c/bfc1704d909dc9911a558b1a5833d3d61a43a1f2\"}, {\"url\": \"https://git.kernel.org/stable/c/e8c276d4dc0e19ee48385f74426aebc855b49aaf\"}], \"x_generator\": {\"engine\": \"bippy-1.2.0\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\nmisc: fastrpc: Fix double free of \u0027buf\u0027 in error path\\n\\nsmatch warning:\\ndrivers/misc/fastrpc.c:1926 fastrpc_req_mmap() error: double free of \u0027buf\u0027\\n\\nIn fastrpc_req_mmap() error path, the fastrpc buffer is freed in\\nfastrpc_req_munmap_impl() if unmap is successful.\\n\\nBut in the end, there is an unconditional call to fastrpc_buf_free().\\nSo the above case triggers the double free of fastrpc buf.\"}], \"cpeApplicability\": [{\"nodes\": [{\"negate\": false, \"cpeMatch\": [{\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.6.51\", \"versionStartIncluding\": \"6.2\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.10.10\", \"versionStartIncluding\": \"6.2\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.11\", \"versionStartIncluding\": \"6.2\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionStartIncluding\": \"5.10.267\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionStartIncluding\": \"5.15.218\"}], \"operator\": \"OR\"}]}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2026-08-27T12:39:34.666Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2024-46741\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2026-08-27T12:39:34.666Z\", \"dateReserved\": \"2024-09-11T15:12:18.263Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2024-09-18T07:12:02.496Z\", \"assignerShortName\": \"Linux\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…