Advisory Published
CVE Published
Updated

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

First published: Fri Jul 12 2024(Updated: )

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;

Credit: 416baaa9-dc9f-4396-8d5f-8c081fb06d67 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Affected SoftwareAffected VersionHow to fix
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-1
6.1.129-1
6.1.135-1
6.12.22-1
6.12.25-1
debian/linux-6.1
6.1.129-1~deb11u1

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

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.

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.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203