# CVE-2026-23018: btrfs: release path before initializing extent tree in btrfs\_read\_locked\_inode()

> 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.18% (percentile 4, 2026-11-26)
- **Published:** 2026-01-31T11:39:02.330Z
- **Modified:** 2026-06-17T10:20:43.223Z

## Who should check

- Anyone running Linux \>= 8679d2687c351824d08cf1f0e86f3b65f22a00fe, \< 92a5590851144f034adc51fee55e6878ccac716e; \>= 8679d2687c351824d08cf1f0e86f3b65f22a00fe, \< 8731f2c50b0b1d2b58ed5b9671ef2c4bdc2f8347; e8f496001e0c7832d188ab91fea294e19a128202; \>= 6.16.9, \< 6.17
- Anyone running Linux 6.17

## Description

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

btrfs: release path before initializing extent tree in btrfs\_read\_locked\_inode()

In btrfs\_read\_locked\_inode() we are calling btrfs\_init\_file\_extent\_tree()
while holding a path with a read locked leaf from a subvolume tree, and
btrfs\_init\_file\_extent\_tree() may do a GFP\_KERNEL allocation, which can
trigger reclaim.

This can create a circular lock dependency which lockdep warns about with
the following splat:

   \[6.1433\] ======================================================
   \[6.1574\] WARNING: possible circular locking dependency detected
   \[6.1583\] 6.18.0+ \#4 Tainted: G     U
   \[6.1591\] ------------------------------------------------------
   \[6.1599\] kswapd0/117 is trying to acquire lock:
   \[6.1606\] ffff8d9b6333c5b8 (&delayed\_node-\>mutex){+.+.}-{3:3}, at: \_\_btrfs\_release\_delayed\_node.part.0+0x39/0x2f0
   \[6.1625\]
            but task is already holding lock:
   \[6.1633\] ffffffffa4ab8ce0 (fs\_reclaim){+.+.}-{0:0}, at: balance\_pgdat+0x195/0xc60
   \[6.1646\]
            which lock already depends on the new lock.

   \[6.1657\]
            the existing dependency chain (in reverse order) is:
   \[6.1667\]
            -\> \#2 (fs\_reclaim){+.+.}-{0:0}:
   \[6.1677\]        fs\_reclaim\_acquire+0x9d/0xd0
   \[6.1685\]        \_\_kmalloc\_cache\_noprof+0x59/0x750
   \[6.1694\]        btrfs\_init\_file\_extent\_tree+0x90/0x100
   \[6.1702\]        btrfs\_read\_locked\_inode+0xc3/0x6b0
   \[6.1710\]        btrfs\_iget+0xbb/0xf0
   \[6.1716\]        btrfs\_lookup\_dentry+0x3c5/0x8e0
   \[6.1724\]        btrfs\_lookup+0x12/0x30
   \[6.1731\]        lookup\_open.isra.0+0x1aa/0x6a0
   \[6.1739\]        path\_openat+0x5f7/0xc60
   \[6.1746\]        do\_filp\_open+0xd6/0x180
   \[6.1753\]        do\_sys\_openat2+0x8b/0xe0
   \[6.1760\]        \_\_x64\_sys\_openat+0x54/0xa0
   \[6.1768\]        do\_syscall\_64+0x97/0x3e0
   \[6.1776\]        entry\_SYSCALL\_64\_after\_hwframe+0x76/0x7e
   \[6.1784\]
            -\> \#1 (btrfs-tree-00){++++}-{3:3}:
   \[6.1794\]        lock\_release+0x127/0x2a0
   \[6.1801\]        up\_read+0x1b/0x30
   \[6.1808\]        btrfs\_search\_slot+0x8e0/0xff0
   \[6.1817\]        btrfs\_lookup\_inode+0x52/0xd0
   \[6.1825\]        \_\_btrfs\_update\_delayed\_inode+0x73/0x520
   \[6.1833\]        btrfs\_commit\_inode\_delayed\_inode+0x11a/0x120
   \[6.1842\]        btrfs\_log\_inode+0x608/0x1aa0
   \[6.1849\]        btrfs\_log\_inode\_parent+0x249/0xf80
   \[6.1857\]        btrfs\_log\_dentry\_safe+0x3e/0x60
   \[6.1865\]        btrfs\_sync\_file+0x431/0x690
   \[6.1872\]        do\_fsync+0x39/0x80
   \[6.1879\]        \_\_x64\_sys\_fsync+0x13/0x20
   \[6.1887\]        do\_syscall\_64+0x97/0x3e0
   \[6.1894\]        entry\_SYSCALL\_64\_after\_hwframe+0x76/0x7e
   \[6.1903\]
            -\> \#0 (&delayed\_node-\>mutex){+.+.}-{3:3}:
   \[6.1913\]        \_\_lock\_acquire+0x15e9/0x2820
   \[6.1920\]        lock\_acquire+0xc9/0x2d0
   \[6.1927\]        \_\_mutex\_lock+0xcc/0x10a0
   \[6.1934\]        \_\_btrfs\_release\_delayed\_node.part.0+0x39/0x2f0
   \[6.1944\]        btrfs\_evict\_inode+0x20b/0x4b0
   \[6.1952\]        evict+0x15a/0x2f0
   \[6.1958\]        prune\_icache\_sb+0x91/0xd0
   \[6.1966\]        super\_cache\_scan+0x150/0x1d0
   \[6.1974\]        do\_shrink\_slab+0x155/0x6f0
   \[6.1981\]        shrink\_slab+0x48e/0x890
   \[6.1988\]        shrink\_one+0x11a/0x1f0
   \[6.1995\]        shrink\_node+0xbfd/0x1320
   \[6.1002\]        balance\_pgdat+0x67f/0xc60
   \[6.1321\]        kswapd+0x1dc/0x3e0
   \[6.1643\]        kthread+0xff/0x240
   \[6.1965\]        ret\_from\_fork+0x223/0x280
   \[6.1287\]        ret\_from\_fork\_asm+0x1a/0x30
   \[6.1616\]
            other info that might help us debug this:

   \[6.1561\] Chain exists of:
              &delayed\_node-\>mutex --\> btrfs-tree-00 --\> fs\_reclaim

   \[6.1503\]  Possible unsafe locking scenario:

   \[6.1110\]        CPU0                    CPU1
   \[6.1411\]        ----                    ----
   \[6.1707\]   lock(fs\_reclaim);
   \[6.1998\]                                lock(btrfs-tree-00);
   \[6.1291\]                                lock(fs\_reclaim);
   \[6.1581\]   lock(&del
---truncated---

## Affected and fixed versions

- Linux: \>= 8679d2687c351824d08cf1f0e86f3b65f22a00fe, \< 92a5590851144f034adc51fee55e6878ccac716e; \>= 8679d2687c351824d08cf1f0e86f3b65f22a00fe, \< 8731f2c50b0b1d2b58ed5b9671ef2c4bdc2f8347; e8f496001e0c7832d188ab91fea294e19a128202; \>= 6.16.9, \< 6.17 (cvelist)
- Linux: 6.17 (cvelist)

## Mitigation

- Upgrade Linux to 6.17 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2026-23018.md
Affected: Linux >= 8679d2687c351824d08cf1f0e86f3b65f22a00fe, < 92a5590851144f034adc51fee55e6878ccac716e; >= 8679d2687c351824d08cf1f0e86f3b65f22a00fe, < 8731f2c50b0b1d2b58ed5b9671ef2c4bdc2f8347; e8f496001e0c7832d188ab91fea294e19a128202; >= 6.16.9, < 6.17; Linux 6.17
Fixed in: Linux 92a5590851144f034adc51fee55e6878ccac716e, Linux 8731f2c50b0b1d2b58ed5b9671ef2c4bdc2f8347, Linux 6.17

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

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

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

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

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

Linux \>= 8679d2687c351824d08cf1f0e86f3b65f22a00fe, \< 92a5590851144f034adc51fee55e6878ccac716e; \>= 8679d2687c351824d08cf1f0e86f3b65f22a00fe, \< 8731f2c50b0b1d2b58ed5b9671ef2c4bdc2f8347; e8f496001e0c7832d188ab91fea294e19a128202; \>= 6.16.9, \< 6.17; Linux 6.17.

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

Yes. Fixed in Linux 92a5590851144f034adc51fee55e6878ccac716e, Linux 8731f2c50b0b1d2b58ed5b9671ef2c4bdc2f8347, Linux 6.17. Upgrade Linux to 6.17 or later.

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

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/92a5590851144f034adc51fee55e6878ccac716e>
- patch: <https://git.kernel.org/stable/c/8731f2c50b0b1d2b58ed5b9671ef2c4bdc2f8347>

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

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