# CVE-2023-53538: btrfs: insert tree mod log move in push\_node\_left

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

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.22% (percentile 7, 2026-11-28)
- **CWE:** CWE-476
- **Published:** 2025-10-04T15:16:48.694Z
- **Modified:** 2026-10-03T11:17:28.147Z

## Who should check

- Anyone running Linux \>= 57911b8ba814fae01306376a0d02bc7cdc88dc94, \< 7e0ee4cb02e6b485103ecd125743b2818a68993d; \>= 57911b8ba814fae01306376a0d02bc7cdc88dc94, \< 11f14402fe3437852cb44945b3b9f1bdb4032956; \>= 57911b8ba814fae01306376a0d02bc7cdc88dc94, \< 5cead5422a0e3d13b0bcee986c0f5c4ebb94100b
- Anyone running Linux 3.7

## Description

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

btrfs: insert tree mod log move in push\_node\_left

There is a fairly unlikely race condition in tree mod log rewind that
can result in a kernel panic which has the following trace:

  \[530.569\] BTRFS critical (device sda3): unable to find logical 0 length 4096
  \[530.585\] BTRFS critical (device sda3): unable to find logical 0 length 4096
  \[530.602\] BUG: kernel NULL pointer dereference, address: 0000000000000002
  \[530.618\] \#PF: supervisor read access in kernel mode
  \[530.629\] \#PF: error\_code(0x0000) - not-present page
  \[530.641\] PGD 0 P4D 0
  \[530.647\] Oops: 0000 \[\#1\] SMP
  \[530.654\] CPU: 30 PID: 398973 Comm: below Kdump: loaded Tainted: G S         O  K   5.12.0-0\_fbk13\_clang\_7455\_gb24de3bdb045 \#1
  \[530.680\] Hardware name: Quanta Mono Lake-M.2 SATA 1HY9U9Z001G/Mono Lake-M.2 SATA, BIOS F20\_3A15 08/16/2017
  \[530.703\] RIP: 0010:\_\_btrfs\_map\_block+0xaa/0xd00
  \[530.755\] RSP: 0018:ffffc9002c2f7600 EFLAGS: 00010246
  \[530.767\] RAX: ffffffffffffffea RBX: ffff888292e41000 RCX: f2702d8b8be15100
  \[530.784\] RDX: ffff88885fda6fb8 RSI: ffff88885fd973c8 RDI: ffff88885fd973c8
  \[530.800\] RBP: ffff888292e410d0 R08: ffffffff82fd7fd0 R09: 00000000fffeffff
  \[530.816\] R10: ffffffff82e57fd0 R11: ffffffff82e57d70 R12: 0000000000000000
  \[530.832\] R13: 0000000000001000 R14: 0000000000001000 R15: ffffc9002c2f76f0
  \[530.848\] FS:  00007f38d64af000(0000) GS:ffff88885fd80000(0000) knlGS:0000000000000000
  \[530.866\] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
  \[530.880\] CR2: 0000000000000002 CR3: 00000002b6770004 CR4: 00000000003706e0
  \[530.896\] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
  \[530.912\] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
  \[530.928\] Call Trace:
  \[530.934\]  ? btrfs\_printk+0x13b/0x18c
  \[530.943\]  ? btrfs\_bio\_counter\_inc\_blocked+0x3d/0x130
  \[530.955\]  btrfs\_map\_bio+0x75/0x330
  \[530.963\]  ? kmem\_cache\_alloc+0x12a/0x2d0
  \[530.973\]  ? btrfs\_submit\_metadata\_bio+0x63/0x100
  \[530.984\]  btrfs\_submit\_metadata\_bio+0xa4/0x100
  \[530.995\]  submit\_extent\_page+0x30f/0x360
  \[531.004\]  read\_extent\_buffer\_pages+0x49e/0x6d0
  \[531.015\]  ? submit\_extent\_page+0x360/0x360
  \[531.025\]  btree\_read\_extent\_buffer\_pages+0x5f/0x150
  \[531.037\]  read\_tree\_block+0x37/0x60
  \[531.046\]  read\_block\_for\_search+0x18b/0x410
  \[531.056\]  btrfs\_search\_old\_slot+0x198/0x2f0
  \[531.066\]  resolve\_indirect\_ref+0xfe/0x6f0
  \[531.076\]  ? ulist\_alloc+0x31/0x60
  \[531.084\]  ? kmem\_cache\_alloc\_trace+0x12e/0x2b0
  \[531.095\]  find\_parent\_nodes+0x720/0x1830
  \[531.105\]  ? ulist\_alloc+0x10/0x60
  \[531.113\]  iterate\_extent\_inodes+0xea/0x370
  \[531.123\]  ? btrfs\_previous\_extent\_item+0x8f/0x110
  \[531.134\]  ? btrfs\_search\_path\_in\_tree+0x240/0x240
  \[531.146\]  iterate\_inodes\_from\_logical+0x98/0xd0
  \[531.157\]  ? btrfs\_search\_path\_in\_tree+0x240/0x240
  \[531.168\]  btrfs\_ioctl\_logical\_to\_ino+0xd9/0x180
  \[531.179\]  btrfs\_ioctl+0xe2/0x2eb0

This occurs when logical inode resolution takes a tree mod log sequence
number, and then while backref walking hits a rewind on a busy node
which has the following sequence of tree mod log operations (numbers
filled in from a specific example, but they are somewhat arbitrary)

  REMOVE\_WHILE\_FREEING slot 532
  REMOVE\_WHILE\_FREEING slot 531
  REMOVE\_WHILE\_FREEING slot 530
  ...
  REMOVE\_WHILE\_FREEING slot 0
  REMOVE slot 455
  REMOVE slot 454
  REMOVE slot 453
  ...
  REMOVE slot 0
  ADD slot 455
  ADD slot 454
  ADD slot 453
  ...
  ADD slot 0
  MOVE src slot 0 -\> dst slot 456 nritems 533
  REMOVE slot 455
  REMOVE slot 454
  REMOVE slot 453
  ...
  REMOVE slot 0

When this sequence gets applied via btrfs\_tree\_mod\_log\_rewind, it
allocates a fresh rewind eb, and first inserts the correct key info for
the 533 elements, then overwrites the first 456 of them, then decrements
the count by 456 via the add ops, then rewinds the move by doing a
memmove from 456:988-\>0:532. We have never written anything past 532,
---truncated---

## Affected and fixed versions

- Linux: \>= 57911b8ba814fae01306376a0d02bc7cdc88dc94, \< 7e0ee4cb02e6b485103ecd125743b2818a68993d; \>= 57911b8ba814fae01306376a0d02bc7cdc88dc94, \< 11f14402fe3437852cb44945b3b9f1bdb4032956; \>= 57911b8ba814fae01306376a0d02bc7cdc88dc94, \< 5cead5422a0e3d13b0bcee986c0f5c4ebb94100b (cvelist)
- Linux: 3.7 (cvelist)

## Mitigation

- Upgrade Linux to 5cead5422a0e3d13b0bcee986c0f5c4ebb94100b 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-53538. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-53538.md
Affected: Linux >= 57911b8ba814fae01306376a0d02bc7cdc88dc94, < 7e0ee4cb02e6b485103ecd125743b2818a68993d; >= 57911b8ba814fae01306376a0d02bc7cdc88dc94, < 11f14402fe3437852cb44945b3b9f1bdb4032956; >= 57911b8ba814fae01306376a0d02bc7cdc88dc94, < 5cead5422a0e3d13b0bcee986c0f5c4ebb94100b; Linux 3.7
Fixed in: Linux 7e0ee4cb02e6b485103ecd125743b2818a68993d, Linux 11f14402fe3437852cb44945b3b9f1bdb4032956, Linux 5cead5422a0e3d13b0bcee986c0f5c4ebb94100b

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-53538 being exploited?

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

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

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= 57911b8ba814fae01306376a0d02bc7cdc88dc94, \< 7e0ee4cb02e6b485103ecd125743b2818a68993d; \>= 57911b8ba814fae01306376a0d02bc7cdc88dc94, \< 11f14402fe3437852cb44945b3b9f1bdb4032956; \>= 57911b8ba814fae01306376a0d02bc7cdc88dc94, \< 5cead5422a0e3d13b0bcee986c0f5c4ebb94100b; Linux 3.7.

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

Yes. Fixed in Linux 7e0ee4cb02e6b485103ecd125743b2818a68993d, Linux 11f14402fe3437852cb44945b3b9f1bdb4032956, Linux 5cead5422a0e3d13b0bcee986c0f5c4ebb94100b. Upgrade Linux to 5cead5422a0e3d13b0bcee986c0f5c4ebb94100b or later.

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

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

- patch: <https://git.kernel.org/stable/c/11f14402fe3437852cb44945b3b9f1bdb4032956>
- patch: <https://git.kernel.org/stable/c/5cead5422a0e3d13b0bcee986c0f5c4ebb94100b>
- other: <https://git.kernel.org/stable/c/7e0ee4cb02e6b485103ecd125743b2818a68993d>

## 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-53538>

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