# CVE-2023-53865: btrfs: fix warning when putting transaction with qgroups enabled after abort

> 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.29% (percentile 14, 2026-11-26)
- **Published:** 2025-12-09T01:30:34.588Z
- **Modified:** 2026-06-17T06:46:12.703Z

## Who should check

- Anyone running Linux \>= 40ea30638d20c92b44107247415842b72c460459, \< ae91ab710d8e309f6c9eba07ce0d9d0b5d9040f0; \>= 81f7eb00ff5bb8326e82503a32809421d14abb8a, \< d2c667cc18314c9bad3ec86ae071c0342132aa09; \>= 81f7eb00ff5bb8326e82503a32809421d14abb8a, \< c9060caab4135dd660c4676d1ea33a6e0d3fc09d; \>= 81f7eb00ff5bb8326e82503a32809421d14abb8a, \< 89e994688e965813ec0a09fb30b87fb8cee06474; \>= 81f7eb00ff5bb8326e82503a32809421d14abb8a, \< 62dd82bc7a90b5052c062a0ad5be6d8a479a3cfb; \>= 81f7eb00ff5bb8326e82503a32809421d14abb8a, \< aa84ce8a78a1a5c10cdf9c7a5fb0c999fbc2c8d6; 4e2e49d4211db43e0ec932579dab6a969e7e8df1; \>= 5.4.23, \< 5.4.251; \>= 5.5.7, \< 5.6
- Anyone running Linux 5.6

## Description

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

btrfs: fix warning when putting transaction with qgroups enabled after abort

If we have a transaction abort with qgroups enabled we get a warning
triggered when doing the final put on the transaction, like this:

  \[552.6789\] ------------\[ cut here \]------------
  \[552.6815\] WARNING: CPU: 4 PID: 81745 at fs/btrfs/transaction.c:144 btrfs\_put\_transaction+0x123/0x130 \[btrfs\]
  \[552.6817\] Modules linked in: btrfs blake2b\_generic xor (...)
  \[552.6819\] CPU: 4 PID: 81745 Comm: btrfs-transacti Tainted: G        W          6.4.0-rc6-btrfs-next-134+ \#1
  \[552.6819\] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.2-0-gea1b7a073390-prebuilt.qemu.org 04/01/2014
  \[552.6819\] RIP: 0010:btrfs\_put\_transaction+0x123/0x130 \[btrfs\]
  \[552.6821\] Code: bd a0 01 00 (...)
  \[552.6821\] RSP: 0018:ffffa168c0527e28 EFLAGS: 00010286
  \[552.6821\] RAX: ffff936042caed00 RBX: ffff93604a3eb448 RCX: 0000000000000000
  \[552.6821\] RDX: ffff93606421b028 RSI: ffffffff92ff0878 RDI: ffff93606421b010
  \[552.6821\] RBP: ffff93606421b000 R08: 0000000000000000 R09: ffffa168c0d07c20
  \[552.6821\] R10: 0000000000000000 R11: ffff93608dc52950 R12: ffffa168c0527e70
  \[552.6821\] R13: ffff93606421b000 R14: ffff93604a3eb420 R15: ffff93606421b028
  \[552.6821\] FS:  0000000000000000(0000) GS:ffff93675fb00000(0000) knlGS:0000000000000000
  \[552.6821\] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
  \[552.6821\] CR2: 0000558ad262b000 CR3: 000000014feda005 CR4: 0000000000370ee0
  \[552.6822\] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
  \[552.6822\] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
  \[552.6822\] Call Trace:
  \[552.6822\]  \<TASK\>
  \[552.6822\]  ? \_\_warn+0x80/0x130
  \[552.6822\]  ? btrfs\_put\_transaction+0x123/0x130 \[btrfs\]
  \[552.6824\]  ? report\_bug+0x1f4/0x200
  \[552.6824\]  ? handle\_bug+0x42/0x70
  \[552.6824\]  ? exc\_invalid\_op+0x14/0x70
  \[552.6824\]  ? asm\_exc\_invalid\_op+0x16/0x20
  \[552.6824\]  ? btrfs\_put\_transaction+0x123/0x130 \[btrfs\]
  \[552.6826\]  btrfs\_cleanup\_transaction+0xe7/0x5e0 \[btrfs\]
  \[552.6828\]  ? \_raw\_spin\_unlock\_irqrestore+0x23/0x40
  \[552.6828\]  ? try\_to\_wake\_up+0x94/0x5e0
  \[552.6828\]  ? \_\_pfx\_process\_timeout+0x10/0x10
  \[552.6828\]  transaction\_kthread+0x103/0x1d0 \[btrfs\]
  \[552.6830\]  ? \_\_pfx\_transaction\_kthread+0x10/0x10 \[btrfs\]
  \[552.6832\]  kthread+0xee/0x120
  \[552.6832\]  ? \_\_pfx\_kthread+0x10/0x10
  \[552.6832\]  ret\_from\_fork+0x29/0x50
  \[552.6832\]  \</TASK\>
  \[552.6832\] ---\[ end trace 0000000000000000 \]---

This corresponds to this line of code:

  void btrfs\_put\_transaction(struct btrfs\_transaction \*transaction)
  {
      (...)
          WARN\_ON(!RB\_EMPTY\_ROOT(
                          &transaction-\>delayed\_refs.dirty\_extent\_root));
      (...)
  }

The warning happens because btrfs\_qgroup\_destroy\_extent\_records(), called
in the transaction abort path, we free all entries from the rbtree
"dirty\_extent\_root" with rbtree\_postorder\_for\_each\_entry\_safe(), but we
don't actually empty the rbtree - it's still pointing to nodes that were
freed.

So set the rbtree's root node to NULL to avoid this warning (assign
RB\_ROOT).

## Affected and fixed versions

- Linux: \>= 40ea30638d20c92b44107247415842b72c460459, \< ae91ab710d8e309f6c9eba07ce0d9d0b5d9040f0; \>= 81f7eb00ff5bb8326e82503a32809421d14abb8a, \< d2c667cc18314c9bad3ec86ae071c0342132aa09; \>= 81f7eb00ff5bb8326e82503a32809421d14abb8a, \< c9060caab4135dd660c4676d1ea33a6e0d3fc09d; \>= 81f7eb00ff5bb8326e82503a32809421d14abb8a, \< 89e994688e965813ec0a09fb30b87fb8cee06474; \>= 81f7eb00ff5bb8326e82503a32809421d14abb8a, \< 62dd82bc7a90b5052c062a0ad5be6d8a479a3cfb; \>= 81f7eb00ff5bb8326e82503a32809421d14abb8a, \< aa84ce8a78a1a5c10cdf9c7a5fb0c999fbc2c8d6; 4e2e49d4211db43e0ec932579dab6a969e7e8df1; \>= 5.4.23, \< 5.4.251; \>= 5.5.7, \< 5.6 (cvelist)
- Linux: 5.6 (cvelist)

## Mitigation

- Upgrade Linux to 5.6 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2023-53865.md
Affected: Linux >= 40ea30638d20c92b44107247415842b72c460459, < ae91ab710d8e309f6c9eba07ce0d9d0b5d9040f0; >= 81f7eb00ff5bb8326e82503a32809421d14abb8a, < d2c667cc18314c9bad3ec86ae071c0342132aa09; >= 81f7eb00ff5bb8326e82503a32809421d14abb8a, < c9060caab4135dd660c4676d1ea33a6e0d3fc09d; >= 81f7eb00ff5bb8326e82503…
Fixed in: Linux 89e994688e965813ec0a09fb30b87fb8cee06474, Linux 62dd82bc7a90b5052c062a0ad5be6d8a479a3cfb, Linux 5.4.251, Linux 5.6

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-2023-53865 being exploited?

There is no confirmed exploitation: CVE-2023-53865 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.29% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-53865?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2023-53865?

Linux \>= 40ea30638d20c92b44107247415842b72c460459, \< ae91ab710d8e309f6c9eba07ce0d9d0b5d9040f0; \>= 81f7eb00ff5bb8326e82503a32809421d14abb8a, \< d2c667cc18314c9bad3ec86ae071c0342132aa09; \>= 81f7eb00ff5bb8326e82503a32809421d14abb8a, \< c9060caab4135dd660c4676d1ea33a6e0d3fc09d; \>= 81f7eb00ff5bb8326e82503a32809421d14abb8a, \< 89e994688e965813ec0a09fb30b87fb8cee06474; \>= 81f7eb00ff5bb8326e82503a32809421d14abb8a, \< 62dd82bc7a90b5052c062a0ad5be6d8a479a3cfb; \>= 81f7eb00ff5bb8326e82503a32809421d14abb8a, \< aa84ce8a78a1a5c10cdf9c7a5fb0c999fbc2c8d6; 4e2e49d4211db43e0ec932579dab6a969e7e8df1; \>= 5.4.23, \< 5.4.251; \>= 5.5.7, \< 5.6; Linux 5.6.

### Is there a fix for CVE-2023-53865?

Yes. Fixed in Linux 89e994688e965813ec0a09fb30b87fb8cee06474, Linux 62dd82bc7a90b5052c062a0ad5be6d8a479a3cfb, Linux 5.4.251, Linux 5.6. Upgrade Linux to 5.6 or later.

### How do I check if I'm affected by CVE-2023-53865?

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/ae91ab710d8e309f6c9eba07ce0d9d0b5d9040f0>
- other: <https://git.kernel.org/stable/c/d2c667cc18314c9bad3ec86ae071c0342132aa09>
- other: <https://git.kernel.org/stable/c/c9060caab4135dd660c4676d1ea33a6e0d3fc09d>
- other: <https://git.kernel.org/stable/c/89e994688e965813ec0a09fb30b87fb8cee06474>
- other: <https://git.kernel.org/stable/c/62dd82bc7a90b5052c062a0ad5be6d8a479a3cfb>
- other: <https://git.kernel.org/stable/c/aa84ce8a78a1a5c10cdf9c7a5fb0c999fbc2c8d6>

## 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-2023-53865>

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