CVE-2024-39497: drm/shmem-helper: Fix BUG_ON() on mmap(PROT_WRITE, MAP_PRIVATE)
In the Linux kernel, the following vulnerability has been resolved:
drm/shmem-helper: Fix BUGON() on mmap(PROTWRITE, MAPPRIVATE)
Lack of check for copy-on-write (COW) mapping in drmgemshmemmmap allows users to call mmap with PROTWRITE and MAPPRIVATE flag causing a kernel panic due to BUGON in vmfinsertpfnprot: BUGON((vma->vmflags & VMPFNMAP) && iscowmapping(vma->vmflags));
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, PROTWRITE, MAPPRIVATE, fd, mmapoffset); ptr[0] = 0;
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-39497?
CVE-2024-39497 has been classified with a severity level that indicates potentially high impact on system integrity due to improper handling of memory mappings.
How do I fix CVE-2024-39497?
To mitigate CVE-2024-39497, upgrade to the kernel version 6.6.35, 6.9.6, or 6.10 for Red Hat systems, or apply the appropriate updates if you're using Debian systems.
What systems are affected by CVE-2024-39497?
CVE-2024-39497 affects certain versions of the Linux kernel used in both Red Hat and Debian distributions.
What are the potential consequences of CVE-2024-39497?
Exploitation of CVE-2024-39497 could lead to unauthorized modification of memory, potentially compromising system stability and security.
Is there a workaround for CVE-2024-39497?
Currently, there are no known workarounds for CVE-2024-39497, and it is recommended to apply the latest kernel updates to address the vulnerability.