CVE-2024-46852

Source
https://cve.org/CVERecord?id=CVE-2024-46852
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-46852.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-46852
Aliases
Downstream
Related
Published
2024-09-27T12:42:45.336Z
Modified
2026-03-20T12:37:58.041872Z
Summary
dma-buf: heaps: Fix off-by-one in CMA heap fault handler
Details

In the Linux kernel, the following vulnerability has been resolved:

dma-buf: heaps: Fix off-by-one in CMA heap fault handler

Until VMDONTEXPAND 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 dmabufmmapinternal. 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.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/46xxx/CVE-2024-46852.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
a5d2d29e24be8967ef78a1b1fb2292413e3b3df9
Fixed
79cce5e81d20fa9ad553be439d665ac3302d3c95
Fixed
84175dc5b2c932266a50c04e5ce342c30f817a2f
Fixed
eb7fc8b65cea22f9038c52398c8b22849e9620ea
Fixed
e79050882b857c37634baedbdcf7c2047c24cbff
Fixed
ea5ff5d351b520524019f7ff7f9ce418de2dad87

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-46852.json"