AZL-117262: CVE-2026-139633 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
ext2: drain in-flight DIO before buffered write fallback
An asynchronous direct write can remain in flight after the inode lock is released. If another direct write falls back to buffered I/O while the first write is still pending, genericperformwrite() can dirty pages before the first write completes its post-I/O page cache invalidation. The invalidation then finds dirty pages, reports a page cache invalidation failure, and records -EIO in the mapping error sequence. A later fsync() therefore returns -EIO.
Commit 15cdefd0c0522f9d5e12d947fa04f4c11649b699 ("ext4: drain in-flight DIO before buffered write fallback") fixed the same race in ext4. Ext2 has an equivalent fallback after iomapdiorw() returns -ENOTBLK or a short write, but does not drain other in-flight DIO before dirtying the page cache.
Wait for in-flight DIO before calling genericperformwrite() in the fallback path.
A reproducer using concurrent AIO direct writes and buffered fallback triggered the following warning and made a subsequent fsync() return -EIO:
Page cache invalidation failure on direct I/O. Possible data corruption due to collision with buffered I/O!
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch 15cdefd0c0522f9d5e12d947fa04f4c11649b699
Event History
Frequently Asked Questions
What workload is required to trigger this issue?
The race requires concurrent asynchronous direct I/O writes and a direct-write path that falls back to buffered I/O. The fallback can occur when iomap_dio_rw() returns -ENOTBLK or performs a short write.
What are the observable effects if the race occurs?
A direct-I/O page-cache invalidation can encounter dirty pages, producing a page cache invalidation failure and recording -EIO in the mapping error sequence. A later fsync() can then return -EIO, and the warning notes possible data corruption from the direct-I/O collision.
What change addresses the issue?
The fix waits for in-flight direct I/O to complete before generic_perform_write() dirties page-cache pages in the buffered-write fallback path.