mm/damon/vaddr: avoid hw-driven pte updates during damon_hugetlb_mkold()
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 6.6.160, 6.12.112, 6.18.55, 7.2.9
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
In the Linux kernel, the following vulnerability has been resolved: mm/damon/vaddr: avoid hw-driven pte updates during damon_hugetlb_mkold() damon_hugetlb_mkold() reads the page table entry into a local variable, unsets the accessed bit in the variable, and updates the page table entry with the updated variable value. If hardware updates the same page table entry in parallel, the hw updates could be lost. For example, hardware-updated dirty bits might be lost. Avoid the parallel updates by clearing the page table entry when reading it together, using huge_ptep_get_and_clear(). If a parallel write to the memory is made after the clearing, the hw will see the page table entry is cleared, trigger page fault and wait until it is handled. The page fault handling will wait for damon_hugetlb_mkold() due to the page table lock. Because hugetlbfs is an in-memory file system and hugetlb pages cannot be reclaimed, no critical issue is expected to my best knowledge. But definitely this is a nasty bug that should be fixed sooner rather than later. The issue was discovered [1] by Sashiko.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From 49f4203aae06ba9d67b500c90339b262b0a52637 · fixed in 7ed1062d154ec2401f2c894fd6858598bb1160b6; From 49f4203aae06ba9d67b500c90339b262b0a52637 · fixed in 00457981327c80bcc56e07d4714fe189337a19fa; From 49f4203aae06ba9d67b500c90339b262b0a52637 · fixed in e59cb7eda7c06334a0faf5aa44adb6acf2a1287a; From 49f4203aae06ba9d67b500c90339b262b0a52637 · fixed in 6e74ffc9ecf6ec24eee117150da78a1102be74c5; From 49f4203aae06ba9d67b500c90339b262b0a52637 · fixed in 39c0ceedd54557bdc1542de08d22b2ed33e534e4
- Linux Linux
5.17
- KernelLinux
From 5.17.0 · fixed in 6.6.160; From 6.7.0 · fixed in 6.12.112; From 6.13.0 · fixed in 6.18.55; From 6.19.0 · fixed in 7.2.9