CVE-2024-39497: drm/shmem-helper: Fix BUG_ON() on mmap(PROT_WRITE, MAP_PRIVATE)

Published Jul 12, 2024
·
Updated

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

11 affected componentsFixes available
redhat/kernel<6.6.35
6.6.35
redhat/kernel<6.9.6
6.9.6
redhat/kernel<6.10
6.10
debian/linux<=5.10.223-1
5.10.234-16.1.129-16.1.135-16.12.25-16.12.27-1
debian/linux-6.1
6.1.129-1~deb11u1
Linux Linux kernel>=5.2<5.10.229
Linux Linux kernel>=5.11<5.15.169
Linux Linux kernel>=5.16<6.1.114
Linux Linux kernel>=6.2<6.6.35
Linux Linux kernel>=6.7<6.9.6
Linux Linux kernel=6.10-rc1

Event History

Jul 12, 2024
CVE Published
via MITRE·12:20 PM
Data Sourced
via MITRE·12:20 PM
Description
Data Sourced
via NVD·01:15 PM
Description
Data Sourced
via NVD·01:15 PM
RemedySeverityWeaknessAffected Software
Apr 27, 2025
Data Sourced
via Ubuntu·05:19 PM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

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.

2

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.

3

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.

4

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.

5

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203