CVE-2024-36881
JSON

5.5medium

mm/userfaultfd: reset ptes when close() for wr-protected ones

Severity
5.5medium CVSS:3.1 by CISA-ADP
Exploit likelihood
0.24% (higher than 16% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

Description

In the Linux kernel, the following vulnerability has been resolved: mm/userfaultfd: reset ptes when close() for wr-protected ones Userfaultfd unregister includes a step to remove wr-protect bits from all the relevant pgtable entries, but that only covered an explicit UFFDIO_UNREGISTER ioctl, not a close() on the userfaultfd itself. Cover that too. This fixes a WARN trace. The only user visible side effect is the user can observe leftover wr-protect bits even if the user close()ed on an userfaultfd when releasing the last reference of it. However hopefully that should be harmless, and nothing bad should happen even if so. This change is now more important after the recent page-table-check patch we merged in mm-unstable (446dd9ad37d0 ("mm/page_table_check: support userfault wr-protect entries")), as we'll do sanity check on uffd-wp bits without vma context. So it's better if we can 100% guarantee no uffd-wp bit leftovers, to make sure each report will be valid.

Affected

Product or packageVersionsReported by
Linux Linuxfrom f369b07c861435bd812a9d14493f71b34132ed6f before 1da0471de653b13c8f63dcd32a23574d683c8310, from f369b07c861435bd812a9d14493f71b34132ed6f before 377f3a9a3d032a52325a5b110379a25dd1ab1931, from f369b07c861435bd812a9d14493f71b34132ed6f before 8d8b68a5b0c9fb23d37df06bb273ead38fd5a29d, from f369b07c861435bd812a9d14493f71b34132ed6f before c88033efe9a391e72ba6b5df4b01d6e628f4e734, 3e2747c3ddfa717697c3cc2aa6ab989e48d6587d, from 5.19.6 before 5.20, 6.0
Not affected: before 6.0, from 6.1.191 up to 6.1.*, from 6.6.31 up to 6.6.*, from 6.8.10 up to 6.8.*, from 6.9 up to *
CVE List
linux linux_kernelfrom 5.19.6 before 6.6.31, from 6.7 before 6.8.10, 6.9NVD

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/userfaultfd: reset ptes when close() for wr-protected ones Userfaultfd unregister includes a step to remove wr-protect bits from all the relevant pgtable entries, but that only covered an explicit UFFDIO_UNREGISTER ioctl, not a close() on the userfaultfd itself. Cover that too. This fixes a WARN trace. The only user visible side effect is the user can observe leftover wr-protect bits even if the user close()ed on an userfaultfd when releasing the last reference of it. However hopefully that should be harmless, and nothing bad should happen even if so. This change is now more important after the recent page-table-check patch we merged in mm-unstable (446dd9ad37d0 ("mm/page_table_check: support userfault wr-protect entries")), as we'll do sanity check on uffd-wp bits without vma context. So it's better if we can 100% guarantee no uffd-wp bit leftovers, to make sure each report will be valid.

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: mm/userfaultfd: restablece ptes al cerrar() para los protegidos por wr. Userfaultfd unregister incluye un paso para eliminar los bits de wr-protect de todas las entradas relevantes de pgtable, pero eso solo cubre una UFFDIO_UNREGISTER ioctl explícito, no un close() en el propio userfaultfd. Cubre eso también. Esto corrige un rastro WARN. El único efecto secundario visible para el usuario es que puede observar los bits wr-protect sobrantes incluso si el usuario cerró () en un userfaultfd al liberar la última referencia del mismo. Sin embargo, es de esperar que eso sea inofensivo y, aun así, no debería pasar nada malo. Este cambio ahora es más importante después del reciente parche de verificación de tabla de páginas que fusionamos en mm-unstable (446dd9ad37d0 ("mm/page_table_check: admite entradas de protección wr de error de usuario")), ya que haremos una verificación de cordura en uffd-wp. bits sin contexto vma. Por lo tanto, es mejor si podemos garantizar al 100% que no queden restos de bits de uffd-wp, para asegurarnos de que cada informe sea válido.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-36881 changed 2026-10-30CVE Terms of Use
NVDCVE-2024-36881 changed 2026-10-30Public domain