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-98223 Overview
CVE-2026-98223 is a Linux kernel memory management flaw in the filemap subsystem. The issue affects how the kernel handles dropbehind folios that become mapped through fault-around optimization. When writeback completes on such folios, the kernel can invoke folio_unmap_invalidate(), which calls unmap_mapping_folio() and acquires i_mmap_rwsem. This path may sleep. If folio_end_dropbehind() runs in a non-preemptible task context, the kernel triggers a sleeping-in-atomic warning. The fix retains mapped dropbehind folios instead of forcibly unmapping them when writeback completes.
Critical Impact
The flaw can produce kernel warnings and potential instability on systems that exercise the dropbehind write path concurrently with fault-around mapping, affecting kernel reliability under memory pressure.
Affected Products
- Linux kernel versions containing the dropbehind folio implementation in mm/filemap.c
- Distributions shipping affected mainline kernels prior to the fix commits
- Server and workstation workloads using streaming I/O with the dropbehind hint
Discovery Timeline
- 2026-10-06 - CVE-2026-98223 published to the National Vulnerability Database
- 2026-10-06 - Last updated in NVD database
Technical Details for CVE-2026-98223
Vulnerability Analysis
The Linux kernel uses dropbehind folios to drop pages from the page cache after writeback completes. This optimization reduces cache pollution for streaming write workloads. Fault-around is a separate optimization that maps nearby pages into a process address space during a page fault without performing the standard page-cache lookup. The standard lookup path clears the dropbehind flag when a competing cached user appears. Fault-around skips this clearing step. As a result, a folio can remain flagged as dropbehind while also being mapped into one or more process address spaces.
When writeback finishes, folio_end_dropbehind() runs and attempts to invalidate the folio. For mapped folios, invalidation calls folio_unmap_invalidate(), which in turn calls unmap_mapping_folio(). That function acquires the i_mmap_rwsem semaphore and can sleep. The dropbehind completion handler can execute in a non-preemptible context, so taking a sleeping lock there is incorrect kernel behavior.
Root Cause
The root cause is a missing synchronization between the fault-around mapping path and the dropbehind lifecycle. Fault-around does not clear the dropbehind flag when it maps a folio, allowing a mapped folio to still be marked for aggressive invalidation. The writeback completion handler then tries to unmap and invalidate the folio from a context that cannot sleep.
Attack Vector
This issue is primarily a reliability and correctness defect rather than a direct remote attack vector. A local workload that combines streaming writes with concurrent memory mapping can trigger the sleeping-in-atomic warning. Repeated triggering under memory pressure can degrade kernel stability. No remote exploitation path has been published, and no proof-of-concept exploits are available in public repositories.
The vulnerability mechanism is described in prose because no verified exploit code exists. For patch-level technical detail, review the upstream commits linked in the references.
Detection Methods for CVE-2026-98223
Indicators of Compromise
- Kernel log entries containing BUG: sleeping function called from invalid context with a stack trace that includes folio_end_dropbehind, folio_unmap_invalidate, or unmap_mapping_folio.
- Soft lockup warnings or scheduling anomalies that correlate with heavy sequential write workloads using the RWF_DONTCACHE or equivalent dropbehind hint.
- Unexpected invalidation activity on files that are concurrently mmap'd by other processes.
Detection Strategies
- Monitor dmesg and /var/log/kern.log for atomic-context sleeping warnings referencing filemap or dropbehind symbols.
- Compare running kernel versions against the fixed commits 2897601dffe576fcd87a4259102f41f7fb0cbfc8, 77c0fade37c80e8aa16ac048a9828249055e3f66, and 848d2ce2fce15fbdc083fbf9691bfa72911033c4.
- Instrument workloads that combine streaming I/O with mmap-heavy processes and watch for performance regressions tied to writeback completion.
Monitoring Recommendations
- Forward kernel ring buffer events into a centralized logging pipeline for cross-host correlation of sleeping-in-atomic warnings.
- Track kernel package versions across the fleet and flag hosts running pre-patch builds.
- Alert on repeated panics or soft lockups originating in mm/filemap.c for hosts with high write throughput.
How to Mitigate CVE-2026-98223
Immediate Actions Required
- Identify Linux hosts running kernels that include dropbehind folio support but lack the fix commits listed in the references.
- Prioritize patching on servers that run streaming write workloads such as backup targets, log aggregators, and object storage nodes.
- Review any custom kernel builds or out-of-tree modules that interact with folio_end_dropbehind() or the page cache invalidation path.
Patch Information
The fix is applied through three upstream commits that modify mm/filemap.c to retain mapped dropbehind folios rather than forcibly unmapping them during writeback completion. Unmapped dropbehind folios continue to follow the existing invalidation path. Review the changes directly:
Apply vendor-provided kernel updates once the fix lands in the stable branch used by your distribution.
Workarounds
- Avoid using the dropbehind write hint on workloads that concurrently memory-map the same files until the patched kernel is deployed.
- Reduce concurrent write and mmap pressure on affected hosts by scheduling backup or log rotation jobs during low-mmap windows.
- Where feasible, revert to a kernel build that predates dropbehind folio support until a patched version is available.
# Verify running kernel version and confirm fix commits are present
uname -r
# Check distribution package metadata for the backported fix
# Example on Debian-based systems:
apt-cache policy linux-image-$(uname -r)
# Example on RHEL-based systems:
rpm -q --changelog kernel | grep -i dropbehind
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

