mm/khugepaged: flush deferred unmaps before dropping a failed folio
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel d9d621ad49a969587d32c98aee1d83e679b9d361, Kernel 854e5ff8b3ce2a776586cabebaeae645c992345b, Kernel 8c4adb787f77318df3b478f928f271e26d557208 and 4 more.
In the Linux kernel, the following vulnerability has been resolved: mm/khugepaged: flush deferred unmaps before dropping a failed folio collapse_file() can fail its reference-count or dirty-folio check after unmapping with TTU_BATCH_FLUSH. Both paths put back the isolated folio, then unlock it and drop the lookup reference before reaching the common try_to_unmap_flush(). The page-cache reference does not keep the folio stable once the lock is released. Another collapse can replace and free it. With its PTEs already gone, that collapse cannot flush the first task's per-task TLB batch, and retract_page_tables() skips short or unaligned VMAs. A CPU can therefore retain a user translation to the freed folio. This has been reproduced with unprivileged MADV_COLLAPSE on a memfd. Flush at out_unlock while the lookup reference and folio lock are still held. The common flush continues to cover the accumulated pagelist on both success and rollback, preserving batching on successful collapses.
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| Linux | Kernel | >=6d9df8a5889c569ab9e3bcb38b12e5b81b6b9bde <d9d621ad49a969587d32c98aee1d83e679b9d361, >=6d9df8a5889c569ab9e3bcb38b12e5b81b6b9bde <854e5ff8b3ce2a776586cabebaeae645c992345b, >=6d9df8a5889c569ab9e3bcb38b12e5b81b6b9bde <8c4adb787f77318df3b478f928f271e26d557208, >=6d9df8a5889c569ab9e3bcb38b12e5b81b6b9bde <cf1902ab0203f8767a3582143049d1bea5422096, =5.18 | d9d621ad49a969587d32c98aee1d83e679b9d361, 854e5ff8b3ce2a776586cabebaeae645c992345b, 8c4adb787f77318df3b478f928f271e26d557208, cf1902ab0203f8767a3582143049d1bea5422096 |
| linux-kernel: Kernel | >=6.13.0 <6.18.64, >=6.19.0 <7.3.5, >=5.18.0 <6.12.118 | 6.18.64, 7.3.5, 6.12.118 |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in Kernel, strongest first
Embed
A live severity badge for an advisory, README or ticket