CVE-2026-139333
btrfs: update the inode item when removing a free space inode
Check your servers for CVE-2026-139333
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-139333 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:
btrfs: update the inode item when removing a free space inode
btrfs_remove_free_space_inode() adds an orphan item for the free space inode and clears its link count in memory, but never writes the inode item. The item is only removed once the delayed iput evicts the inode, which happens in a later transaction, from the cleaner thread or a throttled transaction end.
If we crash in between, or if evict can't reserve space for the truncation and leaves the orphan item for the next mount, the on-disk inode still has a link count of 1. btrfs_orphan_cleanup() then treats it as an inode with links and only deletes the orphan item. The free space header item is already gone at that point, so nothing ever finds the inode again, and its data extents are leaked.
Write the zero link count to the inode item in the same transaction as the orphan item, so the orphan cleanup evicts the inode instead. Account for the extra tree root item update when removing a block group.
Exploitation
EPSS 0.20%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 10.4% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 455757c322cc0a0f2a692c5625dd88aaf6a7b889, before 36bc2d3b07f8e0818ad5be80bfcb869b5d34e112 affected from 455757c322cc0a0f2a692c5625dd88aaf6a7b889, before 53e6ca355cbce4fedb0f2cdd70efb7944e844562 affected from 455757c322cc0a0f2a692c5625dd88aaf6a7b889, before b70c83b83cb651413f2215822c3e5def884d6b05 affected from 455757c322cc0a0f2a692c5625dd88aaf6a7b889, before 4e89aff9ad6fcbec555c38169807c4023f93450f
Other versions: unaffected
|
| Linux |
affected 3.2 unaffected before 3.2 unaffected from 6.12.119 up to and including 6.12.* unaffected from 6.18.65 up to and including 6.18.* unaffected from 7.3.6 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-139333 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-139333
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-139333
trivy image --scanners vuln IMAGE | grep CVE-2026-139333
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/36bc2d3b07f8e0818ad5be80bfcb869b5d34e112 git.kernel.org
- https://git.kernel.org/stable/c/53e6ca355cbce4fedb0f2cdd70efb7944e844562 git.kernel.org
- https://git.kernel.org/stable/c/b70c83b83cb651413f2215822c3e5def884d6b05 git.kernel.org
- https://git.kernel.org/stable/c/4e89aff9ad6fcbec555c38169807c4023f93450f git.kernel.org
Source: the record CVE-2026-139333 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