GHSA-WPW6-8CM9-72WV
Vulnerability from github – Published: 2026-09-24 18:31 – Updated: 2026-09-24 18:31In the Linux kernel, the following vulnerability has been resolved:
btrfs: fix use-after-free on reloc root after error in insert_dirty_subvol()
If during relocation we fail in insert_dirty_subvol() because btrfs_update_reloc_root() returned an error, we will leave a root's reloc_root field pointing to a reloc root that was freed instead of NULL, resulting later in a use-after-free, or double free attempt during unmount.
The sequence of steps is this:
1) During relocation the call to btrfs_update_reloc_root() in insert_dirty_subvol() fails, so insert_dirty_subvol() returns the error to merge_reloc_root() without adding the root to the list rc->dirty_subvol_roots;
2) Then merge_reloc_root() aborts the current transaction because insert_dirty_subvol() returned an error;
3) Up the call chain, merge_reloc_roots() gets the error, adds the reloc root for root X to the local reloc_roots list and jumps to the 'out' label, where it calls free_reloc_roots() to free all the reloc roots in the local reloc_roots list. This frees the reloc root for root X;
4) We go up the call chain to relocate_block_group() which calls clean_dirty_subvols() to go over dirty roots and set their ->reloc_root field to NULL, but root X is not in the dirty_subvol_roots list, so its ->reloc_root still points to a reloc root;
5) Relocation finishes, with an error and a transaction abort, but the ->reloc_root field for root X still points to the reloc root that was freed in step 3;
6) When unmounting the fs we end up calling:
btrfs_free_fs_roots()
btrfs_drop_and_free_fs_root()
--> calls btrfs_put_root() against root X's ->reloc_root
which is not NULL and points to the already freed
reloc root in step 4 above
Resulting in a use-after-free to a double free attempt.
Syzbot reported this with the following dmesg/syslog:
[ 106.004389][ T5339] BTRFS error (device loop0 state A): Transaction aborted (error -5) [ 106.014266][ T5339] BTRFS: error (device loop0 state A) in merge_reloc_root:1655: errno=-5 IO failure [ 106.021891][ T1061] BTRFS error (device loop0 state A): error while writing out transaction: -5 [ 106.026964][ T1061] BTRFS warning (device loop0 state A): Skipping commit of aborted transaction. [ 106.033807][ T5340] BTRFS error (device loop0 state A): bdev /dev/loop0 errs: wr 3, rd 0, flush 0, corrupt 0, gen 0 [ 106.039265][ T1061] BTRFS: error (device loop0 state A) in cleanup_transaction:2067: errno=-5 IO failure [ 106.044382][ T5339] BTRFS info (device loop0 state EA): forced readonly [ 106.074329][ T5339] BTRFS: error (device loop0 state EA) in merge_reloc_roots:1887: errno=-5 IO failure [ 106.081004][ T5356] BTRFS info (device loop0 state EA): scrub: started on devid 1 [ 106.085611][ T5339] BTRFS info (device loop0 state EA): balance: ended with status: -30 [ 106.089517][ T5356] BTRFS info (device loop0 state EA): scrub: not finished on devid 1 with status: -30 [ 106.662365][ T5338] BTRFS info (device loop0 state EA): last unmount of filesystem 3a375e4e-b156-4d76-a2ad-16e198ce1409 [ 106.682946][ T5338] ================================================================== [ 106.686574][ T5338] BUG: KASAN: slab-use-after-free in btrfs_put_root+0x2f/0x250 [ 106.690090][ T5338] Write of size 4 at addr ffff88803f978630 by task syz.0.0/5338 [ 106.693173][ T5338] [ 106.694279][ T5338] CPU: 0 UID: 0 PID: 5338 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 106.694293][ T5338] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 106.694300][ T5338] Call Trace: [ 106.694308][ T5338] [ 106.694314][ T5338] dump_stack_lvl+0xe8/0x150 [ 106.694331][ T5338] print_address_description+0x55/0x1e0 [ 106.694343][ T5338] ? btrfs_put_root+0x2f/0x250 [ 106.694358][ T5338] print_report+0x58/0x70 [ 106. ---truncated---
{
"affected": [],
"aliases": [
"CVE-2026-93800"
],
"database_specific": {
"cwe_ids": [],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-09-24T17:17:12Z",
"severity": null
},
"details": "In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: fix use-after-free on reloc root after error in insert_dirty_subvol()\n\nIf during relocation we fail in insert_dirty_subvol() because\nbtrfs_update_reloc_root() returned an error, we will leave a root\u0027s\nreloc_root field pointing to a reloc root that was freed instead of NULL,\nresulting later in a use-after-free, or double free attempt during\nunmount.\n\nThe sequence of steps is this:\n\n1) During relocation the call to btrfs_update_reloc_root() in\n insert_dirty_subvol() fails, so insert_dirty_subvol() returns the\n error to merge_reloc_root() without adding the root to the list\n rc-\u003edirty_subvol_roots;\n\n2) Then merge_reloc_root() aborts the current transaction because\n insert_dirty_subvol() returned an error;\n\n3) Up the call chain, merge_reloc_roots() gets the error, adds the\n reloc root for root X to the local reloc_roots list and jumps to the\n \u0027out\u0027 label, where it calls free_reloc_roots() to free all the reloc\n roots in the local reloc_roots list. This frees the reloc root for\n root X;\n\n4) We go up the call chain to relocate_block_group() which calls\n clean_dirty_subvols() to go over dirty roots and set their\n -\u003ereloc_root field to NULL, but root X is not in the dirty_subvol_roots\n list, so its -\u003ereloc_root still points to a reloc root;\n\n5) Relocation finishes, with an error and a transaction abort, but the\n -\u003ereloc_root field for root X still points to the reloc root that was\n freed in step 3;\n\n6) When unmounting the fs we end up calling:\n\n btrfs_free_fs_roots()\n btrfs_drop_and_free_fs_root()\n --\u003e calls btrfs_put_root() against root X\u0027s -\u003ereloc_root\n which is not NULL and points to the already freed\n reloc root in step 4 above\n\n Resulting in a use-after-free to a double free attempt.\n\nSyzbot reported this with the following dmesg/syslog:\n\n [ 106.004389][ T5339] BTRFS error (device loop0 state A): Transaction aborted (error -5)\n [ 106.014266][ T5339] BTRFS: error (device loop0 state A) in merge_reloc_root:1655: errno=-5 IO failure\n [ 106.021891][ T1061] BTRFS error (device loop0 state A): error while writing out transaction: -5\n [ 106.026964][ T1061] BTRFS warning (device loop0 state A): Skipping commit of aborted transaction.\n [ 106.033807][ T5340] BTRFS error (device loop0 state A): bdev /dev/loop0 errs: wr 3, rd 0, flush 0, corrupt 0, gen 0\n [ 106.039265][ T1061] BTRFS: error (device loop0 state A) in cleanup_transaction:2067: errno=-5 IO failure\n [ 106.044382][ T5339] BTRFS info (device loop0 state EA): forced readonly\n [ 106.074329][ T5339] BTRFS: error (device loop0 state EA) in merge_reloc_roots:1887: errno=-5 IO failure\n [ 106.081004][ T5356] BTRFS info (device loop0 state EA): scrub: started on devid 1\n [ 106.085611][ T5339] BTRFS info (device loop0 state EA): balance: ended with status: -30\n [ 106.089517][ T5356] BTRFS info (device loop0 state EA): scrub: not finished on devid 1 with status: -30\n [ 106.662365][ T5338] BTRFS info (device loop0 state EA): last unmount of filesystem 3a375e4e-b156-4d76-a2ad-16e198ce1409\n [ 106.682946][ T5338] ==================================================================\n [ 106.686574][ T5338] BUG: KASAN: slab-use-after-free in btrfs_put_root+0x2f/0x250\n [ 106.690090][ T5338] Write of size 4 at addr ffff88803f978630 by task syz.0.0/5338\n [ 106.693173][ T5338]\n [ 106.694279][ T5338] CPU: 0 UID: 0 PID: 5338 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full)\n [ 106.694293][ T5338] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014\n [ 106.694300][ T5338] Call Trace:\n [ 106.694308][ T5338] \u003cTASK\u003e\n [ 106.694314][ T5338] dump_stack_lvl+0xe8/0x150\n [ 106.694331][ T5338] print_address_description+0x55/0x1e0\n [ 106.694343][ T5338] ? btrfs_put_root+0x2f/0x250\n [ 106.694358][ T5338] print_report+0x58/0x70\n [ 106.\n---truncated---",
"id": "GHSA-wpw6-8cm9-72wv",
"modified": "2026-09-24T18:31:29Z",
"published": "2026-09-24T18:31:29Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-93800"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/83201804efa4a5168be754e1dfc9b2faee760cac"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/97a540d72ebcb21853d11f2a56782fe377f358e7"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/fda1b6636ff1846f00643e791099db5564b547d9"
}
],
"schema_version": "1.4.0",
"severity": []
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.