CVE-2025-37856

Source
https://nvd.nist.gov/vuln/detail/CVE-2025-37856
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-37856.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-37856
Downstream
Related
Published
2025-05-09T06:42:04.315Z
Modified
2025-11-28T02:34:17.298949Z
Summary
btrfs: harden block_group::bg_list against list_del() races
Details

In the Linux kernel, the following vulnerability has been resolved:

btrfs: harden blockgroup::bglist against list_del() races

As far as I can tell, these calls of listdelinit() on bglist cannot run concurrently with btrfsmarkbgunused() or btrfsmarkbgtoreclaim(), as they are in transaction error paths and situations where the block group is readonly.

However, if there is any chance at all of racing with markbgunused(), or a different future user of bg_list, better to be safe than sorry.

Otherwise we risk the following interleaving (bg_list refcount in parens)

T1 (some random op) T2 (btrfsmarkbgunused) !listempty(&bg->bglist); (1) listdelinit(&bg->bglist); (1) listmovetail (1) btrfsputblockgroup (0) btrfsdeleteunusedbgs bg = listfirstentry listdelinit(&bg->bglist); btrfsputblockgroup(bg); (-1)

Ultimately, this results in a broken ref count that hits zero one deref early and the real final deref underflows the refcount, resulting in a WARNING.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/37xxx/CVE-2025-37856.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Fixed
bf089c4d1141b27332c092b1dcca5022c415a3b6
Fixed
909e60fb469d4101c6b08cf6e622efb062bb24a1
Fixed
185fd73e5ac06027c4be9a129e59193f6a3ef202
Fixed
7511e29cf1355b2c47d0effb39e463119913e2f6

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
6.12.24
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.13.12
Type
ECOSYSTEM
Events
Introduced
6.14.0
Fixed
6.14.3