{"id":"CVE-2024-39497","aliases":["CVE-2024-39497"],"related":[],"kind":"vulnerability","state":"published","title":"drm/shmem-helper: Fix BUG_ON() on mmap(PROT_WRITE, MAP_PRIVATE)","summary":"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;","summarySource":"cvelist","descriptions":[{"lang":"en","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;","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se resolvió la siguiente vulnerabilidad: drm/shmem-helper: corrige BUG_ON() en mmap(PROT_WRITE, MAP_PRIVATE) La falta de verificación para el mapeo de copia en escritura (COW) en drm_gem_shmem_mmap permite a los usuarios llamar a mmap con Los indicadores PROT_WRITE y MAP_PRIVATE causan un pánico en el kernel debido a BUG_ON en vmf_insert_pfn_prot: BUG_ON((vma-&gt;vm_flags &amp; VM_PFNMAP) &amp;&amp; is_cow_mapping(vma-&gt;vm_flags)); Devuelva -EINVAL temprano si se detecta el mapeo COW. Este error afecta a todos los controladores drm que utilizan ayudantes shmem predeterminados. Se puede reproducir con este sencillo ejemplo: void *ptr = mmap(0, size, PROT_WRITE, MAP_PRIVATE, fd, mmap_offset); ptr[0] = 0;","source":"nvd"}],"published":"2024-07-12T12:20:32.330Z","modified":"2026-06-17T07:42:02.983Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-617"],"affected":[{"ranges":[{"type":"git","introduced":"2194a63a818db71065ebe09c8104f5f021ca4e7b","fixed":"a508a102edf8735adc9bb73d37dd13c38d1a1b10","status":"affected"},{"type":"git","introduced":"2194a63a818db71065ebe09c8104f5f021ca4e7b","fixed":"3ae63a8c1685e16958560ec08d30defdc5b9cca0","status":"affected"},{"type":"git","introduced":"2194a63a818db71065ebe09c8104f5f021ca4e7b","fixed":"2219e5f97244b79c276751a1167615b9714db1b0","status":"affected"},{"type":"git","introduced":"2194a63a818db71065ebe09c8104f5f021ca4e7b","fixed":"1b4a8b89bf6787090b56424d269bf84ba00c3263","status":"affected"},{"type":"git","introduced":"2194a63a818db71065ebe09c8104f5f021ca4e7b","fixed":"03c71c42809ef4b17f5d874cdb2d3bf40e847b86","status":"affected"},{"type":"git","introduced":"2194a63a818db71065ebe09c8104f5f021ca4e7b","fixed":"39bc27bd688066a63e56f7f64ad34fae03fbe3b8","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.2","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.2","status":"unaffected"},{"type":"semver","introduced":"5.10.229","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.169","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.114","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.35","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.9.6","lastAffected":"6.9.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.10","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.2","fixed":"5.10.229"},{"status":"affected","introduced":"5.11","fixed":"5.15.169"},{"status":"affected","introduced":"5.16","fixed":"6.1.114"},{"status":"affected","introduced":"6.2","fixed":"6.6.35"},{"status":"affected","introduced":"6.7","fixed":"6.9.6"},{"status":"affected","version":"6.10"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/a508a102edf8735adc9bb73d37dd13c38d1a1b10","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3ae63a8c1685e16958560ec08d30defdc5b9cca0","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2219e5f97244b79c276751a1167615b9714db1b0","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1b4a8b89bf6787090b56424d269bf84ba00c3263","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/03c71c42809ef4b17f5d874cdb2d3bf40e847b86","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/39bc27bd688066a63e56f7f64ad34fae03fbe3b8","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-09-10T17:07:23.056Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-39497","url":"https://www.cve.org/CVERecord?id=CVE-2024-39497","licence":"CVE Terms of Use","modified":"2026-05-11T20:21:42.337Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-39497","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-39497","licence":"Public domain","modified":"2026-06-17T07:42:02.983Z"}],"updatedAt":"2026-11-25T22:58:42.817Z","epss":{"score":0.00275,"percentile":0.21322,"date":"2026-12-01T12:00:22.000Z"}}