mm/mglru: don't use stack pointers when walking PUD and PMD tables
NIST has received this entry but not started reviewing it.
In the Linux kernel, the following vulnerability has been resolved: mm/mglru: don't use stack pointers when walking PUD and PMD tables MGLRU passes stack copies of page-table entries in walk_pud_range() and walk_pmd_range() when walking to the next level. These copies can become stale when khugepaged or MADV_DONTNEED (CONFIG_PT_RECLAIM) removes a PTE table concurrently. This pattern dates back to commit bd74fdaea146 ("mm: multi-gen LRU: support page table walks"). Likely, earlier locking masked the latent bug. Later changes exposed it: commit 1d65b771bc08 ("mm/khugepaged: retract_page_tables() without mmap or vma lock") allowed concurrent retraction, and commit cf4a65539c13 ("memcg-v1: no need for memcg locking for MGLRU") dropped the walker's outer RCU protection. The fix is simple, so just fix the original commit so we don't have to speculate. To fix it, pass the actual PMD/PUD pointers. This restores the RCU-protected lookup and validation against the live PMD. Note that the PUD handling is required as well to handle folded page tables correctly in all cases. Fix generated by an LLM and sent by Josef Bacik in private. [ david: handle walk_pud_range() as well, clarify+simplify description, adjust Fixes: ]
New to this? Read how to keep your software updated.
The products and versions NIST lists as vulnerable, 2 products in all. If what you run is not listed it is probably not affected, but ask your provider if you are unsure.
| Product | Type | Vulnerable versions | Fixed in |
|---|---|---|---|
| Linux Linux | Software | from bd74fdaea146029e4fa12c6de89adbe0779348a9, before 4240f886a8ba35b5fa18cf067358cd31a122dcc8; from bd74fdaea146029e4fa12c6de89adbe0779348a9, before 60454f64ab304a89707291af6f455893e5506187; from bd74fdaea146029e4fa12c6de89adbe0779348a9, before a352391f8f9c035d3b2a8a9fe6e3fd2e1c4ec44e; from bd74fdaea146029e4fa12c6de89adbe0779348a9, before 4b428d9d24e303f92819119c66858f5de38bbc78; from bd74fdaea146029e4fa12c6de89adbe0779348a9, before 4e5eb180d37cb222ed3c9b6772c6044e16c2a1c3; from bd74fdaea146029e4fa12c6de89adbe0779348a9, before 65a9bf08a3e4d6e58df211ed900c16bafb79b267 | 4240f886a8ba35b5fa18cf067358cd31a122dcc8; 60454f64ab304a89707291af6f455893e5506187; a352391f8f9c035d3b2a8a9fe6e3fd2e1c4ec44e; 4b428d9d24e303f92819119c66858f5de38bbc78 |
| Linux Linux | Software | 6.1 | not recorded |
The 7.8 severity score (high) from the company that reported it, broken into what it means in practice. Red means it makes the flaw easier or worse.
| How it is reached | On the machine | The attacker needs access to the computer itself, for example a login or a file they can get you to open. |
| How hard it is | Low | Easy to carry out. No special conditions have to line up. |
| Login needed | Low | The attacker needs an ordinary user account. |
| Someone has to act | None | Nobody has to click or open anything. It can happen on its own. |
| Reaches beyond the program | Unchanged | The damage stays inside the vulnerable program. |
| Data exposed | High | Total loss of confidentiality: the attacker can read all the data the program can reach. |
| Data changed | High | The attacker can change or delete anything the program can reach. |
| Service disrupted | High | The attacker can take the service down completely. |
| Ease of attack | 1.8 | A score for how easy it is to use the flaw. Higher is easier. |
| Damage | 5.9 | A score for how bad the harm is if it works. Higher is worse. |
NIST lists 6 sources for this flaw, none tagged as a vendor patch.