8.8high
mm/khugepaged: invoke MMU notifiers in shmem/file collapse paths
- Severity
- 8.8high CVSS:3.1 by Linux
- Exploit likelihood
- 0.25% (higher than 17% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from f3f0e1d2150b2b99da2cbdfaad000089efe9bf30 before 275c626c131cfe141beeb6c575e31fa53d32da19, from f3f0e1d2150b2b99da2cbdfaad000089efe9bf30 before c23105673228c349739e958fa33955ed8faddcaf, from f3f0e1d2150b2b99da2cbdfaad000089efe9bf30 before ff2a1a6f869650aec99e9d070b5ab625bfbc5bc3, from f3f0e1d2150b2b99da2cbdfaad000089efe9bf30 before 5ffc2a75534d9d74d49760f983f8eb675fa63d69, from f3f0e1d2150b2b99da2cbdfaad000089efe9bf30 before 7f445ca2e0e59c7971d0b7b853465e50844ab596, from f3f0e1d2150b2b99da2cbdfaad000089efe9bf30 before 1a3f8c6cd29d9078cc81b29d39d0e9ae1d6a03c3, from f3f0e1d2150b2b99da2cbdfaad000089efe9bf30 before 5450535901d89a5dcca5fbbc59a24fe89caeb465, from f3f0e1d2150b2b99da2cbdfaad000089efe9bf30 before f268f6cf875f3220afc77bdd0bf1bb136eb54db9 and 1 more Not affected: before 4.8, from 4.9.337 up to 4.9.*, from 4.14.303 up to 4.14.*, from 4.19.270 up to 4.19.*, from 5.4.227 up to 5.4.*, from 5.10.159 up to 5.10.* | CVE List |
| linux linux_kernel | from 4.8 before 4.9.337, from 4.10 before 4.14.303, from 4.15 before 4.19.270, from 4.20 before 5.4.227, from 5.5 before 5.10.159, from 5.11 before 5.15.83, from 5.16 before 6.0.13, 6.1 | NVD |
All scores
| Linux | 8.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H |
| NVD | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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.
NVD (es)
En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: mm/khugepaged: invocar notificadores MMU en rutas de colapso de shmem/archivo Cualquier ruta de código que elimine las entradas de la tabla de páginas debe invocar notificadores MMU para garantizar que las MMU secundarias (como KVM) no sigan accediendo a páginas que ya no están asignadas. Las MMU secundarias no mantienen sus propias referencias a páginas que se reflejan, por lo que no notificarlas puede provocar el use-after-free de la página. Estoy marcando esto como una solución a un problema introducido en el commit f3f0e1d2150b ("khugepaged: agregar compatibilidad con el colapso para páginas tmpfs/shmem"), pero la mayor parte del impacto de seguridad de esto solo se produjo en el commit 27e1f8273113 ("khugepaged: habilitar el colapso pmd para THP asignado a pte"), que en realidad omitió los vaciados para la eliminación de PTE actuales, no solo para la eliminación de tablas de páginas vacías.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-48991 changed 2026-08-05 | CVE Terms of Use |
| NVD | CVE-2022-48991 changed 2026-08-04 | Public domain |