CVE-2025-37856

Source
https://cve.org/CVERecord?id=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
2026-03-20T12:42:30.898846Z
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
a9f189716cf15913c453299d72f69c51a9b0f86b
Fixed
bf089c4d1141b27332c092b1dcca5022c415a3b6
Fixed
909e60fb469d4101c6b08cf6e622efb062bb24a1
Fixed
185fd73e5ac06027c4be9a129e59193f6a3ef202
Fixed
7511e29cf1355b2c47d0effb39e463119913e2f6
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
edf3b5aadb2515c808200b904baa5b70a727f0ac
Last affected
01eca70ef8cf499d0cb6d1bbd691558e7792cf17
Last affected
5d19abcffd8404078dfa7d7118cec357b5e7bc58

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-37856.json"