{"id":"CVE-2024-47676","state":"PUBLISHED","title":"mm/hugetlb.c: fix UAF of vma in hugetlb fault pathway","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/hugetlb.c: fix UAF of vma in hugetlb fault pathway\n\nSyzbot reports a UAF in hugetlb_fault().  This happens because\nvmf_anon_prepare() could drop the per-VMA lock and allow the current VMA\nto be freed before hugetlb_vma_unlock_read() is called.\n\nWe can fix this by using a modified version of vmf_anon_prepare() that\ndoesn't release the VMA lock on failure, and then release it ourselves\nafter hugetlb_vma_unlock_read().","publishedAt":"2024-10-21T11:53:20.482Z","updatedAt":"2026-08-05T11:39:22.950Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"9acad7ba3e25d11f4c96df1b7312ae89e6faca5c","status":"affected","lessThan":"e897d184a8dd4a4e1f39c8c495598e4d9472776c","versionType":"git"},{"version":"9acad7ba3e25d11f4c96df1b7312ae89e6faca5c","status":"affected","lessThan":"d59ebc99dee0a2687a26df94b901eb8216dbf876","versionType":"git"},{"version":"9acad7ba3e25d11f4c96df1b7312ae89e6faca5c","status":"affected","lessThan":"98b74bb4d7e96b4da5ef3126511febe55b76b807","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/hugetlb.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.9","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.9","versionType":"semver"},{"version":"6.10.13","status":"unaffected","lessThanOrEqual":"6.10.*","versionType":"semver"},{"version":"6.11.2","status":"unaffected","lessThanOrEqual":"6.11.*","versionType":"semver"},{"version":"6.12","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/hugetlb.c"]}],"references":["https://git.kernel.org/stable/c/e897d184a8dd4a4e1f39c8c495598e4d9472776c","https://git.kernel.org/stable/c/d59ebc99dee0a2687a26df94b901eb8216dbf876","https://git.kernel.org/stable/c/98b74bb4d7e96b4da5ef3126511febe55b76b807"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:56.516Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/47xxx/CVE-2024-47676.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-47676","state":"PUBLISHED","datePublished":"2024-10-21T11:53:20.482Z","dateUpdated":"2026-08-05T11:39:22.950Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-09-30T16:00:12.938Z"},"containers":{"cna":{"title":"mm/hugetlb.c: fix UAF of vma in hugetlb fault pathway","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/hugetlb.c: fix UAF of vma in hugetlb fault pathway\n\nSyzbot reports a UAF in hugetlb_fault().  This happens because\nvmf_anon_prepare() could drop the per-VMA lock and allow the current VMA\nto be freed before hugetlb_vma_unlock_read() is called.\n\nWe can fix this by using a modified version of vmf_anon_prepare() that\ndoesn't release the VMA lock on failure, and then release it ourselves\nafter hugetlb_vma_unlock_read()."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"9acad7ba3e25d11f4c96df1b7312ae89e6faca5c","status":"affected","lessThan":"e897d184a8dd4a4e1f39c8c495598e4d9472776c","versionType":"git"},{"version":"9acad7ba3e25d11f4c96df1b7312ae89e6faca5c","status":"affected","lessThan":"d59ebc99dee0a2687a26df94b901eb8216dbf876","versionType":"git"},{"version":"9acad7ba3e25d11f4c96df1b7312ae89e6faca5c","status":"affected","lessThan":"98b74bb4d7e96b4da5ef3126511febe55b76b807","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/hugetlb.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.9","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.9","versionType":"semver"},{"version":"6.10.13","status":"unaffected","lessThanOrEqual":"6.10.*","versionType":"semver"},{"version":"6.11.2","status":"unaffected","lessThanOrEqual":"6.11.*","versionType":"semver"},{"version":"6.12","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/hugetlb.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/e897d184a8dd4a4e1f39c8c495598e4d9472776c"},{"url":"https://git.kernel.org/stable/c/d59ebc99dee0a2687a26df94b901eb8216dbf876"},{"url":"https://git.kernel.org/stable/c/98b74bb4d7e96b4da5ef3126511febe55b76b807"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerability is triggered by a page fault on a hugetlb mapping in the attacker's own address space, requiring local execution of code on the target system. There is no network-reachable path into `hugetlb_fault()`.\nAC:L - The attacker controls every side of the race — the faulting thread, the sibling thread holding `mmap_lock` for write that forces `mmap_read_trylock()` to fail, and the `munmap()` thread that frees the VMA — and can retry the fault indefinitely. Syzbot reproduced the UAF, confirming it is reliably triggerable.\nPR:L - Any unprivileged local user can create the required private hugetlb VMA via `memfd_create(MFD_HUGETLB)` or `mmap(MAP_HUGETLB|MAP_NORESERVE)` with no capability check, and the UAF path in `hugetlb_no_page()` is reached before any hugepage allocation is attempted. No CAP_* or root is needed.\nUI:N - The attacker's own threads perform the mapping, faulting, and unmapping entirely on their own; no victim action or interaction of any kind is required.\nS:U - The corruption is of a `vm_area_struct` in kernel slab memory belonging to the attacker's own mm, handled by the kernel itself. It is a standard in-kernel memory-safety issue with no crossing of a VM, IOMMU, or other security-authority boundary.\nC:H - After the VMA is freed, `hugetlb_vma_unlock_read()` reads `vma->vm_flags` and `vma->vm_private_data` from reclaimed slab memory, so an attacker who grooms the freed `vm_area_struct` can steer subsequent dereferences and leverage the UAF for kernel memory disclosure.\nI:H - The stale `vma->vm_private_data` is used as a `hugetlb_vma_lock`/`resv_map` pointer and `up_read()` performs an atomic decrement plus possible waiter-list manipulation at that attacker-influenced address, giving a controllable kernel write primitive suitable for privilege escalation via heap spraying.\nA:H - Dereferencing a freed `vm_area_struct` and operating an rwsem derived from reclaimed memory readily causes kernel oops, rwsem-state corruption, or panic, and the attacker can trigger it repeatedly at will."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:39:22.950Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.9","versionEndExcluding":"6.10.13"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.9","versionEndExcluding":"6.11.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.9","versionEndExcluding":"6.12"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-47676","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-10-21T13:07:59.972172Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-10-21T13:14:17.370Z"}}]}}}