CVE-2026-138875
jbd2: don't advance j_fc_off before the buffer is recorded
Check your servers for CVE-2026-138875
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-138875 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Severity (CVSS)
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- Attack vector
- local: the attacker needs local access, or a user has to open a prepared file
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- none: the attacker does not need an account
- User interaction
- required: a user has to do something, such as open a link or a file
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.19%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 8.62% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from ff780b91efe901b8eecd8114785abae5341820ad, before a24113bd984afc0b34a8fd2eb396791cfe511305 affected from ff780b91efe901b8eecd8114785abae5341820ad, before 8b960600223b27487ab9f134e53ab71ecb1a1476 affected from ff780b91efe901b8eecd8114785abae5341820ad, before 1ce33de62647f30bdef832e0fbe49de0c6b1bb12 affected from ff780b91efe901b8eecd8114785abae5341820ad, before b55a8a037bed09b574771bc3c177131e21914c71 affected from ff780b91efe901b8eecd8114785abae5341820ad, before 65185848035e2c6b8561c8afeb8ef0098fb18c21 affected from ff780b91efe901b8eecd8114785abae5341820ad, before ab41325c105db07cebc9cd7ba2716a93b6946426 affected from ff780b91efe901b8eecd8114785abae5341820ad, before 8c2401753d2ccad29807d249946f4b4482196f9b affected from ff780b91efe901b8eecd8114785abae5341820ad, before 9f359c031885bb50add7d23c7a5a0e9755b134c9
Other versions: unaffected
|
| Linux |
affected 5.10 unaffected before 5.10 unaffected from 5.10.275 up to and including 5.10.* unaffected from 5.15.226 up to and including 5.15.* unaffected from 6.1.193 up to and including 6.1.* unaffected from 6.6.163 up to and including 6.6.* unaffected from 6.12.117 up to and including 6.12.* unaffected from 6.18.63 up to and including 6.18.* unaffected from 7.3.4 up to and including 7.3.* unaffected 7.4-rc1 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-138875 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-138875
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-138875
trivy image --scanners vuln IMAGE | grep CVE-2026-138875
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/a24113bd984afc0b34a8fd2eb396791cfe511305 git.kernel.org
- https://git.kernel.org/stable/c/8b960600223b27487ab9f134e53ab71ecb1a1476 git.kernel.org
- https://git.kernel.org/stable/c/1ce33de62647f30bdef832e0fbe49de0c6b1bb12 git.kernel.org
- https://git.kernel.org/stable/c/b55a8a037bed09b574771bc3c177131e21914c71 git.kernel.org
- https://git.kernel.org/stable/c/65185848035e2c6b8561c8afeb8ef0098fb18c21 git.kernel.org
- https://git.kernel.org/stable/c/ab41325c105db07cebc9cd7ba2716a93b6946426 git.kernel.org
- https://git.kernel.org/stable/c/8c2401753d2ccad29807d249946f4b4482196f9b git.kernel.org
- https://git.kernel.org/stable/c/9f359c031885bb50add7d23c7a5a0e9755b134c9 git.kernel.org
Source: the record CVE-2026-138875 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse