CVE-2024-39497
drm/shmem-helper: Fix BUG_ON() on mmap(PROT_WRITE, MAP_PRIVATE)
Mitigation
- Upgrade Linux to 39bc27bd688066a63e56f7f64ad34fae03fbe3b8 or later.
Who should check
- Anyone running Linux >= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < a508a102edf8735adc9bb73d37dd13c38d1a1b10; >= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < 3ae63a8c1685e16958560ec08d30defdc5b9cca0; >= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < 2219e5f97244b79c276751a1167615b9714db1b0; >= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < 1b4a8b89bf6787090b56424d269bf84ba00c3263; >= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < 03c71c42809ef4b17f5d874cdb2d3bf40e847b86; >= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < 39bc27bd688066a63e56f7f64ad34fae03fbe3b8
- Anyone running Linux 5.2
Vulnerability facts
- Affected
- Linux >= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < a508a102edf8735adc9bb73d37dd13c38d1a1b10; >= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < 3ae63a8c1685e16958560ec08d30defdc5b9cca0; >= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < 2219e5f97244b79c276751a1167615b9714db1b0; >= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < 1b4a8b89bf6787090b56424d269bf84ba00c3263; >= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < 03c71c42809ef4b17f5d874cdb2d3bf40e847b86; >= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < 39bc27bd688066a63e56f7f64ad34fae03fbe3b8; Linux 5.2
- Fixed in
- Linux 3ae63a8c1685e16958560ec08d30defdc5b9cca0, Linux 2219e5f97244b79c276751a1167615b9714db1b0, Linux 1b4a8b89bf6787090b56424d269bf84ba00c3263, Linux 03c71c42809ef4b17f5d874cdb2d3bf40e847b86, Linux 39bc27bd688066a63e56f7f64ad34fae03fbe3b8
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 5.5 (v3.1, NVD)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: None
- Integrity impact: None
- Availability impact: High
- EPSS
- 0.31% chance of exploitation in 30 days (percentile 16, 2026-11-26)
- CWE
- CWE-617
- Modified
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;
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < a508a102edf8735adc9bb73d37dd13c38d1a1b10; >= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < 3ae63a8c1685e16958560ec08d30defdc5b9cca0; >= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < 2219e5f97244b79c276751a1167615b9714db1b0; >= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < 1b4a8b89bf6787090b56424d269bf84ba00c3263; >= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < 03c71c42809ef4b17f5d874cdb2d3bf40e847b86; >= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < 39bc27bd688066a63e56f7f64ad34fae03fbe3b8 | — | cvelist |
| Linux | 5.2 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2024-39497. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2024-39497.md Affected: Linux >= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < a508a102edf8735adc9bb73d37dd13c38d1a1b10; >= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < 3ae63a8c1685e16958560ec08d30defdc5b9cca0; >= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < 2219e5f97244b79c276751a1167615b9714db1b0; >= 2194a63a818db71065ebe09… Fixed in: Linux 3ae63a8c1685e16958560ec08d30defdc5b9cca0, Linux 2219e5f97244b79c276751a1167615b9714db1b0, Linux 1b4a8b89bf6787090b56424d269bf84ba00c3263, Linux 03c71c42809ef4b17f5d874cdb2d3bf40e847b86, Linux 39bc27bd688066a63e56f7f64ad34fae03fbe3b8 Steps: 1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Patches
- https://git.kernel.org/stable/c/a508a102edf8735adc9bb73d37dd13c38d1a1b10
- https://git.kernel.org/stable/c/3ae63a8c1685e16958560ec08d30defdc5b9cca0
- https://git.kernel.org/stable/c/2219e5f97244b79c276751a1167615b9714db1b0
- https://git.kernel.org/stable/c/1b4a8b89bf6787090b56424d269bf84ba00c3263
- https://git.kernel.org/stable/c/03c71c42809ef4b17f5d874cdb2d3bf40e847b86
- https://git.kernel.org/stable/c/39bc27bd688066a63e56f7f64ad34fae03fbe3b8
FAQ
Is CVE-2024-39497 being exploited?
There is no confirmed exploitation: CVE-2024-39497 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.31% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2024-39497?
Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2024-39497?
Linux >= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < a508a102edf8735adc9bb73d37dd13c38d1a1b10; >= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < 3ae63a8c1685e16958560ec08d30defdc5b9cca0; >= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < 2219e5f97244b79c276751a1167615b9714db1b0; >= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < 1b4a8b89bf6787090b56424d269bf84ba00c3263; >= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < 03c71c42809ef4b17f5d874cdb2d3bf40e847b86; >= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < 39bc27bd688066a63e56f7f64ad34fae03fbe3b8; Linux 5.2.
Is there a fix for CVE-2024-39497?
Yes. Fixed in Linux 3ae63a8c1685e16958560ec08d30defdc5b9cca0, Linux 2219e5f97244b79c276751a1167615b9714db1b0, Linux 1b4a8b89bf6787090b56424d269bf84ba00c3263, Linux 03c71c42809ef4b17f5d874cdb2d3bf40e847b86, Linux 39bc27bd688066a63e56f7f64ad34fae03fbe3b8. Upgrade Linux to 39bc27bd688066a63e56f7f64ad34fae03fbe3b8 or later.
How do I check if I'm affected by CVE-2024-39497?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.