CVE-2026-99666

mm/khugepaged: fix PMD table lock leak in try_collapse_pte_mapped_thp()

State
Published
Severity
Not scored
Published
Nov 20, 2026
Updated
Nov 20, 2026
Reserved
Sep 25, 2026

Read the record on cve.org

Description

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

mm/khugepaged: fix PMD table lock leak in try_collapse_pte_mapped_thp()

For a private mapping with userfaultfd, try_collapse_pte_mapped_thp() takes the PMD table lock before it maps the page table for the second time. If that (pte_offset_map_rw_nolock) fails, because the page table vanished in the meantime due to concurrent page table reclaim, it leaves through the abort label, where the PMD table lock is unlocked if it differs from PTE table lock.

In case the PMD table lock and the PTE table lock match, which is the case without CONFIG_SPLIT_PTE_PTLOCKS after pte_offset_map_rw_nolock() failed, we miss to unlock the PMD table.

To fix it, forget the PTE table lock when we unmap+unlock the PTE table.

Fix generated by an LLM and sent by Josef Bacik in private.

[ david: move the ptl = NULL handling; rewrite description, drop wrong comments ]

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 6375e95f381e3dc85065b6f74263a61522736203 to before 7c1170ce1b74a8cd83da2174a3eb9e0755bb1b16Affected
  • 6375e95f381e3dc85065b6f74263a61522736203 to before ad5e5800ce560759c8d3c10aac15b48a06cd21c1Affected
  • 6375e95f381e3dc85065b6f74263a61522736203 to before db38b902307e687219ec765ef51a6ef459746c87Affected
LinuxLinux
  • 6.14Affected
  • before 6.14Not affected
  • 6.18.64 through 6.18.*Not affected
  • 7.3.5 through 7.3.*Not affected
  • 7.4-rc2 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.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.