Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 25F9C563FA5 for ; Thu, 17 Sep 2026 16:32:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789662761; cv=none; b=VNGDi2OPM69lyaPFE1E1RZMWilF22BQy2dkr1BHdTTLaCA0gZhTIX77bmqK2lYukUlJJFOq06YPqxOqytnGcjdkVYPfddOhW2v54Ji1UdqBnbX+pPEalFnHVyRHxwDPY1rdGvpxBcVMTE35PdCCpqEfGiq8aDXaf5Lpt9qPyKgA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789662761; c=relaxed/simple; bh=aWsh/GRc3FKeaYpfR4i3YPcRINcBNU9qBlFs9IusXNM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=PtxkCZehFqOkpwKlp+ZjfYZ5pEA20U0kpzsraUEX0v2PAQcm7ZDltK4XTeRVKApuzmxdR6HSLeGQ92IYz2e2gIA6e8qX2d9uuHOi07TakffgpQ1GYoor7Hh+9/0Tb/BvKsuBdmqR0fRDT8qwyOhF6L31YFnB9L0LQkhaxiXJRD4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=UFT2MGea; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="UFT2MGea" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7D3381F000FF; Thu, 17 Sep 2026 16:32:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789662760; bh=hea8mCDqvlvXkL/yPFF727LPYOUKX3dOHx4EZ2lKwvM=; h=From:To:Cc:Subject:Date:Reply-To; b=UFT2MGeaDy5cqW8qYRocitu8Gx0u1oFlKc2CGJa7xaZqCkJI1v5ovOjOr0bqrtoHJ QciH4Qk2BRbFmnR5x1aaeaBKxrZQzenfCWJJWvPuVAu21WCGKZimXNcdOTopgpWhX1 TJckU2Tjz4sQekDWGFhh0/AumAL/1eCQH3DgXQo4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-92501: ext4: drain in-flight DIO before buffered write fallback Date: Thu, 17 Sep 2026 17:14:51 +0100 Message-ID: <2026091726-CVE-2026-92501-20ef@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=6437; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=1VdUqkw55QLsHImcu/I0RskYeS2GNT2VBJ5NycAyMuw=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlrBLZN2HH3+abJc5T46t+uynwheWZftL7xiarNK/M3r i5vXMfD0BHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATCWNhWLDiW+KRxJVmc4JE mX8e6XcTKJbM2skwv3j1qpQM6fkcNz6JNb7crfrtLfs2IQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: ext4: drain in-flight DIO before buffered write fallback generic/746 started failing intermittently on ext3 (no-extent inodes). The test triggers 'Page cache invalidation failure on direct I/O' warnings and subsequent fsync returns -EIO. Adding a 50ms delay between ext4_buffered_write_iter() and filemap_write_and_wait_range() in ext4_dio_write_iter() makes the race almost always reproducible. On no-extent inodes, DIO writes to holes cannot use unwritten extents, so ext4_iomap_alloc() leaves m_flags=0 and ext4_map_blocks() returns 0. The iomap layer then returns -ENOTBLK, causing fallback to buffered I/O. The fallback path in ext4_dio_write_iter() calls ext4_buffered_write_iter() which dirties pages, then does flush and invalidate. However, there's an unprotected window between ext4_buffered_write_iter() returning (with inode lock released) and the subsequent flush+invalidate. Concurrent async DIO completions from other threads can run kiocb_invalidate_post_direct_write() during this window. If pages have been re-dirtied, post-invalidation finds dirty pages and triggers the warning, setting -EIO in the error sequence. Consider a file with two 4k extents: [hole][written]. Thread A does DIO to the written extent, while thread B does DIO spanning both: kworker A (4k DIO, allocated block) kworker B (8k DIO, fallback) ----------------------------------- ---------------------------- inode_lock_shared() inode_lock_shared() iomap_dio_rw(): iomap_dio_rw(): kiocb_invalidate_pages -> clean iomap_begin -> -ENOTBLK submit_bio (async) dio->size = 0 inode_unlock_shared() inode_unlock_shared() [bio pending in block layer] /* fallback: lock released */ ext4_buffered_write_iter() inode_lock(exclusive) generic_perform_write() -> dirty pages [0, 8k] inode_unlock(exclusive) /* pages dirty, no lock */ [bio completes] filemap_write_and_wait_range() iomap_dio_complete() -> flush dirty pages kiocb_invalidate_post_direct_write() invalidate_mapping_pages() invalidate_inode_pages2_range() -> finds dirty page! -> dio_warn_stale_pagecache() -> errseq_set(-EIO) This issue can be triggered through normal I/O paths, not just intentionally overlapping DIO writes from userspace. For example, generic/746 uses a loop device where multiple kworkers issue concurrent I/O to the backing file. Additionally, when block_size < folio_size, non-overlapping DIO writes that share a large folio can also trigger the race. Add inode_dio_wait() in ext4_buffered_write_iter() before ext4_write_checks() to drain all in-flight DIO. This ensures that all DIO clears existing pages before submitting IO (via kiocb_invalidate_pages()), all BIO waits for all DIO to complete (via inode_dio_wait()), and ext4_write_checks() observes the inode size after all completed DIO so that ext4_block_zero_eof() does not race with in-flight DIO, thus eliminating the race. The Linux kernel CVE team has assigned CVE-2026-92501 to this issue. Affected and fixed versions =========================== Issue introduced in 5.5 with commit 378f32bab3714f04c4e0c3aee4129f6703805550 and fixed in 5.10.270 with commit fd7e0dab20837b9ea1eeef7c26f78ace8ac8258c Issue introduced in 5.5 with commit 378f32bab3714f04c4e0c3aee4129f6703805550 and fixed in 5.15.221 with commit f0af3ae09fb72382da1a5371bf6761b0264668e4 Issue introduced in 5.5 with commit 378f32bab3714f04c4e0c3aee4129f6703805550 and fixed in 6.1.188 with commit 7341e234927ff215f1d5d0bcfe04b74f53af378d Issue introduced in 5.5 with commit 378f32bab3714f04c4e0c3aee4129f6703805550 and fixed in 6.6.157 with commit 74eee4ff9698a65b2e6e15dac0e50d6526ad5f20 Issue introduced in 5.5 with commit 378f32bab3714f04c4e0c3aee4129f6703805550 and fixed in 6.12.110 with commit d47cdadd6e49023f7ee248048463807f1214f1ee Issue introduced in 5.5 with commit 378f32bab3714f04c4e0c3aee4129f6703805550 and fixed in 6.18.52 with commit 4e4e3eec506247c8f8bd8aaa1eb25e67016681a5 Issue introduced in 5.5 with commit 378f32bab3714f04c4e0c3aee4129f6703805550 and fixed in 7.2.6 with commit 9fd3ffc3c51c9deaba99bd7b338fff2d08f52416 Issue introduced in 5.5 with commit 378f32bab3714f04c4e0c3aee4129f6703805550 and fixed in 7.3-rc1 with commit 15cdefd0c0522f9d5e12d947fa04f4c11649b699 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-92501 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: fs/ext4/file.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/fd7e0dab20837b9ea1eeef7c26f78ace8ac8258c https://git.kernel.org/stable/c/f0af3ae09fb72382da1a5371bf6761b0264668e4 https://git.kernel.org/stable/c/7341e234927ff215f1d5d0bcfe04b74f53af378d https://git.kernel.org/stable/c/74eee4ff9698a65b2e6e15dac0e50d6526ad5f20 https://git.kernel.org/stable/c/d47cdadd6e49023f7ee248048463807f1214f1ee https://git.kernel.org/stable/c/4e4e3eec506247c8f8bd8aaa1eb25e67016681a5 https://git.kernel.org/stable/c/9fd3ffc3c51c9deaba99bd7b338fff2d08f52416 https://git.kernel.org/stable/c/15cdefd0c0522f9d5e12d947fa04f4c11649b699