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

High 7.8 Published Updated
Exploited in the wild
Not known
Fix
Available

What is CVE-2024-46852?

CVE-2024-46852 is a high-severity vulnerability in Debian Debian Linux, published on 27 Sep 2024.

Official description

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.

Weakness: CWE-193

Which versions are affected by CVE-2024-46852?

It affects 2 products.

Products include Debian Debian Linux, Linux kernel.

How do I fix CVE-2024-46852?

Upgrade to a fixed version.

Is CVE-2024-46852 being exploited?

There is no known exploitation of CVE-2024-46852 in the wild and no public exploit code.

All Debian Debian Linux vulnerabilities

Sources

Also known as A-363259128, ASB-A-363259128, AZL-49809, AZL-49837, BELL-CVE-2024-46852, DEBIAN-CVE-2024-46852 and 2 more.

Is CVE-2024-46852 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free