mm: mglru: fix stale batch updates after memcg reparenting
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
mm: mglru: fix stale batch updates after memcg reparenting
The mglru page table walker batches per-generation size deltas in walk->nr_pages while walking page tables without holding the lruvec lock. The reset_batch_size() later folds those deltas into walk->lruvec under the lruvec lock.
The page table walker can run concurrently with the memcg reparenting path as follows:
CPU0 CPU1 ==== ====
walk_mm --> walk_page_range --> update_batch_size --> walk->nr_pages += delta
mem_cgroup_css_offline --> memcg_reparent_objcgs --> lock lruvec lru_gen_reparent_memcg --> reparent child folios to parent unlock lruvec
lock lruvec reset_batch_size --> child lrugen->nr_pages += delta
From the CVE record · Linux
The Linux kernel’s MGLRU page table walker can apply stale batch updates when it runs concurrently with memory-cgroup reparenting. This can cause premature out-of-memory events because MGLRU may stop reclaiming memory while pages remain. The input does not specify an attack path, authentication requirements, or user interaction.
Engineers running Linux kernels with MGLRU should check their exposure; affected versions are not specified.