CVE-2026-138875

jbd2: don't advance j_fc_off before the buffer is recorded

Published Nov 30, 2026 CVSS 3.1 · 4.7 Medium EPSS n/a KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The flaw occurs in the Linux kernel’s journal’s fast‑commit mechanism. When a buffer is not successfully allocated, the counter that tracks committed buffers is advanced before the buffer is stored. During the subsequent cleanup, the kernel walks the buffer list assuming every entry is valid. It reaches an entry that was never written, reads uninitialized heap memory, and writes through a dangling pointer, which results in a KASAN‑reported wild memory access and typically kernel panic. The vulnerability allows an attacker who can trigger a fast‑commit path with a faulty allocation—such as a local user truncating a backing file on a loop‑back device—to cause an out‑of‑bounds memory read and write, leading to denial of service. Affected systems Linux kernel versions that contain the old fast‑commit code are affected. This includes all mainstream releases lacking the patch referenced in the commit list. Any system running a kernel where the ext4 filesystem is mounted and the fast‑commit mechanism is enabled is vulnerable. The CVE’s references point to the kernel commit that introduces the fix. Risk and exploitability No CVSS score is publicly available, and EPSS is not published for this CVE, so a quantitative risk assessment cannot be provided. The issue is classified as a memory corruption flaw (CWE‑758) that can crash the kernel from a local context. Although there is no documented remote exploit, a privileged or local user who can manipulate a filesystem that uses fast‑commit may trigger the bug. The lack of a KEV listing suggests it has not yet been widely exploited, but the potential for denial of service remains.

Affected Systems

Linux kernel versions before the inclusion of commit 1ce33de62647f30bdef832e0fbe49de0c6b1bb12 and 65185848035e2c6b8561c8afeb8ef0098fb18c21 are affected. End‑users should verify that their distribution’s kernel package contains the jbd2 fast‑commit fix. All distributions that ship a kernel older than the patch release remain vulnerable.

Risk and Exploitability

The flaw is a classic uninitialized memory use (CWE‑758). An attacker with local access and the ability to trigger a fast‑commit on a filesystem that can be truncated will cause a wild memory access, leading to a kernel crash. The exact probability of exploitation is unknown; no EPSS score is provided. The issue is not listed in the CISA Known Exploited Vulnerabilities database, indicating no confirmed exploitation yet. Nevertheless, the local nature of the exploit and the severity of a kernel panic justify prompt remediation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the Linux kernel to a version that includes the referenced fix commits.
  • Reboot the system after updating to ensure the new kernel is in use.
  • When possible, avoid using the ext4 fast‑commit feature on loop‑back devices or truncate backing files while the filesystem is mounted, as this is the condition that triggers the fault.

Generated by OpenCVE AI on November 30, 2026 at 17:48 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-824
References
Metrics threat_severity

None

cvssV3_1

{'score': 4.7, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate

Type Values Removed Values Added
First Time appeared Linux linux
Vendors & Products Linux linux
Type Values Removed Values Added
Weaknesses CWE-758
Type Values Removed Values Added
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.
Title jbd2: don't advance j_fc_off before the buffer is recorded
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-758

    Reliance on Undefined, Unspecified, or Implementation-Defined Behavior

  • CWE-824

    Access of Uninitialized Pointer

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:25 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:17 PM
Modified
Nov 30, 2026, 2:17 PM
Severity
Moderate
Public date
Nov 30, 2026, 1:25 PM