CVE-2025-22115: btrfs: fix block group refcount race in btrfs_create_pending_block_groups()
Noroxi assessment
Priority: Monitor (action score 18/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.17% (FIRST EPSS).
- Someone with local access to the system can trigger it. A low-privileged account is enough. No user action is required. Special conditions such as timing or configuration are required.
- Fixed version: Linux Linux 2d8e5168d48a91e7a802d3003e72afb4304bebfa, 6.2, 6.5.
- Severity is disputed: the assigning authority (CNA) scores it 7.8, NVD 4.7.
Low priority for now. Upgrade to Linux Linux 2d8e5168d48a91e7a802d3003e72afb4304bebfa, 6.2, 6.5 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: fix block group refcount race in btrfs_create_pending_block_groups() Block group creation is done in two phases, which results in a slightly unintuitive property: a block group can be allocated/deallocated from after btrfs_make_block_group() adds it to the space_info with btrfs_add_bg_to_space_info(), but before creation is completely completed in btrfs_create_pending_block_groups(). As a result, it is possible for a block group to go unused and have 'btrfs_mark_bg_unused' called on it concurrently with 'btrfs_create_pending_block_groups'. This causes a number of issues, which were fixed with the block group flag 'BLOCK_GROUP_FLAG_NEW'. However, this fix is not quite complete. Since it does not use the unused_bg_lock, it is possible for the following race to occur: btrfs_create_pending_block_groups btrfs_mark_bg_unused if list_empty // false list_del_init clear_bit else if (test_bit) // true list_move_tail And we get into the exact same broken ref count and invalid new_bgs state for transaction cleanup that BLOCK_GROUP_FLAG_NEW was designed to prevent. The broken refcount aspect will result in a warning like: [1272.943527] refcount_t: underflow; use-after-free. [1272.943967] WARNING: CPU: 1 PID: 61 at lib/refcount.c:28 refcount_warn_saturate+0xba/0x110 [1272.944731] Modules linked in: btrfs virtio_net xor zstd_compress raid6_pq null_blk [last unloaded: btrfs] [1272.945550] CPU: 1 UID: 0 PID: 61 Comm: kworker/u32:1 Kdump: loaded Tainted: G W 6.14.0-rc5+ #108 [1272.946368] Tainted: [W]=WARN [1272.946585] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Arch Linux 1.16.3-1-1 04/01/2014 [1272.947273] Workqueue: btrfs_discard btrfs_discard_workfn [btrfs] [1272.947788] RIP: 0010:refcount_warn_saturate+0xba/0x110 [1272.949532] RSP: 0018:ffffbf1200247df0 EFLAGS: 00010282 [1272.949901] RAX: 0000000000000000 RBX: ffffa14b00e3f800 RCX: 0000000000000000 [1272.950437] RDX: 0000000000000000 RSI: ffffbf1200247c78 RDI: 00000000ffffdfff [1272.950986] RBP: ffffa14b00dc2860 R08: 00000000ffffdfff R09: ffffffff90526268 [1272.951512] R10: ffffffff904762c0 R11: 0000000063666572 R12: ffffa14b00dc28c0 [1272.952024] R13: 0000000000000000 R14: ffffa14b00dc2868 R15: 000001285dcd12c0 [1272.952850] FS: 0000000000000000(0000) GS:ffffa14d33c40000(0000) knlGS:0000000000000000 [1272.953458] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [1272.953931] CR2: 00007f838cbda000 CR3: 000000010104e000 CR4: 00000000000006f0 [1272.954474] Call Trace: [1272.954655] <TASK> [1272.954812] ? refcount_warn_saturate+0xba/0x110 [1272.955173] ? __warn.cold+0x93/0xd7 [1272.955487] ? refcount_warn_saturate+0xba/0x110 [1272.955816] ? report_bug+0xe7/0x120 [1272.956103] ? handle_bug+0x53/0x90 [1272.956424] ? exc_invalid_op+0x13/0x60 [1272.956700] ? asm_exc_invalid_op+0x16/0x20 [1272.957011] ? refcount_warn_saturate+0xba/0x110 [1272.957399] btrfs_discard_cancel_work.cold+0x26/0x2b [btrfs] [1272.957853] btrfs_put_block_group.cold+0x5d/0x8e [btrfs] [1272.958289] btrfs_discard_workfn+0x194/0x380 [btrfs] [1272.958729] process_one_work+0x130/0x290 [1272.959026] worker_thread+0x2ea/0x420 [1272.959335] ? __pfx_worker_thread+0x10/0x10 [1272.959644] kthread+0xd7/0x1c0 [1272.959872] ? __pfx_kthread+0x10/0x10 [1272.960172] ret_from_fork+0x30/0x50 [1272.960474] ? __pfx_kthread+0x10/0x10 [1272.960745] ret_from_fork_asm+0x1a/0x30 [1272.961035] </TASK> [1272.961238] ---[ end trace 0000000000000000 ]--- Though we have seen them in the async discard workfn as well. It is most likely to happen after a relocation finishes which cancels discard, tears down the block group, etc. Fix this fully by taking the lock arou ---truncated---
- BDU:2026-04366
- DSA-5975-1
- SUSE-SU-2025:02385-1
- SUSE-SU-2025:02387-1
- SUSE-SU-2025:02388-1
- SUSE-SU-2025:02389-1
- SUSE-SU-2025:02390-1
- SUSE-SU-2025:02405-1
- SUSE-SU-2025:02411-1
- SUSE-SU-2025:02412-1
- SUSE-SU-2025:02413-1
- SUSE-SU-2025:02420-1
- SUSE-SU-2025:02421-1
- SUSE-SU-2025:02433-1
- SUSE-SU-2025:02439-1
- SUSE-SU-2025:02440-1
- SUSE-SU-2025:02442-1
- SUSE-SU-2025:02449-1
- SUSE-SU-2025:02514-1
- SUSE-SU-2025:20517-1
- Published
- Apr 16, 2025
- Updated
- Oct 21, 2026
- EPSS
- 0.1% · 7th percentile
- CWE
- CWE-362
Report tools
Action score
18
Monitor
Low priority for now.
- CVSS
- 18 / 40 · 4.7 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.1%
CNA vs NVD score
- NVD
- 4.7
- CNA · Linux
- 7.8
- 3.1 point gap
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
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.
Running WordPress? Scan your site free with WP Lens
Noroxi 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 |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- linux linux kernel6.1.47 and later · before 6.2
- linux linux kernel6.4.12 and later · before 6.5
- linux linux kernel6.5.1 and later · before 6.12.40
- linux linux kernel6.13 and later · before 6.14.2
- linux linux kernel6.5
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
- 6297644db23f77c02ae7961cc542d162629ae2c4, 7569c4294ba6ff9f194635b14876198f8a687c4a, 6.5affected
- 0657b20c5a76c938612f8409735a8830d257866e and later · before 77fd40b7ed0c3acf989a0f2a07b15a0a59ea8f96affected · git
- 0657b20c5a76c938612f8409735a8830d257866e and later · before ee56da95f8962b86fec4ef93f866e64c8d025a58affected · git
- 0657b20c5a76c938612f8409735a8830d257866e and later · before 9d383a6fc59271aaaf07a33b23b2eac5b9268b7aaffected · git
- 0657b20c5a76c938612f8409735a8830d257866e and later · before 2d8e5168d48a91e7a802d3003e72afb4304bebfaaffected · git
- 6.1.47 and later · before 6.2affected · semver
- 6.4.12 and later · before 6.5affected · semver
- before 6.5not affected · semver
- 6.6.160 and later · up to and including 6.6.*not affected · semver
- 6.12.40 and later · up to and including 6.12.*not affected · semver
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 | from 0 | — |
| Debian:13 | linux | before 6.12.41-1 | 6.12.41-1 |
| Debian:14 | linux | before 6.16.3-1 | 6.16.3-1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6_Update_0 | before 19-150600.4.49.1 | 19-150600.4.49.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6_Update_10 | before 2-150600.2.1 | 2-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6_Update_4 | before 13-150600.2.1 | 13-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6_Update_6 | before 8-150600.2.1 | 8-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6_Update_7 | before 8-150600.2.1 | 8-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6_Update_9 | before 3-150600.2.1 | 3-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_0 | before 18-150600.3.1 | 18-150600.3.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_1 | before 17-150600.2.1 | 17-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_10 | before 2-150600.2.1 | 2-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_2 | before 13-150600.2.1 | 13-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_3 | before 13-150600.2.1 | 13-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_4 | before 12-150600.2.1 | 12-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_5 | before 11-150600.2.1 | 11-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_6 | before 8-150600.2.1 | 8-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_7 | before 8-150600.2.1 | 8-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_8 | before 3-150600.2.1 | 3-150600.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_9 | before 3-150600.2.1 | 3-150600.2.1 |
| SUSE:Linux Micro 6.0 | kernel-livepatch-MICRO-6-0_Update_2 | before 8-1.1 | 8-1.1 |
| SUSE:Linux Micro 6.0 | kernel-livepatch-MICRO-6-0_Update_3 | before 8-1.2 | 8-1.2 |
| SUSE:Linux Micro 6.0 | kernel-livepatch-MICRO-6-0_Update_4 | before 6-1.2 | 6-1.2 |
| SUSE:Linux Micro 6.0 | kernel-livepatch-MICRO-6-0_Update_5 | before 4-1.2 | 4-1.2 |
+7
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-2025-22111Apr 16, 2025 · net: Remove RTNL dance for SIOCBRADDIF and SIOCBRDELIF.22Monitor
- ← EarlierCVE-2025-22113Apr 16, 2025 · ext4: avoid journaling sb update on error if journal is destroying22Monitor
- Later →CVE-2025-22117Apr 16, 2025 · ice: fix using untrusted value of pkt_len in ice_vc_fdir_parse_raw()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 | 2d8e5168d48a91e7a802d3003e72afb4304bebfa | Vendor (CNA) |
| Linux Linux | 6.2 | Vendor (CNA) |
| Linux Linux | 6.5 | Vendor (CNA) |
| Linux Linux | 77fd40b7ed0c3acf989a0f2a07b15a0a59ea8f96 | Vendor (CNA) |
| Linux Linux | 9d383a6fc59271aaaf07a33b23b2eac5b9268b7a | Vendor (CNA) |
| Linux Linux | ee56da95f8962b86fec4ef93f866e64c8d025a58 | Vendor (CNA) |
| debian:linux | 6.12.41-1 · Debian:13 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP6_Update_6 | 8-150600.2.1 · SUSE:Linux Enterprise Live Patching 15 SP6 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP6_Update_7 | 8-150600.2.1 · SUSE:Linux Enterprise Live Patching 15 SP6 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP6-RT_Update_0 | 18-150600.3.1 · SUSE:Linux Enterprise Live Patching 15 SP6 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP6-RT_Update_1 | 17-150600.2.1 · SUSE:Linux Enterprise Live Patching 15 SP6 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP6-RT_Update_2 | 13-150600.2.1 · SUSE:Linux Enterprise Live Patching 15 SP6 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP6-RT_Update_3 | 13-150600.2.1 · SUSE:Linux Enterprise Live Patching 15 SP6 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP6-RT_Update_4 | 12-150600.2.1 · SUSE:Linux Enterprise Live Patching 15 SP6 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP6-RT_Update_5 | 11-150600.2.1 · SUSE:Linux Enterprise Live Patching 15 SP6 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP6-RT_Update_6 | 8-150600.2.1 · SUSE:Linux Enterprise Live Patching 15 SP6 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP6-RT_Update_7 | 8-150600.2.1 · SUSE:Linux Enterprise Live Patching 15 SP6 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP6-RT_Update_8 | 3-150600.2.1 · SUSE:Linux Enterprise Live Patching 15 SP6 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP6-RT_Update_9 | 3-150600.2.1 · SUSE:Linux Enterprise Live Patching 15 SP6 | 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.
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
No commit or PR link among the references.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
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.
- Special conditions such as timing or configuration are required.
If successful
- Confidentiality
- none
- Integrity
- none
- Availability
- high · the service can be disrupted
- Attack vector
- Local
- Attack complexity
- High
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- None
- Integrity impact
- None
- Availability impact
- High
Weakness class (CWE)
CWE-362 · Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')CVSS vector
CVSS:3.1/AV:L/AC:H/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.
Attack patterns (CAPEC)
ATT&CK techniques
—
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (3 more)Show less
Vendor advisories and official records. Exploit/PoC links are deliberately left out.