CVE-2024-39497
drm/shmem-helper: Fix BUG_ON() on mmap(PROT_WRITE, MAP_PRIVATE)
Check your servers for CVE-2024-39497
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2024-39497 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
In the Linux kernel, the following vulnerability has been resolved:
drm/shmem-helper: Fix BUG_ON() on mmap(PROT_WRITE, MAP_PRIVATE)
Lack of check for copy-on-write (COW) mapping in drm_gem_shmem_mmap allows users to call mmap with PROT_WRITE and MAP_PRIVATE flag causing a kernel panic due to BUG_ON in vmf_insert_pfn_prot: BUG_ON((vma->vm_flags & VM_PFNMAP) && is_cow_mapping(vma->vm_flags));
Return -EINVAL early if COW mapping is detected.
This bug affects all drm drivers using default shmem helpers. It can be reproduced by this simple example: void *ptr = mmap(0, size, PROT_WRITE, MAP_PRIVATE, fd, mmap_offset); ptr[0] = 0;
Exploitation
EPSS 0.27%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 21.3% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 10 Sep 2024):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- partial: limited control or limited data
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 2194a63a818db71065ebe09c8104f5f021ca4e7b, before a508a102edf8735adc9bb73d37dd13c38d1a1b10 affected from 2194a63a818db71065ebe09c8104f5f021ca4e7b, before 3ae63a8c1685e16958560ec08d30defdc5b9cca0 affected from 2194a63a818db71065ebe09c8104f5f021ca4e7b, before 2219e5f97244b79c276751a1167615b9714db1b0 affected from 2194a63a818db71065ebe09c8104f5f021ca4e7b, before 1b4a8b89bf6787090b56424d269bf84ba00c3263 affected from 2194a63a818db71065ebe09c8104f5f021ca4e7b, before 03c71c42809ef4b17f5d874cdb2d3bf40e847b86 affected from 2194a63a818db71065ebe09c8104f5f021ca4e7b, before 39bc27bd688066a63e56f7f64ad34fae03fbe3b8
Other versions: unaffected
|
| Linux |
affected 5.2 unaffected before 5.2 unaffected from 5.10.229 up to and including 5.10.* unaffected from 5.15.169 up to and including 5.15.* unaffected from 6.1.114 up to and including 6.1.* unaffected from 6.6.35 up to and including 6.6.* unaffected from 6.9.6 up to and including 6.9.* unaffected 6.10 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2024-39497 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2024-39497
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2024-39497
trivy image --scanners vuln IMAGE | grep CVE-2024-39497
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/a508a102edf8735adc9bb73d37dd13c38d1a1b10 git.kernel.org
- https://git.kernel.org/stable/c/3ae63a8c1685e16958560ec08d30defdc5b9cca0 git.kernel.org
- https://git.kernel.org/stable/c/2219e5f97244b79c276751a1167615b9714db1b0 git.kernel.org
- https://git.kernel.org/stable/c/1b4a8b89bf6787090b56424d269bf84ba00c3263 git.kernel.org
- https://git.kernel.org/stable/c/03c71c42809ef4b17f5d874cdb2d3bf40e847b86 git.kernel.org
- https://git.kernel.org/stable/c/39bc27bd688066a63e56f7f64ad34fae03fbe3b8 git.kernel.org
- https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html lists.debian.org
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html lists.debian.org
Source: the record CVE-2024-39497 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse