CVE-2026-98225: mm/shrinker: fix bogus set_shrinker_bit() with cgroup.memory=nokmem

Published Oct 6, 2026
·
Updated

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

mm/shrinker: fix bogus setshrinkerbit() with cgroup.memory=nokmem

With cgroup.memory=nokmem, shrinkermemcgalloc() bails out early and never allocates an id, so shrinker->id keeps the 0 it got from the kzalloc() in shrinkeralloc(). listlruinit() then copies that 0 into lru->shrinkerid, where it looks like a valid bit index.

Nothing calls expandshrinkerinfo() on nokmem either, so shrinkernrmax stays 0 and every memcg ends up with an empty map (mapnrmax == 0).

deferredsplitfolio() hands a real memcg to listlruadd() regardless of whether the lru is memcg aware, so the first THP queued in a cgroup does setshrinkerbit(memcg, nid, 0) and trips the bounds check:

WARNING: mm/shrinker.c:212 at setshrinkerbit+0x7d/0x90, CPU#126 Call Trace: <TASK> deferredsplitfolio+0x18c/0x220 mapanonfoliopmdnopf+0xdd/0x130 mapanonfoliopmdpf+0x14/0xb0 dohugepmdanonymouspage+0x1a1/0x620 handlemmfault+0xea9/0x10d0 handlemmfault+0xe5/0x320 douseraddrfault+0x1cc/0x870 excpagefault+0x81/0x1b0 asmexcpagefault+0x27/0x30 </TASK>

Harmless, the WARNONONCE() is what keeps the out of bounds unit[] read from happening, but the id should not look valid in the first place. Clear it before returning.

Two other spots could paper over this: drop the id in listlruinit() when nokmem turns memcgaware off, or make deferredsplitfolio() pass NULL like listlruaddobj() does. Both leave shrinker->id lying around for the next caller, so fix it where the id is handed out.

Affected Software

1 affected component
Linux Linux kernel

Event History

Oct 6, 2026
CVE Published
via MITRE·08:45 AM
Data Sourced
via MITRE·08:45 AM
Description
Data Sourced
via NVD·09:18 AM
Description

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