# CVE-2026-139333: btrfs: update the inode item when removing a free space inode

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.20%, higher than 10% of CVEs (2026-12-01)
- Published: 2026-11-30T13:33:47.556Z
- Modified: 2026-11-30T14:18:58.020Z
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from 455757c322cc0a0f2a692c5625dd88aaf6a7b889 before 36bc2d3b07f8e0818ad5be80bfcb869b5d34e112; from 455757c322cc0a0f2a692c5625dd88aaf6a7b889 before 53e6ca355cbce4fedb0f2cdd70efb7944e844562; from 455757c322cc0a0f2a692c5625dd88aaf6a7b889 before b70c83b83cb651413f2215822c3e5def884d6b05; from 455757c322cc0a0f2a692c5625dd88aaf6a7b889 before 4e89aff9ad6fcbec555c38169807c4023f93450f; 3.2 (not affected: before 3.2; from 6.12.119 up to 6.12.*; from 6.18.65 up to 6.18.*; from 7.3.6 up to 7.3.*; from 7.4-rc1 up to *)

## References

- <https://git.kernel.org/stable/c/36bc2d3b07f8e0818ad5be80bfcb869b5d34e112>
- <https://git.kernel.org/stable/c/53e6ca355cbce4fedb0f2cdd70efb7944e844562>
- <https://git.kernel.org/stable/c/b70c83b83cb651413f2215822c3e5def884d6b05>
- <https://git.kernel.org/stable/c/4e89aff9ad6fcbec555c38169807c4023f93450f>

## Sources

- CVE List: [CVE-2026-139333](https://www.cve.org/CVERecord?id=CVE-2026-139333), CVE Terms of Use, modified 2026-11-30
- NVD: [CVE-2026-139333](https://nvd.nist.gov/vuln/detail/CVE-2026-139333), Public domain, modified 2026-11-30

---

Page: https://cve.day/CVE-2026-139333 · Whole record: https://cve.day/CVE-2026-139333.json · Rebuilt by cve.day 2026-11-30T14:32:56.583Z
