CVE-2026-31519: btrfs: set BTRFS_ROOT_ORPHAN_CLEANUP during subvol create
Noroxi assessment
Priority: Monitor (action score 22/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 0.12% (FIRST EPSS).
- Someone with local access to the system can trigger it. A low-privileged account is enough. No user action is required. No special conditions are required; it is repeatable.
- Fixed version: Linux Linux 2.6.33, 2ec578e6452138ab76f6c9a9c18711fcd197649f, 5131fa077f9bb386a1b901bf5b247041f0ec8f80; azl3 kernel 6.6.130.1-3 on Azure Linux 3.0 6.6.134.1-2; cbl2 kernel 5.15.202.1-1 on CBL-Mariner 2.0 Release Notes.
Low priority for now. Upgrade to Linux Linux 2.6.33, 2ec578e6452138ab76f6c9a9c18711fcd197649f, 5131fa077f9bb386a1b901bf5b247041f0ec8f80; azl3 kernel 6.6.130.1-3 on Azure Linux 3.0 6.6.134.1-2; cbl2 kernel 5.15.202.1-1 on CBL-Mariner 2.0 Release Notes or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
In the Linux kernel, the following vulnerability has been resolved: btrfs: set BTRFS_ROOT_ORPHAN_CLEANUP during subvol create We have recently observed a number of subvolumes with broken dentries. ls-ing the parent dir looks like: drwxrwxrwt 1 root root 16 Jan 23 16:49 . drwxr-xr-x 1 root root 24 Jan 23 16:48 .. d????????? ? ? ? ? ? broken_subvol and similarly stat-ing the file fails. In this state, deleting the subvol fails with ENOENT, but attempting to create a new file or subvol over it errors out with EEXIST and even aborts the fs. Which leaves us a bit stuck. dmesg contains a single notable error message reading: "could not do orphan cleanup -2" 2 is ENOENT and the error comes from the failure handling path of btrfs_orphan_cleanup(), with the stack leading back up to btrfs_lookup(). btrfs_lookup btrfs_lookup_dentry btrfs_orphan_cleanup // prints that message and returns -ENOENT After some detailed inspection of the internal state, it became clear that: - there are no orphan items for the subvol - the subvol is otherwise healthy looking, it is not half-deleted or anything, there is no drop progress, etc. - the subvol was created a while ago and does the meaningful first btrfs_orphan_cleanup() call that sets BTRFS_ROOT_ORPHAN_CLEANUP much later. - after btrfs_orphan_cleanup() fails, btrfs_lookup_dentry() returns -ENOENT, which results in a negative dentry for the subvolume via d_splice_alias(NULL, dentry), leading to the observed behavior. The bug can be mitigated by dropping the dentry cache, at which point we can successfully delete the subvolume if we want. i.e., btrfs_lookup() btrfs_lookup_dentry() if (!sb_rdonly(inode->vfs_inode)->vfs_inode) btrfs_orphan_cleanup(sub_root) test_and_set_bit(BTRFS_ROOT_ORPHAN_CLEANUP) btrfs_search_slot() // finds orphan item for inode N ... prints "could not do orphan cleanup -2" if (inode == ERR_PTR(-ENOENT)) inode = NULL; return d_splice_alias(NULL, dentry) // NEGATIVE DENTRY for valid subvolume btrfs_orphan_cleanup() does test_and_set_bit(BTRFS_ROOT_ORPHAN_CLEANUP) on the root when it runs, so it cannot run more than once on a given root, so something else must run concurrently. However, the obvious routes to deleting an orphan when nlinks goes to 0 should not be able to run without first doing a lookup into the subvolume, which should run btrfs_orphan_cleanup() and set the bit. The final important observation is that create_subvol() calls d_instantiate_new() but does not set BTRFS_ROOT_ORPHAN_CLEANUP, so if the dentry cache gets dropped, the next lookup into the subvolume will make a real call into btrfs_orphan_cleanup() for the first time. This opens up the possibility of concurrently deleting the inode/orphan items but most typical evict() paths will be holding a reference on the parent dentry (child dentry holds parent->d_lockref.count via dget in d_alloc(), released in __dentry_kill()) and prevent the parent from being removed from the dentry cache. The one exception is delayed iputs. Ordered extent creation calls igrab() on the inode. If the file is unlinked and closed while those refs are held, iput() in __dentry_kill() decrements i_count but does not trigger eviction (i_count > 0). The child dentry is freed and the subvol dentry's d_lockref.count drops to 0, making it evictable while the inode is still alive. Since there are two races (the race between writeback and unlink and the race between lookup and delayed iputs), and there are too many moving parts, the following three diagrams show the complete picture. (Only the second and third are races) Phase 1: Create Subvol in dentry cache without BTRFS_ROOT_ORPHAN_CLEANUP set btrfs_mksubvol() lookup_one_len() __lookup_slow() d_alloc_parallel() __d_alloc() // d_lockref.count = 1 create_subvol(dentry) // doesn't touch the bit.. d_instantiate_new(dentry, inode) // dentry in cache with d_lockref.c ---truncated---
- Published
- Apr 22, 2026
- Updated
- Nov 11, 2026
- EPSS
- 0.1% · 2th percentile
- CWE
- CWE-476
Report tools
Action score
22
Low priority for now.
- CVSS
- 22 / 40 · 5.5 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.1%
CISA SSVC decision
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
Vulnrichment: CISA's decision-tree inputs.
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| linux | linux kernel | cpe:2.3:o:linux:linux_kernel |
Versions reported by the vendor
Affected version ranges reported by the assigning authority (Linux). Independent of NVD's CPE analysis and usually ahead of it.
Linux Linux
- c4ba0bd9db5e8fd2664be0fd4ec01335fe3268eb, 2.6.33affected
- c71bf099abddf3e0fdc27f251ba76fca1461d49a and later · before d43da8de0ed376abafbad8a245a1835e8f66cb0faffected · git
- c71bf099abddf3e0fdc27f251ba76fca1461d49a and later · before c57276ced3c3207f42182dfa2f0d8e860357e111affected · git
- c71bf099abddf3e0fdc27f251ba76fca1461d49a and later · before a41a9b8d19a98b45591528c6e54d31cc66271d1eaffected · git
- c71bf099abddf3e0fdc27f251ba76fca1461d49a and later · before 2ec578e6452138ab76f6c9a9c18711fcd197649faffected · git
- c71bf099abddf3e0fdc27f251ba76fca1461d49a and later · before 696683f214495db3cdacab9a713efaaced8660f8affected · git
- c71bf099abddf3e0fdc27f251ba76fca1461d49a and later · before 5131fa077f9bb386a1b901bf5b247041f0ec8f80affected · git
- 2.6.32.19 and later · before 2.6.33affected · semver
- before 2.6.33not affected · semver
- 6.1.168 and later · up to and including 6.1.*not affected · semver
Affected versions · NVD (7)
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- linux linux kernel2.6.32.19 and later · before 2.6.33
- linux linux kernel2.6.33 and later · before 6.1.168
- linux linux kernel6.2 and later · before 6.6.131
- linux linux kernel6.7 and later · before 6.12.80
- linux linux kernel6.13 and later · before 6.18.21
- linux linux kernel6.19 and later · before 6.19.11
- linux linux kernel7.0
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Debian:12 | linux | before 6.1.170-1 | 6.1.170-1 |
| Debian:13 | linux | before 6.12.85-1 | 6.12.85-1 |
| Debian:14 | linux | before 6.19.11-1 | 6.19.11-1 |
Same product
linux: all recordsOther highest-scoring records for the same primary product.
- CVE-2026-31431crypto: algif_aead - Revert to operating out-of-placeKEV90Now
- CVE-2022-0847A flaw was found in the way the "flags" member of the new pipe buffer structure was lacking proper initialization in copy_page_to_iter_pipe…KEV89Now
- CVE-2021-22555Heap Out-Of-Bounds Write in Netfilter IP6T_SO_SET_REPLACEKEV85Now
Published before and after this one in the same product
- ← EarlierCVE-2026-31517Apr 22, 2026 · xfrm: iptfs: fix skb_put() panic on non-linear skb during reassembly22Monitor
- ← EarlierCVE-2026-31518Apr 22, 2026 · esp: fix skb leak with espintcp and async crypto22Monitor
- Later →CVE-2026-31520Apr 22, 2026 · HID: apple: avoid memory leak in apple_report_fixup()22Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| Linux Linux | 2.6.33 | Vendor (CNA) |
| Linux Linux | 2ec578e6452138ab76f6c9a9c18711fcd197649f | Vendor (CNA) |
| Linux Linux | 5131fa077f9bb386a1b901bf5b247041f0ec8f80 | Vendor (CNA) |
| Linux Linux | 696683f214495db3cdacab9a713efaaced8660f8 | Vendor (CNA) |
| Linux Linux | a41a9b8d19a98b45591528c6e54d31cc66271d1e | Vendor (CNA) |
| Linux Linux | c57276ced3c3207f42182dfa2f0d8e860357e111 | Vendor (CNA) |
| Linux Linux | d43da8de0ed376abafbad8a245a1835e8f66cb0f | Vendor (CNA) |
| azl3 kernel 6.6.130.1-3 on Azure Linux 3.0 | 6.6.134.1-2 · CBL-Mariner Releases | Microsoft (MSRC) |
| cbl2 kernel 5.15.202.1-1 on CBL-Mariner 2.0 | Release Notes | Microsoft (MSRC) |
| debian:linux | 6.1.170-1 · Debian:12 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
Not on record for this CVE: EPSS history · patch commit or PR link · researcher credit · variant or chain candidate · public bounty program.
Technical details
Attack conditions
- Someone with local access to the system can trigger it.
- A low-privileged account is enough.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- none
- Integrity
- none
- Availability
- high · the service can be disrupted
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- None
- Integrity impact
- None
- Availability impact
- High
Weakness class (CWE)
CWE-476 · NULL Pointer DereferenceCVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
MITRE has no CAPEC/ATT&CK mapping for this CWE.
Change log (2)
- SSVC exploitation— → none
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (5 more)Show less
- git.kernel.org/stable/c/5131fa077f9bb386a1b901bf5b247041f0ec8f80
- git.kernel.org/stable/c/696683f214495db3cdacab9a713efaaced8660f8
- git.kernel.org/stable/c/a41a9b8d19a98b45591528c6e54d31cc66271d1e
- git.kernel.org/stable/c/c57276ced3c3207f42182dfa2f0d8e860357e111
- git.kernel.org/stable/c/d43da8de0ed376abafbad8a245a1835e8f66cb0f
Vendor advisories and official records. Exploit/PoC links are deliberately left out.