{"id":"CVE-2024-39497","published":"2024-07-12T12:20:32Z","modified":"2026-05-11T20:21:42Z","title":"drm/shmem-helper: Fix BUG_ON() on mmap(PROT_WRITE, MAP_PRIVATE)","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/shmem-helper: Fix BUG_ON() on mmap(PROT_WRITE, MAP_PRIVATE)\n\nLack of check for copy-on-write (COW) mapping in drm_gem_shmem_mmap\nallows users to call mmap with PROT_WRITE and MAP_PRIVATE flag\ncausing a kernel panic due to BUG_ON in vmf_insert_pfn_prot:\nBUG_ON((vma->vm_flags & VM_PFNMAP) && is_cow_mapping(vma->vm_flags));\n\nReturn -EINVAL early if COW mapping is detected.\n\nThis bug affects all drm drivers using default shmem helpers.\nIt can be reproduced by this simple example:\nvoid *ptr = mmap(0, size, PROT_WRITE, MAP_PRIVATE, fd, mmap_offset);\nptr[0] = 0;","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.00309,"percentile":0.16206,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/a508a102edf8735adc9bb73d37dd13c38d1a1b10","tags":[]},{"url":"https://git.kernel.org/stable/c/3ae63a8c1685e16958560ec08d30defdc5b9cca0","tags":[]},{"url":"https://git.kernel.org/stable/c/2219e5f97244b79c276751a1167615b9714db1b0","tags":[]},{"url":"https://git.kernel.org/stable/c/1b4a8b89bf6787090b56424d269bf84ba00c3263","tags":[]},{"url":"https://git.kernel.org/stable/c/03c71c42809ef4b17f5d874cdb2d3bf40e847b86","tags":[]},{"url":"https://git.kernel.org/stable/c/39bc27bd688066a63e56f7f64ad34fae03fbe3b8","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html","tags":[]}],"priority":{"score":3.2,"factors":[{"name":"EPSS percentile","points":3.24}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < a508a102edf8735adc9bb73d37dd13c38d1a1b10",">= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < 3ae63a8c1685e16958560ec08d30defdc5b9cca0",">= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < 2219e5f97244b79c276751a1167615b9714db1b0",">= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < 1b4a8b89bf6787090b56424d269bf84ba00c3263",">= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < 03c71c42809ef4b17f5d874cdb2d3bf40e847b86",">= 2194a63a818db71065ebe09c8104f5f021ca4e7b, < 39bc27bd688066a63e56f7f64ad34fae03fbe3b8"]},{"vendor":"Linux","product":"Linux","versions":["5.2"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-09-10T17:07:23.056270Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2024-38023","exploited":false,"provenance":"source"}}