Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-98225 Overview
CVE-2026-98225 is a Linux kernel vulnerability in the memory shrinker subsystem (mm/shrinker.c). The issue surfaces when the kernel boots with cgroup.memory=nokmem, which disables kernel memory accounting for cgroups. Under this configuration, shrinker_memcg_alloc() returns early without allocating an id, leaving shrinker->id as 0. That stale 0 is then propagated into lru->shrinker_id by __list_lru_init() and later interpreted as a valid bit index by set_shrinker_bit(), triggering an out-of-bounds bit operation on an empty memcg shrinker map.
Critical Impact
Triggers a WARN_ON_ONCE() bounds check in set_shrinker_bit() during Transparent Huge Page (THP) deferred split handling under cgroups with kernel memory accounting disabled.
Affected Products
- Linux kernel (upstream mm/shrinker subsystem)
- Kernels booted with the cgroup.memory=nokmem parameter
- Workloads exercising THP via deferred_split_folio() inside memcg
Discovery Timeline
- 2026-10-06 - CVE-2026-98225 published to NVD
- 2026-10-06 - Last updated in NVD database
Technical Details for CVE-2026-98225
Vulnerability Analysis
The defect lives in the shrinker allocation path. When the kernel is booted with cgroup.memory=nokmem, shrinker_memcg_alloc() exits before assigning a shrinker id. Because shrinker_alloc() zero-initializes the structure with kzalloc(), shrinker->id remains 0. __list_lru_init() then copies this value into lru->shrinker_id as if it were valid.
At the same time, expand_shrinker_info() is never called in the nokmem path, so shrinker_nr_max stays 0 and every memcg carries an empty shrinker map with map_nr_max == 0. The first THP that deferred_split_folio() queues on the lru calls __list_lru_add() with a real memcg pointer, which drives set_shrinker_bit(memcg, nid, 0). The bounds check in set_shrinker_bit() fires a WARNING from mm/shrinker.c:212 and the out-of-bounds unit[] read is suppressed by WARN_ON_ONCE().
Root Cause
The root cause is state leakage. The shrinker id value 0 is both the kzalloc default and a plausible bit index. When nokmem shortcuts the allocator without clearing the field, callers cannot distinguish "no id assigned" from "id 0." The fix normalizes the id back to an invalid value where it is handed out, rather than patching the symptom in __list_lru_init() or deferred_split_folio().
Attack Vector
The condition requires the system to be booted with cgroup.memory=nokmem and to allocate THPs that reach deferred_split_folio() inside a memcg. There is no evidence of remote exploitation or privilege escalation. Impact is limited to kernel log noise from WARN_ON_ONCE(); the warning itself prevents the out-of-bounds memory access from occurring.
See the upstream fixes for implementation detail: Kernel Git Commit 469c12a and Kernel Git Commit 932cfb2.
Detection Methods for CVE-2026-98225
Indicators of Compromise
- Kernel ring buffer entries containing WARNING: mm/shrinker.c:212 at set_shrinker_bit+0x7d/0x90.
- Call traces showing deferred_split_folio followed by set_shrinker_bit on hosts booted with cgroup.memory=nokmem.
- Repeated THP fault paths (do_huge_pmd_anonymous_page, __handle_mm_fault) coinciding with the first shrinker warning after boot.
Detection Strategies
- Audit kernel boot parameters across the fleet for the presence of cgroup.memory=nokmem using /proc/cmdline.
- Correlate dmesg and journal data for set_shrinker_bit warnings against affected kernel builds.
- Track WARN_ON_ONCE kernel taint flags via /proc/sys/kernel/tainted to identify hosts that have already hit the condition.
Monitoring Recommendations
- Centralize kernel log collection and alert on mm/shrinker.c warnings tied to THP code paths.
- Flag hosts whose kernel command line enables nokmem while running pre-fix kernel versions.
- Monitor for repeated taint events, which indicate the warning is being suppressed by WARN_ON_ONCE() but the underlying condition persists.
How to Mitigate CVE-2026-98225
Immediate Actions Required
- Apply the upstream shrinker fix that clears shrinker->id before shrinker_memcg_alloc() returns in the nokmem path.
- Inventory hosts booted with cgroup.memory=nokmem and prioritize them for kernel updates.
- Capture any existing set_shrinker_bit warnings from kernel logs to confirm remediation after reboot.
Patch Information
The fix is tracked in two upstream commits: Kernel Git Commit 469c12a and Kernel Git Commit 932cfb2. Both reset the shrinker id in the allocator when kernel memory accounting is disabled, ensuring downstream users do not treat 0 as a valid bit index. Rebuild and reboot into a kernel containing these commits to remediate.
Workarounds
- Remove cgroup.memory=nokmem from the kernel command line where operationally acceptable, which re-enables shrinker id allocation.
- Avoid workloads that trigger THP deferred splits inside memcg on affected hosts by disabling or tuning THP via /sys/kernel/mm/transparent_hugepage/enabled.
- Treat the WARN_ON_ONCE() as a signal to schedule a kernel update rather than suppressing kernel log output.
# Check whether the host is exposed to CVE-2026-98225
grep -o 'cgroup.memory=nokmem' /proc/cmdline && \
echo 'Host boots with nokmem - verify kernel includes shrinker id fix'
# Review kernel logs for the warning signature
dmesg | grep -E 'set_shrinker_bit|mm/shrinker.c:212'
# Optional: disable THP to reduce exposure until patched
echo never > /sys/kernel/mm/transparent_hugepage/enabled
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

