CVE-2026-139260

ntfs: drain in-flight DIO before buffered write fallback

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

ntfs: 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, iomap_file_buffered_write() 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. NTFS has an equivalent fallback after iomap_dio_rw() 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 iomap_file_buffered_write() in the
fallback path. Since NTFS supports IOCB_NOWAIT, do not enter the blocking
fallback for such requests. Return -EAGAIN if no bytes were written, or
preserve the positive short-write result if the direct write made partial
progress.

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!

Analysis

AI-generated

Technical impact

The bug is a race condition between an asynchronous direct write and a fallback to buffered I/O in the NTFS file system driver. When a direct write remains pending after the inode lock is released, another direct write that falls back to buffered I/O can dirty pages before the first write clears the page cache. The invalidation then finds dirty pages, reports a failure, and stores a -EIO error in the mapping. A subsequent fsync watches this error and returns -EIO, indicating potential data loss. This reflects a concurrency flaw with potential data‑integrity impact, as captured by CWE‑362.

Affected Systems

All Linux kernel builds that include NTFS support are potentially affected until the driver patch is applied. The precise kernel versions are not listed in the advisory, so the issue may exist in any kernel older than the commit that fixes the race.

Risk and Exploitability

Severity metrics such as CVSS and EPSS are not supplied, and the vulnerability is not yet listed in the CISA KEV catalog. The likely attack vector is local, requiring an attacker with write access to an NTFS filesystem and the ability to orchestrate concurrent asynchronous direct writes and buffered writes. Because the race condition depends on timing of delayed I/O, exploitation is non‑trivial, but the presence of the bug indicates a moderate risk to data integrity on affected systems.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the Linux kernel to a version that contains the fix that drains in-flight direct I/O before falling back to buffered writes.
  • If a kernel update is not yet available, avoid using direct I/O (AIO) on NTFS mounts and use standard write operations instead.
  • Monitor filesystem logs for the 'Page cache invalidation failure on direct I/O' warning and treat a subsequent fsync returning -EIO as a critical error that requires immediate corrective action.
  • Regularly back up critical data stored on NTFS partitions to mitigate any accidental data loss.

Generated by OpenCVE AI on November 30, 2026 at 21:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-362
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: ntfs: 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, iomap_file_buffered_write() 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. NTFS has an equivalent fallback after iomap_dio_rw() 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 iomap_file_buffered_write() in the fallback path. Since NTFS supports IOCB_NOWAIT, do not enter the blocking fallback for such requests. Return -EAGAIN if no bytes were written, or preserve the positive short-write result if the direct write made partial progress. 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!
Title ntfs: drain in-flight DIO before buffered write fallback
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-362

    Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:33 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:18 PM
Modified
Nov 30, 2026, 2:18 PM