CVE-2022-48991

mm/khugepaged: invoke MMU notifiers in shmem/file collapse paths

State
Published
Severity
8.8 High
Published
Oct 21, 2024
Updated
Aug 5, 2026
Reserved
Aug 22, 2024

Read the record on cve.org

Description

In the Linux kernel, the following vulnerability has been resolved:

mm/khugepaged: invoke MMU notifiers in shmem/file collapse paths

Any codepath that zaps page table entries must invoke MMU notifiers to ensure that secondary MMUs (like KVM) don't keep accessing pages which aren't mapped anymore. Secondary MMUs don't hold their own references to pages that are mirrored over, so failing to notify them can lead to page use-after-free.

I'm marking this as addressing an issue introduced in commit f3f0e1d2150b ("khugepaged: add support of collapse for tmpfs/shmem pages"), but most of the security impact of this only came in commit 27e1f8273113 ("khugepaged: enable collapse pmd for pte-mapped THP"), which actually omitted flushes for the removal of present PTEs, not just for the removal of empty page tables.

Scores

CVSSScoreVectorSource
3.18.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:HLinux

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • f3f0e1d2150b2b99da2cbdfaad000089efe9bf30 to before 275c626c131cfe141beeb6c575e31fa53d32da19Affected
  • f3f0e1d2150b2b99da2cbdfaad000089efe9bf30 to before c23105673228c349739e958fa33955ed8faddcafAffected
  • f3f0e1d2150b2b99da2cbdfaad000089efe9bf30 to before ff2a1a6f869650aec99e9d070b5ab625bfbc5bc3Affected
  • f3f0e1d2150b2b99da2cbdfaad000089efe9bf30 to before 5ffc2a75534d9d74d49760f983f8eb675fa63d69Affected
  • f3f0e1d2150b2b99da2cbdfaad000089efe9bf30 to before 7f445ca2e0e59c7971d0b7b853465e50844ab596Affected
  • f3f0e1d2150b2b99da2cbdfaad000089efe9bf30 to before 1a3f8c6cd29d9078cc81b29d39d0e9ae1d6a03c3Affected
  • f3f0e1d2150b2b99da2cbdfaad000089efe9bf30 to before 5450535901d89a5dcca5fbbc59a24fe89caeb465Affected
  • f3f0e1d2150b2b99da2cbdfaad000089efe9bf30 to before f268f6cf875f3220afc77bdd0bf1bb136eb54db9Affected
LinuxLinux
  • 4.8Affected
  • before 4.8Not affected
  • 4.9.337 through 4.9.*Not affected
  • 4.14.303 through 4.14.*Not affected
  • 4.19.270 through 4.19.*Not affected
  • 5.4.227 through 5.4.*Not affected
  • 5.10.159 through 5.10.*Not affected
  • 5.15.83 through 5.15.*Not affected
  • 6.0.13 through 6.0.*Not affected
  • 6.1 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.