CVE-2024-46852 (GCVE-0-2024-46852)
Vulnerability from cvelistv5
Published
2024-09-27 12:42
Modified
2026-08-05 11:39
Summary
In the Linux kernel, the following vulnerability has been resolved: dma-buf: heaps: Fix off-by-one in CMA heap fault handler Until VM_DONTEXPAND was added in commit 1c1914d6e8c6 ("dma-buf: heaps: Don't track CMA dma-buf pages under RssFile") it was possible to obtain a mapping larger than the buffer size via mremap and bypass the overflow check in dma_buf_mmap_internal. When using such a mapping to attempt to fault past the end of the buffer, the CMA heap fault handler also checks the fault offset against the buffer size, but gets the boundary wrong by 1. Fix the boundary check so that we don't read off the end of the pages array and insert an arbitrary page in the mapping.
Impacted products
Vendor Product Version
Linux Linux Version: a5d2d29e24be8967ef78a1b1fb2292413e3b3df9
Version: a5d2d29e24be8967ef78a1b1fb2292413e3b3df9
Version: a5d2d29e24be8967ef78a1b1fb2292413e3b3df9
Version: a5d2d29e24be8967ef78a1b1fb2292413e3b3df9
Version: a5d2d29e24be8967ef78a1b1fb2292413e3b3df9
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-46852",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "total"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2025-03-14T00:00:00+00:00",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2025-03-15T03:55:23.131Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      },
      {
        "providerMetadata": {
          "dateUpdated": "2025-11-03T22:19:37.416Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "url": "https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/dma-buf/heaps/cma_heap.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "79cce5e81d20fa9ad553be439d665ac3302d3c95",
              "status": "affected",
              "version": "a5d2d29e24be8967ef78a1b1fb2292413e3b3df9",
              "versionType": "git"
            },
            {
              "lessThan": "84175dc5b2c932266a50c04e5ce342c30f817a2f",
              "status": "affected",
              "version": "a5d2d29e24be8967ef78a1b1fb2292413e3b3df9",
              "versionType": "git"
            },
            {
              "lessThan": "eb7fc8b65cea22f9038c52398c8b22849e9620ea",
              "status": "affected",
              "version": "a5d2d29e24be8967ef78a1b1fb2292413e3b3df9",
              "versionType": "git"
            },
            {
              "lessThan": "e79050882b857c37634baedbdcf7c2047c24cbff",
              "status": "affected",
              "version": "a5d2d29e24be8967ef78a1b1fb2292413e3b3df9",
              "versionType": "git"
            },
            {
              "lessThan": "ea5ff5d351b520524019f7ff7f9ce418de2dad87",
              "status": "affected",
              "version": "a5d2d29e24be8967ef78a1b1fb2292413e3b3df9",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/dma-buf/heaps/cma_heap.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.11"
            },
            {
              "lessThan": "5.11",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.168",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.111",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.52",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.10.*",
              "status": "unaffected",
              "version": "6.10.11",
              "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": "5.15.168",
                  "versionStartIncluding": "5.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.111",
                  "versionStartIncluding": "5.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.52",
                  "versionStartIncluding": "5.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.10.11",
                  "versionStartIncluding": "5.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.11",
                  "versionStartIncluding": "5.11",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ndma-buf: heaps: Fix off-by-one in CMA heap fault handler\n\nUntil VM_DONTEXPAND was added in commit 1c1914d6e8c6 (\"dma-buf: heaps:\nDon\u0027t track CMA dma-buf pages under RssFile\") it was possible to obtain\na mapping larger than the buffer size via mremap and bypass the overflow\ncheck in dma_buf_mmap_internal. When using such a mapping to attempt to\nfault past the end of the buffer, the CMA heap fault handler also checks\nthe fault offset against the buffer size, but gets the boundary wrong by\n1. Fix the boundary check so that we don\u0027t read off the end of the pages\narray and insert an arbitrary page in the mapping."
        }
      ],
      "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 - Exploitation requires local access to the `/dev/dma_heap/\u003ccma-heap\u003e` character device, an ioctl to allocate the buffer, and mmap/mremap/page-fault activity from a local process. No network or physical component is involved.\nAC:L - The off-by-one is deterministic \u2014 allocate a buffer, mmap it at full size, grow it with mremap (unblocked before v6.8), then touch the page at offset `pagecount`. Buffer size is attacker-chosen, so the slab layout used to control the adjacent `struct page *` can be groomed reliably.\nPR:L - No capability check exists anywhere on the path (`dma_heap_open`/`dma_heap_ioctl_allocate`/`cma_heap_allocate`); only DAC permission on the heap device node is needed, which on the dominant deployment for CMA heaps (Android/embedded ARM) is granted to ordinary unprivileged app and media processes.\nUI:N - The attacking process performs every step itself \u2014 open, ioctl, mmap, mremap, memory access. No victim action or cooperation is required.\nS:U - The corruption and the resulting privilege gain are entirely within the kernel\u0027s own security authority; no VM, IOMMU, or hypervisor boundary is crossed.\nC:H - Beyond the 8-byte out-of-bounds slab read, the handler installs the forged `struct page` into the faulting process\u0027s page tables, giving userspace a direct read mapping of an arbitrary physical page \u2014 arbitrary kernel and cross-process memory disclosure.\nI:H - The VMA is `MAP_SHARED` with no `page_mkwrite`, so `finish_fault()` installs a writable PTE for the arbitrary page, yielding an arbitrary physical-memory write; `get_page()` additionally increments a refcount at an attacker-influenced address. Both are readily leveraged into control-flow hijack and root.\nA:H - Dereferencing an out-of-bounds `struct page *` and inserting a bogus PFN into a mapping causes oops/panic and refcount corruption of unrelated pages, and the attacker can repeat it at will."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T11:39:01.066Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/79cce5e81d20fa9ad553be439d665ac3302d3c95"
        },
        {
          "url": "https://git.kernel.org/stable/c/84175dc5b2c932266a50c04e5ce342c30f817a2f"
        },
        {
          "url": "https://git.kernel.org/stable/c/eb7fc8b65cea22f9038c52398c8b22849e9620ea"
        },
        {
          "url": "https://git.kernel.org/stable/c/e79050882b857c37634baedbdcf7c2047c24cbff"
        },
        {
          "url": "https://git.kernel.org/stable/c/ea5ff5d351b520524019f7ff7f9ce418de2dad87"
        }
      ],
      "title": "dma-buf: heaps: Fix off-by-one in CMA heap fault handler",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-46852",
    "datePublished": "2024-09-27T12:42:45.336Z",
    "dateReserved": "2024-09-11T15:12:18.290Z",
    "dateUpdated": "2026-08-05T11:39:01.066Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CVE Program Container\", \"references\": [{\"url\": \"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html\"}], \"providerMetadata\": {\"orgId\": \"af854a3a-2127-422b-91ae-364da2661108\", \"shortName\": \"CVE\", \"dateUpdated\": \"2025-11-03T22:19:37.416Z\"}}, {\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2024-46852\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-09-29T13:58:24.461645Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-09-29T13:58:25.529Z\"}}], \"cna\": {\"title\": \"dma-buf: heaps: Fix off-by-one in CMA heap fault handler\", \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"a5d2d29e24be8967ef78a1b1fb2292413e3b3df9\", \"lessThan\": \"79cce5e81d20fa9ad553be439d665ac3302d3c95\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"a5d2d29e24be8967ef78a1b1fb2292413e3b3df9\", \"lessThan\": \"84175dc5b2c932266a50c04e5ce342c30f817a2f\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"a5d2d29e24be8967ef78a1b1fb2292413e3b3df9\", \"lessThan\": \"eb7fc8b65cea22f9038c52398c8b22849e9620ea\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"a5d2d29e24be8967ef78a1b1fb2292413e3b3df9\", \"lessThan\": \"e79050882b857c37634baedbdcf7c2047c24cbff\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"a5d2d29e24be8967ef78a1b1fb2292413e3b3df9\", \"lessThan\": \"ea5ff5d351b520524019f7ff7f9ce418de2dad87\", \"versionType\": \"git\"}], \"programFiles\": [\"drivers/dma-buf/heaps/cma_heap.c\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"5.11\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"5.11\", \"versionType\": \"semver\"}, {\"status\": \"unaffected\", \"version\": \"5.15.168\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"5.15.*\"}, {\"status\": \"unaffected\", \"version\": \"6.1.111\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.1.*\"}, {\"status\": \"unaffected\", \"version\": \"6.6.52\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.6.*\"}, {\"status\": \"unaffected\", \"version\": \"6.10.11\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.10.*\"}, {\"status\": \"unaffected\", \"version\": \"6.11\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"drivers/dma-buf/heaps/cma_heap.c\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/79cce5e81d20fa9ad553be439d665ac3302d3c95\"}, {\"url\": \"https://git.kernel.org/stable/c/84175dc5b2c932266a50c04e5ce342c30f817a2f\"}, {\"url\": \"https://git.kernel.org/stable/c/eb7fc8b65cea22f9038c52398c8b22849e9620ea\"}, {\"url\": \"https://git.kernel.org/stable/c/e79050882b857c37634baedbdcf7c2047c24cbff\"}, {\"url\": \"https://git.kernel.org/stable/c/ea5ff5d351b520524019f7ff7f9ce418de2dad87\"}], \"x_generator\": {\"engine\": \"bippy-1.2.0\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\ndma-buf: heaps: Fix off-by-one in CMA heap fault handler\\n\\nUntil VM_DONTEXPAND was added in commit 1c1914d6e8c6 (\\\"dma-buf: heaps:\\nDon\u0027t track CMA dma-buf pages under RssFile\\\") it was possible to obtain\\na mapping larger than the buffer size via mremap and bypass the overflow\\ncheck in dma_buf_mmap_internal. When using such a mapping to attempt to\\nfault past the end of the buffer, the CMA heap fault handler also checks\\nthe fault offset against the buffer size, but gets the boundary wrong by\\n1. Fix the boundary check so that we don\u0027t read off the end of the pages\\narray and insert an arbitrary page in the mapping.\"}], \"cpeApplicability\": [{\"nodes\": [{\"negate\": false, \"cpeMatch\": [{\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"5.15.168\", \"versionStartIncluding\": \"5.11\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.1.111\", \"versionStartIncluding\": \"5.11\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.6.52\", \"versionStartIncluding\": \"5.11\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.10.11\", \"versionStartIncluding\": \"5.11\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.11\", \"versionStartIncluding\": \"5.11\"}], \"operator\": \"OR\"}]}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2026-05-11T20:37:47.803Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2024-46852\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2026-05-11T20:37:47.803Z\", \"dateReserved\": \"2024-09-11T15:12:18.290Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2024-09-27T12:42:45.336Z\", \"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…