PT-2026-152577
CVE-2026-99697
·
تاريخ النشر
2026-11-20
·
تاريخ التحديث
2026-11-20
الوصف من
الدرجة
N/A
غير متوفرلا تتوفر حاليًا تقييمات أو مقاييس للخطورة. سنحدّث المعلومات المقابلة في الصفحة فور توفرها.
In the Linux kernel, the following vulnerability has been resolved:
mm: memcontrol: fix NULL pointer deref and UAF from high work func() on dying memcg
When memory.high is exceeded in non-task context, try charge memcg()
schedules memcg->high work without taking a reference on the memcg, and
high work func() invokes reclaim high() without pinning the memcg.
With obj cgroup reparenting, introduced in commit bf4f059954dc ("mm:
memcg/slab: obj cgroup API"), objects charged to a child memcg are
reparented to its parent in mem cgroup css offline() instead of holding a
reference on the child until uncharged. Subsequent uncharges of those
objects go to the parent, which can leave the child's memory use
permanently above its high limit, so any later charge on the offlined
memcg in non-task context schedules high work. This was later widened
from kernel memory to LRU folios when commit f1cf8d2f36dc ("mm:
memcontrol: eliminate the problem of dying memory cgroup for LRU folios")
converted LRU folios to use obj cgroup reparenting.
cancel work sync(&memcg->high work) only runs at the end of teardown in
mem cgroup css free(), so high work func() can start or still be running
reclaim high() after mem cgroup css released() or shrink many() has called
lru gen release memcg() and unhashed lruvec->lrugen.list. If reclaim
tries to rotate the memcg, lru gen rotate memcg() dereferences a NULL
pprev pointer. This issue is specific to MGLRU and was introduced with
the memcg LRU in commit e4dde56cd208 ("mm: multi-gen LRU: per-node
lru gen folio lists").
With either traditional LRU or MGLRU, css free rwork fn() calls
css rstat exit() which frees per-CPU rstat data before calling
mem cgroup css free(). If reclaim high() is still running, rstat updates
via mod lruvec state() -> css rstat updated() cause a use-after-free on
the per-CPU rstat data. This was introduced when commit 5da3bfa029d6
("cgroup: use separate rstat trees for each subsystem") moved
css rstat exit() ahead of ss->css free().
Fix both problems by acquiring a reference with css tryget online() in
high work func() before calling reclaim high(), and by resetting
memory.high and swap.high to PAGE COUNTER MAX in mem cgroup css offline()
so that charges via references on an offlined memcg do not trigger
high work on the dead child and skip checking live ancestors in
try charge memcg().
Acquiring the reference in high work func() rather than before scheduling
high work is safe because mem cgroup css free() calls irq work sync() and
cancel work sync() which cancels pending work and waits for an already
running high work func() to complete before mem cgroup free() frees the
memcg. css tryget online() uses percpu ref tryget live() and is safe to
call after percpu ref exit() before the cgroup is freed unlike
css tryget().
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 UID: 0 PID: 27 Comm: kworker/1:0 Tainted: G B W 7.3.0-rc5-g2bba28e98578 #284 PREEMPT(full)
Tainted: [B]=BAD PAGE, [W]=WARN <-- Taint from lru gen rotate memcg() VM WARN ON ONCE
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.17.0-debian-1.17.0-1 04/01/2014
Workqueue: events high work func
RIP: 0010:lru gen rotate memcg+0x1a3/0xe90
Call Trace:
? read ctrl pos+0x22f/0x3f0
shrink lruvec+0x16cb/0x1b80
? ret from fork asm+0x1a/0x30
? lapic next event+0x15/0x20
? clockevents program event+0x2bb/0x6f0
? lapic next event+0x15/0x20
? pfx shrink lruvec+0x10/0x10
? pfx clockevents program event+0x10/0x10
? raw spin lock+0x84/0xe0
? pfx raw spin lock+0x10/0x10
? kasan save stack+0x30/0x50
? psi group change+0x381/0x740
? pfx sched clock cpu+0x10/0x10
? save fpregs to fpstate+0xc4/0x2c0
? finish task switch.isra.0+0x1de/0xac0
? schedule+0xf62/0x42c0
? pfx schedule+0x10/0x10
? pfx irq work queue lo
---truncated---
وجدت خطأً في الوصف؟ لديك ما تضيفه؟ لا تتردد في مراسلتنا 👾