CVE-2026-139437: block: take i_rwsem for the direct I/O write fallback
block: take irwsem for the direct I/O write fallback
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.65 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.6 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.6-1
Event History
Frequently Asked Questions
What workload is required to trigger the race?
The issue requires a direct I/O write that completes only partially and then falls back to buffered I/O. The described trigger uses O_DIRECT pwritev() with a two-segment iovec where the second segment is an unreadable PROT_NONE mapping, causing the direct path to write the first segment but fail to pin the second.
What concurrent action makes the partial direct-write fallback unsafe?
A concurrent ioctl(BLKBSZSET) can change the block size while the partial direct write enters its buffered-write fallback without the required inode lock. The described race can result in a kernel BUG.
What can be done before applying a kernel update?
Avoid running the triggering operations concurrently on the same block device: do not combine partial O_DIRECT write fallbacks with BLKBSZSET block-size changes. In particular, avoid changing block size while workloads may issue direct writes that can fall back to buffered I/O.