{"id":"CVE-2022-49991","state":"PUBLISHED","title":"mm/hugetlb: avoid corrupting page->mapping in hugetlb_mcopy_atomic_pte","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/hugetlb: avoid corrupting page->mapping in hugetlb_mcopy_atomic_pte\n\nIn MCOPY_ATOMIC_CONTINUE case with a non-shared VMA, pages in the page\ncache are installed in the ptes.  But hugepage_add_new_anon_rmap is called\nfor them mistakenly because they're not vm_shared.  This will corrupt the\npage->mapping used by page cache code.","publishedAt":"2025-06-18T11:00:51.745Z","updatedAt":"2026-08-05T08:57:03.320Z","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":"f619147104c8ea71e120e4936d2b68ec11a1e527","status":"affected","lessThan":"da60ddd80d09f8371fbba1a238a4b318d13ba698","versionType":"git"},{"version":"f619147104c8ea71e120e4936d2b68ec11a1e527","status":"affected","lessThan":"3ada1b3e58db255a14ec73a59d7913e84dc5a8a4","versionType":"git"},{"version":"f619147104c8ea71e120e4936d2b68ec11a1e527","status":"affected","lessThan":"ab74ef708dc51df7cf2b8a890b9c6990fac5c0c6","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":"5.13","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.13","versionType":"semver"},{"version":"5.15.65","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.19.6","status":"unaffected","lessThanOrEqual":"5.19.*","versionType":"semver"},{"version":"6.0","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/da60ddd80d09f8371fbba1a238a4b318d13ba698","https://git.kernel.org/stable/c/3ada1b3e58db255a14ec73a59d7913e84dc5a8a4","https://git.kernel.org/stable/c/ab74ef708dc51df7cf2b8a890b9c6990fac5c0c6"],"weaknesses":[],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/49xxx/CVE-2022-49991.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-49991","state":"PUBLISHED","datePublished":"2025-06-18T11:00:51.745Z","dateUpdated":"2026-08-05T08:57:03.320Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-06-18T10:57:27.386Z"},"containers":{"cna":{"title":"mm/hugetlb: avoid corrupting page->mapping in hugetlb_mcopy_atomic_pte","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/hugetlb: avoid corrupting page->mapping in hugetlb_mcopy_atomic_pte\n\nIn MCOPY_ATOMIC_CONTINUE case with a non-shared VMA, pages in the page\ncache are installed in the ptes.  But hugepage_add_new_anon_rmap is called\nfor them mistakenly because they're not vm_shared.  This will corrupt the\npage->mapping used by page cache code."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"f619147104c8ea71e120e4936d2b68ec11a1e527","status":"affected","lessThan":"da60ddd80d09f8371fbba1a238a4b318d13ba698","versionType":"git"},{"version":"f619147104c8ea71e120e4936d2b68ec11a1e527","status":"affected","lessThan":"3ada1b3e58db255a14ec73a59d7913e84dc5a8a4","versionType":"git"},{"version":"f619147104c8ea71e120e4936d2b68ec11a1e527","status":"affected","lessThan":"ab74ef708dc51df7cf2b8a890b9c6990fac5c0c6","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":"5.13","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.13","versionType":"semver"},{"version":"5.15.65","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.19.6","status":"unaffected","lessThanOrEqual":"5.19.*","versionType":"semver"},{"version":"6.0","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/da60ddd80d09f8371fbba1a238a4b318d13ba698"},{"url":"https://git.kernel.org/stable/c/3ada1b3e58db255a14ec73a59d7913e84dc5a8a4"},{"url":"https://git.kernel.org/stable/c/ab74ef708dc51df7cf2b8a890b9c6990fac5c0c6"}],"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 - Exploitation requires local syscalls: memfd_create(MFD_HUGETLB)/mmap, userfaultfd, and UFFDIO_CONTINUE. The vulnerable path is not reachable from the network stack or remote protocols.\nAC:L - The attacker fully controls the trigger sequence (populate the hugetlb page cache, MAP_PRIVATE + UFFD MINOR register, then UFFDIO_CONTINUE) with no race or other conditions outside their control.\nPR:L - An unprivileged user can create hugetlb memfds via memfd_create(MFD_HUGETLB) (HUGETLB_ANONHUGE_INODE needs no CAP_IPC_LOCK) and open userfaultfd with UFFD_USER_MODE_ONLY without privileges.\nUI:N - The attacker performs all setup and triggers UFFDIO_CONTINUE themselves; no action by another user is required.\nS:U - Impact is confined to the local kernel's memory-management authority (corruption/DoS/potential privilege escalation within the same host); it does not cross a VM or other security boundary.\nC:H - Corrupting page->mapping on a page-cache hugepage into an attacker-owned anon_vma is type confusion; the page can retain a dangling anon_vma pointer after the private VMA is torn down, enabling use-after-free reads of kernel memory.\nI:H - The same mapping/type confusion and mapcount reset via hugepage_add_new_anon_rmap on an existing page-cache page yield a write primitive suitable for control-flow hijacking or privilege escalation.\nA:H - The invariant break reliably causes kernel oops/BUG_ON/panic paths in page-cache, rmap, and hugetlb teardown when the corrupted page is later used."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T08:57:03.320Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.13","versionEndExcluding":"5.15.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.13","versionEndExcluding":"5.19.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.13","versionEndExcluding":"6.0"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}