# CVE-2026-93800: btrfs: fix use-after-free on reloc root after error in insert\_dirty\_subvol()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.17% (percentile 7, 2026-12-02)
- **Published:** 2026-09-24T16:02:34.370Z
- **Modified:** 2026-10-03T11:17:49.673Z

## Who should check

- Anyone running Linux \>= f32b84d7c977e1906a4781b93b3c93090b6cd675, \< 5a247097c5f94b51ffc991b444d998ad6e85875f; \>= 592fbcd50c99b8adf999a2a54f9245caff333139, \< 6372dd394ea907cd85a7a8063db320ec73dfaed0; \>= 592fbcd50c99b8adf999a2a54f9245caff333139, \< 9f599d120b2b79d2d937c3935b7cdf2697514283; \>= 592fbcd50c99b8adf999a2a54f9245caff333139, \< a01837ae174a2a968c245a30e6dd010f50eaf05d; \>= 592fbcd50c99b8adf999a2a54f9245caff333139, \< 97a540d72ebcb21853d11f2a56782fe377f358e7; \>= 592fbcd50c99b8adf999a2a54f9245caff333139, \< fda1b6636ff1846f00643e791099db5564b547d9; \>= 592fbcd50c99b8adf999a2a54f9245caff333139, \< 83201804efa4a5168be754e1dfc9b2faee760cac; aa18bc1ff8a51f082d5b3b6d07693797637b4028; 4cb0aea2e250eee35ccfac5f5395cd8f3238a9e5; \>= 5.10.36, \< 5.10.271; …
- Anyone running Linux 5.13

## Description

In 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\]  \<TASK\>
   \[  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 and fixed versions

- Linux: \>= f32b84d7c977e1906a4781b93b3c93090b6cd675, \< 5a247097c5f94b51ffc991b444d998ad6e85875f; \>= 592fbcd50c99b8adf999a2a54f9245caff333139, \< 6372dd394ea907cd85a7a8063db320ec73dfaed0; \>= 592fbcd50c99b8adf999a2a54f9245caff333139, \< 9f599d120b2b79d2d937c3935b7cdf2697514283; \>= 592fbcd50c99b8adf999a2a54f9245caff333139, \< a01837ae174a2a968c245a30e6dd010f50eaf05d; \>= 592fbcd50c99b8adf999a2a54f9245caff333139, \< 97a540d72ebcb21853d11f2a56782fe377f358e7; \>= 592fbcd50c99b8adf999a2a54f9245caff333139, \< fda1b6636ff1846f00643e791099db5564b547d9; \>= 592fbcd50c99b8adf999a2a54f9245caff333139, \< 83201804efa4a5168be754e1dfc9b2faee760cac; aa18bc1ff8a51f082d5b3b6d07693797637b4028; 4cb0aea2e250eee35ccfac5f5395cd8f3238a9e5; \>= 5.10.36, \< 5.10.271; … (cvelist)
- Linux: 5.13 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-93800. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-93800.md
Affected: Linux >= f32b84d7c977e1906a4781b93b3c93090b6cd675, < 5a247097c5f94b51ffc991b444d998ad6e85875f; >= 592fbcd50c99b8adf999a2a54f9245caff333139, < 6372dd394ea907cd85a7a8063db320ec73dfaed0; >= 592fbcd50c99b8adf999a2a54f9245caff333139, < 9f599d120b2b79d2d937c3935b7cdf2697514283; >= 592fbcd50c99b8adf999a2a…
Fixed in: Linux 5a247097c5f94b51ffc991b444d998ad6e85875f, Linux 6372dd394ea907cd85a7a8063db320ec73dfaed0, Linux 9f599d120b2b79d2d937c3935b7cdf2697514283, Linux 97a540d72ebcb21853d11f2a56782fe377f358e7, Linux 83201804efa4a5168be754e1dfc9b2faee760cac, Linux 5.10.271

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-93800 being exploited?

There is no confirmed exploitation: CVE-2026-93800 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.17% chance of exploitation in the next 30 days (as of 2026-12-02).

### How serious is CVE-2026-93800?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2026-93800?

Linux \>= f32b84d7c977e1906a4781b93b3c93090b6cd675, \< 5a247097c5f94b51ffc991b444d998ad6e85875f; \>= 592fbcd50c99b8adf999a2a54f9245caff333139, \< 6372dd394ea907cd85a7a8063db320ec73dfaed0; \>= 592fbcd50c99b8adf999a2a54f9245caff333139, \< 9f599d120b2b79d2d937c3935b7cdf2697514283; \>= 592fbcd50c99b8adf999a2a54f9245caff333139, \< a01837ae174a2a968c245a30e6dd010f50eaf05d; \>= 592fbcd50c99b8adf999a2a54f9245caff333139, \< 97a540d72ebcb21853d11f2a56782fe377f358e7; \>= 592fbcd50c99b8adf999a2a54f9245caff333139, \< fda1b6636ff1846f00643e791099db5564b547d9; \>= 592fbcd50c99b8adf999a2a54f9245caff333139, \< 83201804efa4a5168be754e1dfc9b2faee760cac; aa18bc1ff8a51f082d5b3b6d07693797637b4028; 4cb0aea2e250eee35ccfac5f5395cd8f3238a9e5; \>= 5.10.36, \< 5.10.271; …; Linux 5.13.

### Is there a fix for CVE-2026-93800?

Yes. Fixed in Linux 5a247097c5f94b51ffc991b444d998ad6e85875f, Linux 6372dd394ea907cd85a7a8063db320ec73dfaed0, Linux 9f599d120b2b79d2d937c3935b7cdf2697514283, Linux 97a540d72ebcb21853d11f2a56782fe377f358e7, Linux 83201804efa4a5168be754e1dfc9b2faee760cac, Linux 5.10.271. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2026-93800?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/5a247097c5f94b51ffc991b444d998ad6e85875f>
- other: <https://git.kernel.org/stable/c/6372dd394ea907cd85a7a8063db320ec73dfaed0>
- other: <https://git.kernel.org/stable/c/9f599d120b2b79d2d937c3935b7cdf2697514283>
- other: <https://git.kernel.org/stable/c/a01837ae174a2a968c245a30e6dd010f50eaf05d>
- other: <https://git.kernel.org/stable/c/97a540d72ebcb21853d11f2a56782fe377f358e7>
- other: <https://git.kernel.org/stable/c/fda1b6636ff1846f00643e791099db5564b547d9>
- other: <https://git.kernel.org/stable/c/83201804efa4a5168be754e1dfc9b2faee760cac>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-93800>

HTML: <https://flawdb.com/CVE-2026-93800> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-93800>
