AZL-115552: CVE-2026-99697 affecting package kernel 6.6.161.1-1

Published Nov 20, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

mm: memcontrol: fix NULL pointer deref and UAF from highworkfunc() on dying memcg

When memory.high is exceeded in non-task context, trychargememcg() schedules memcg->highwork without taking a reference on the memcg, and highworkfunc() invokes reclaimhigh() without pinning the memcg.

With objcgroup reparenting, introduced in commit bf4f059954dc ("mm: memcg/slab: objcgroup API"), objects charged to a child memcg are reparented to its parent in memcgroupcssoffline() 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 highwork. 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 objcgroup reparenting.

cancelworksync(&memcg->highwork) only runs at the end of teardown in memcgroupcssfree(), so highworkfunc() can start or still be running reclaimhigh() after memcgroupcssreleased() or shrinkmany() has called lrugenreleasememcg() and unhashed lruvec->lrugen.list. If reclaim tries to rotate the memcg, lrugenrotatememcg() 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 lrugenfolio lists").

With either traditional LRU or MGLRU, cssfreerworkfn() calls cssrstatexit() which frees per-CPU rstat data before calling memcgroupcssfree(). If reclaimhigh() is still running, rstat updates via modlruvecstate() -> cssrstatupdated() 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 cssrstatexit() ahead of ss->cssfree().

Fix both problems by acquiring a reference with csstrygetonline() in highworkfunc() before calling reclaimhigh(), and by resetting memory.high and swap.high to PAGECOUNTERMAX in memcgroupcssoffline() so that charges via references on an offlined memcg do not trigger highwork on the dead child and skip checking live ancestors in trychargememcg().

Acquiring the reference in highworkfunc() rather than before scheduling highwork is safe because memcgroupcssfree() calls irqworksync() and cancelworksync() which cancels pending work and waits for an already running highworkfunc() to complete before memcgroupfree() frees the memcg. csstrygetonline() uses percpureftrygetlive() and is safe to call after percpurefexit() before the cgroup is freed unlike csstryget().

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]=BADPAGE, [W]=WARN <-- Taint from lrugenrotatememcg() VMWARNONONCE Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.17.0-debian-1.17.0-1 04/01/2014 Workqueue: events highworkfunc RIP: 0010:lrugenrotatememcg+0x1a3/0xe90 Call Trace: <TASK> ? readctrlpos+0x22f/0x3f0 shrinklruvec+0x16cb/0x1b80 ? retfromforkasm+0x1a/0x30 ? lapicnextevent+0x15/0x20 ? clockeventsprogramevent+0x2bb/0x6f0 ? lapicnextevent+0x15/0x20 ? pfxshrinklruvec+0x10/0x10 ? pfxclockeventsprogramevent+0x10/0x10 ? rawspinlock+0x84/0xe0 ? pfxrawspinlock+0x10/0x10 ? kasansavestack+0x30/0x50 ? psigroupchange+0x381/0x740 ? pfxschedclockcpu+0x10/0x10 ? savefpregstofpstate+0xc4/0x2c0 ? finishtaskswitch.isra.0+0x1de/0xac0 ? schedule+0xf62/0x42c0 ? pfxschedule+0x10/0x10 ? pfxirqworkqueuelo ---truncated---

Affected Software

1 affected component
azure-linux/kernel<=6.6.161.1-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    In high_work_func(), acquire a reference with css_tryget_online() before calling reclaim_high().

  2. Compensating control

    In mem_cgroup_css_offline(), reset memory.high and swap.high to PAGE_COUNTER_MAX.

Event History

Nov 20, 2026
Advisory Published
via OSV·06:18 AM
Data Sourced
via OSV·06:18 AM
DescriptionAffected Software

Child vulnerabilities

Contains the following vulnerabilities.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203