From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796046195; b=iuw27lT1Hluq3LURjj0YRTYIZQde/Rys2Igkgi1qrm2H+WA4m4DaorUDxN7xRl6qBj2B Gq/8Bd5KJYz8Ssm8fPbRqZUVkvLpFCVxpoHK72TNDc2U34himx2X9ICRCm9BWJwfpnLEO 8tsOOazVfmNEBPd+NPVlXf8O9VcvpJsFQORwbEWmSczufEWjCo4ZCR74TBsy+ZUeYqVkF eXQcm3rthwojZPe8gCcfHiF8HBEwXalhsqO4wK2RPbKh8iuSmeHsqBrG+CjmW93TglzuY pY8jcwJM1sGPmjr8Kt2Vs4BjX2WCIA8lokNE5bAgCxv1G5ltIqFlNjtLc+GY1ORWz0A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796046195; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=MHi/nuO70+M4dwTB1rSnnwa65quIGrU7Wm9kbOtfG4c=; b=x0ejaFPirkB6kiiLF0jgT/1NQCsze8I0Reymcmu1KjmskEaYEZ4rtL6Svu0mCstRPYam 8Sepnsq9BcOhbJ7jXwxBkqslnLqMRpWXTd97lp9OZ3sVq2pHid5oZWYEZKCjJn7zIVgdv nedZ+6nAG558DW8LnqdkjQphfWnNlFf5hewBcKt3iY1srPEwMuNTKi6HnQZrvXgbAgCFN mfi7ulHldDaBohZ/qucq/L44I3NWjVRY/jiKd5DFldqDV8yDkGGFWWn222ivOaP90xuEy NdqNVCHPGuu6hNWcaeIn9PZIdR6mtsnlDWXL8lI+aNzjC/FNHGf0BLatSvHDv90VXeg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=dxYlrNms; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AE197606A32D for ; Mon, 30 Nov 2026 13:43:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=dxYlrNms Received: by smtp.kernel.org (Postfix) with ESMTPSA id 58F601F000C1; Mon, 30 Nov 2026 13:43:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796046194; bh=MHi/nuO70+M4dwTB1rSnnwa65quIGrU7Wm9kbOtfG4c=; h=From:To:Cc:Subject:Date:Reply-To; b=dxYlrNmsSVhGJAOz6MxVcTusOFdOnupFzboQV/s0EwHmxuqJhpwzQL1BDkw+LqpsN 1LxVh3LSWChnZGG9QM17+nh0bZ27cuktCqlCqzDkSop8omOsFQvcp2cGDz3ab0c59N B2TDZvEw+IdmoZiIPtP/pb8AAnuQFMjpM5JCObFg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-138875: jbd2: don't advance j_fc_off before the buffer is recorded Date: Mon, 30 Nov 2026 14:26:20 +0100 Message-ID: <2026113030-CVE-2026-138875-e90a@gregkh> X-Mailer: git-send-email 2.56.1 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=5057; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=x52nhxLX0lXayojJNdCjRxgbO6/DrtJSSvhSfzH0dVw=; b=owGbwMvMwCRo6H6F97bub03G02pJDNm8lV6Zme+WrN2SUrenJffQ/oAQZaOs7y6uFzuNmO4t9 F74J6ajI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACZyLIRhfuHPRtVJM3/Vrpm6 +U3mWbWUP+cCDjDMz56X4LO63O9FRuIjiyW7pNOUu6QkAA== 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: jbd2: don't advance j_fc_off before the buffer is recorded jbd2_fc_get_buf() increments journal->j_fc_off before jbd2_journal_bmap() and __getblk() have had a chance to fail. When either does, the slot j_fc_wbuf[fc_off] is never assigned, but j_fc_off already counts it. ext4 then fails the fast commit and falls back, and the fallback path reaches jbd2_fc_release_bufs() via ext4_fc_commit -> jbd2_fc_end_commit_fallback -> __jbd2_fc_end_commit -> ext4_fc_cleanup. That walks down from j_fc_off - 1 and put_bh()es every slot until it sees NULL, so it also touches the slot that was never written. j_fc_wbuf comes from a plain kmalloc() and is never zeroed, so a slot used for the first time holds uninitialised heap data. Advance j_fc_off only after the buffer head has been stored. That restores the invariant that j_fc_off covers exactly the filled slots, which is what jbd2_fc_release_bufs() relies on: the live buffers of the current fast commit sit above the NULLs the previous one released, so stopping at the first NULL is correct. Reproduced on a KASAN kernel with an ext4 fast_commit filesystem on a loop device, truncating the backing file under the live mount so that only the journal's fast-commit region falls past the end of the device. __getblk() then fails for the first fast-commit block while the rest of the journal is still addressable, so the journal is not aborted and the fast commit reaches the fallback path. j_fc_wbuf was poisoned to make the read of the never-written slot visible: BUG: KASAN: wild-memory-access in jbd2_fc_release_bufs+0x6b/0xd0 Write of size 4 at addr 5a5a5a5a5a5a5ab2 by task sync/961 jbd2_fc_release_bufs+0x6b/0xd0 ext4_fc_cleanup+0x97/0x830 __jbd2_fc_end_commit+0x37/0xc0 ext4_fc_commit+0x524/0x560 ext4_sync_file+0x3c4/0x4b0 __x64_sys_fsync+0x20/0x30 With this patch the same run leaves j_fc_off at 0 across repeated __getblk() failures and completes cleanly. The Linux kernel CVE team has assigned CVE-2026-138875 to this issue. Affected and fixed versions =========================== Issue introduced in 5.10 with commit ff780b91efe901b8eecd8114785abae5341820ad and fixed in 5.10.275 with commit a24113bd984afc0b34a8fd2eb396791cfe511305 Issue introduced in 5.10 with commit ff780b91efe901b8eecd8114785abae5341820ad and fixed in 5.15.226 with commit 8b960600223b27487ab9f134e53ab71ecb1a1476 Issue introduced in 5.10 with commit ff780b91efe901b8eecd8114785abae5341820ad and fixed in 6.1.193 with commit 1ce33de62647f30bdef832e0fbe49de0c6b1bb12 Issue introduced in 5.10 with commit ff780b91efe901b8eecd8114785abae5341820ad and fixed in 6.6.163 with commit b55a8a037bed09b574771bc3c177131e21914c71 Issue introduced in 5.10 with commit ff780b91efe901b8eecd8114785abae5341820ad and fixed in 6.12.117 with commit 65185848035e2c6b8561c8afeb8ef0098fb18c21 Issue introduced in 5.10 with commit ff780b91efe901b8eecd8114785abae5341820ad and fixed in 6.18.63 with commit ab41325c105db07cebc9cd7ba2716a93b6946426 Issue introduced in 5.10 with commit ff780b91efe901b8eecd8114785abae5341820ad and fixed in 7.3.4 with commit 8c2401753d2ccad29807d249946f4b4482196f9b Issue introduced in 5.10 with commit ff780b91efe901b8eecd8114785abae5341820ad and fixed in 7.4-rc1 with commit 9f359c031885bb50add7d23c7a5a0e9755b134c9 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-138875 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/jbd2/journal.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/a24113bd984afc0b34a8fd2eb396791cfe511305 https://git.kernel.org/stable/c/8b960600223b27487ab9f134e53ab71ecb1a1476 https://git.kernel.org/stable/c/1ce33de62647f30bdef832e0fbe49de0c6b1bb12 https://git.kernel.org/stable/c/b55a8a037bed09b574771bc3c177131e21914c71 https://git.kernel.org/stable/c/65185848035e2c6b8561c8afeb8ef0098fb18c21 https://git.kernel.org/stable/c/ab41325c105db07cebc9cd7ba2716a93b6946426 https://git.kernel.org/stable/c/8c2401753d2ccad29807d249946f4b4482196f9b https://git.kernel.org/stable/c/9f359c031885bb50add7d23c7a5a0e9755b134c9