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-98538 Overview
CVE-2026-98538 is a Linux kernel vulnerability in the writeback subsystem. The function cleanup_offline_cgwb() rescans inode lists from the same end on every invocation, causing a quadratic drain cost when a dying cgroup writeback (cgwb) holds large numbers of attached inodes. On systems with roughly 17 million inodes attached to a single dying cgwb, the condition produced soft lockups with CPUs reported stuck for 21 to 48 seconds under wb->list_lock.
The fix walks wb->b_attached and wb->b_dirty_time from the oldest end and rotates every scanned inode to the newest end, so the next pass starts where the previous one stopped and the drain becomes linear.
Critical Impact
Local workloads that generate large numbers of per-cgroup dirty inodes can trigger CPU soft lockups and stall the writeback path, degrading system availability.
Affected Products
- Linux kernel (writeback / cgroup writeback subsystem)
- Stable kernel branches referenced by the fix commits 2d1da58, 624dd09, 9dac137, c96b4d1, dd4b920, and f6988c9
- Systems running cgroup v2 with memory controller and heavy per-cgroup inode populations
Discovery Timeline
- 2026-10-18 - CVE-2026-98538 published to NVD
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-98538
Vulnerability Analysis
The writeback subsystem maintains per-cgroup writeback structures (cgwb) that track dirty inodes. When a cgroup is destroyed, the kernel calls cleanup_offline_cgwb() to migrate attached inodes off the dying wb. The function processes at most WB_MAX_INODES_PER_ISW inodes per invocation and is called repeatedly until the dying wb is drained.
Each call walks wb->b_attached followed by wb->b_dirty_time from the same list end. Inodes already prepared for switching remain on the list with I_WB_SWITCH set until the switch worker completes. Inodes that cannot be switched, including those with I_FREEING, I_WILL_FREE, !SB_ACTIVE, DAX inodes, and inodes already on the target wb, stay in place indefinitely.
Each successive pass therefore rescans a growing prefix of skipped inodes under wb->list_lock. The drain cost becomes quadratic in the number of inodes on the list, producing extended soft lockups on hosts with large inode populations.
Root Cause
The root cause is an algorithmic complexity defect [CWE-407] in the drain loop. The list traversal never advances past unswitchable or in-flight inodes, so repeated invocations re-examine the same elements while holding wb->list_lock.
Attack Vector
The condition is reachable from local workloads that create many dirty inodes within a cgroup and then destroy the cgroup. Containerized workloads with large per-container file populations are the primary exposure. No network vector or authentication bypass is involved; impact is confined to kernel availability and responsiveness.
The upstream fix walks both lists from the oldest end and rotates every scanned inode to the newest end. b_attached is unordered, so the rotation is semantically invisible. b_dirty_time is ordered by dirtied_when, but prepared inodes receive a new dirtied_time_when on the target wb once the switch worker runs, limiting out-of-order residues to DAX inodes on the dying wb only.
Detection Methods for CVE-2026-98538
Indicators of Compromise
- Kernel log entries reporting watchdog: BUG: soft lockup - CPU#N stuck for 21s! or longer durations with stack traces including cleanup_offline_cgwb, inode_switch_wbs, or wb_wait_for_completion.
- Prolonged contention on wb->list_lock observed via perf lock or /proc/lock_stat.
- Cgroup teardown operations (rmdir on cgroup directories) that hang or take minutes to complete on hosts with large inode caches.
Detection Strategies
- Monitor dmesg and journalctl -k for soft lockup warnings correlated with cgroup destruction events from container runtimes such as containerd, crio, or systemd scopes.
- Collect kernel stack traces during stalls using perf record -g or bpftrace to confirm the call path through cleanup_offline_cgwb().
- Track the count of offline cgwbs exposed through /sys/kernel/debug/bdi/*/stats and alert when offline cgwbs persist for extended intervals.
Monitoring Recommendations
- Alert on soft lockup messages in kernel logs across fleet telemetry pipelines.
- Baseline inode counts per cgroup for container workloads and investigate outliers that exceed millions of attached inodes.
- Record cgroup teardown latency as a service-level indicator for container platforms.
How to Mitigate CVE-2026-98538
Immediate Actions Required
- Identify kernels affected by scanning release notes for the backported fix commits 2d1da58c79b6, 624dd0931162, 9dac137bf77e, c96b4d162886, dd4b92067238, and f6988c90671e.
- Schedule kernel updates on hosts running container workloads that generate large per-cgroup inode populations.
- Reduce the probability of large-scale cgroup teardown stalls by draining nodes before kernel maintenance.
Patch Information
The fix is available in the mainline Linux kernel and has been backported to multiple stable branches. Reference the upstream commits: Kernel Git Commit 2d1da58, Kernel Git Commit 624dd09, Kernel Git Commit 9dac137, Kernel Git Commit c96b4d1, Kernel Git Commit dd4b920, and Kernel Git Commit f6988c9. Apply the vendor-supplied kernel package that incorporates these commits.
Workarounds
- Avoid accumulating very large numbers of dirty inodes within a single cgroup by rotating or splitting container workloads.
- Trigger periodic sync operations and drop clean caches via echo 2 > /proc/sys/vm/drop_caches before deleting cgroups holding significant inode populations.
- Where feasible, disable or limit use of DAX-backed filesystems inside short-lived cgroups, since DAX inodes remain unswitchable and amplify the quadratic scan.
# Verify running kernel version and check for the backported fix
uname -r
rpm -q --changelog kernel | grep -E '2d1da58|624dd09|9dac137|c96b4d1|dd4b920|f6988c9'
# Observe offline cgwbs that may trigger the condition
for bdi in /sys/kernel/debug/bdi/*/stats; do
echo "== $bdi =="
cat "$bdi"
done
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

