# CVE-2023-54281: btrfs: release path before inode lookup during the ino lookup ioctl

> 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.26% (percentile 11, 2026-11-28)
- **Published:** 2025-12-30T12:23:23.122Z
- **Modified:** 2026-06-17T06:47:09.023Z

## Who should check

- Anyone running Linux \>= 23d0b79dfaed2305b500b0215b0421701ada6b1a, \< 7390bb377b5fb3be23cb021e0f184d1f576be7d6; \>= 23d0b79dfaed2305b500b0215b0421701ada6b1a, \< 380bbd46d61c894a8dcaace09e54bc7426d81014; \>= 23d0b79dfaed2305b500b0215b0421701ada6b1a, \< 50e385d98b2a52480836ea41c142b81eeeb277af; \>= 23d0b79dfaed2305b500b0215b0421701ada6b1a, \< 6fdce81e425be112f1ca129776f4041afeaad413; \>= 23d0b79dfaed2305b500b0215b0421701ada6b1a, \< ee34a82e890a7babb5585daf1a6dd7d4d1cf142a
- Anyone running Linux 4.18

## Description

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

btrfs: release path before inode lookup during the ino lookup ioctl

During the ino lookup ioctl we can end up calling btrfs\_iget() to get an
inode reference while we are holding on a root's btree. If btrfs\_iget()
needs to lookup the inode from the root's btree, because it's not
currently loaded in memory, then it will need to lock another or the
same path in the same root btree. This may result in a deadlock and
trigger the following lockdep splat:

  WARNING: possible circular locking dependency detected
  6.5.0-rc7-syzkaller-00004-gf7757129e3de \#0 Not tainted
  ------------------------------------------------------
  syz-executor277/5012 is trying to acquire lock:
  ffff88802df41710 (btrfs-tree-01){++++}-{3:3}, at: \_\_btrfs\_tree\_read\_lock+0x2f/0x220 fs/btrfs/locking.c:136

  but task is already holding lock:
  ffff88802df418e8 (btrfs-tree-00){++++}-{3:3}, at: \_\_btrfs\_tree\_read\_lock+0x2f/0x220 fs/btrfs/locking.c:136

  which lock already depends on the new lock.

  the existing dependency chain (in reverse order) is:

  -\> \#1 (btrfs-tree-00){++++}-{3:3}:
         down\_read\_nested+0x49/0x2f0 kernel/locking/rwsem.c:1645
         \_\_btrfs\_tree\_read\_lock+0x2f/0x220 fs/btrfs/locking.c:136
         btrfs\_search\_slot+0x13a4/0x2f80 fs/btrfs/ctree.c:2302
         btrfs\_init\_root\_free\_objectid+0x148/0x320 fs/btrfs/disk-io.c:4955
         btrfs\_init\_fs\_root fs/btrfs/disk-io.c:1128 \[inline\]
         btrfs\_get\_root\_ref+0x5ae/0xae0 fs/btrfs/disk-io.c:1338
         btrfs\_get\_fs\_root fs/btrfs/disk-io.c:1390 \[inline\]
         open\_ctree+0x29c8/0x3030 fs/btrfs/disk-io.c:3494
         btrfs\_fill\_super+0x1c7/0x2f0 fs/btrfs/super.c:1154
         btrfs\_mount\_root+0x7e0/0x910 fs/btrfs/super.c:1519
         legacy\_get\_tree+0xef/0x190 fs/fs\_context.c:611
         vfs\_get\_tree+0x8c/0x270 fs/super.c:1519
         fc\_mount fs/namespace.c:1112 \[inline\]
         vfs\_kern\_mount+0xbc/0x150 fs/namespace.c:1142
         btrfs\_mount+0x39f/0xb50 fs/btrfs/super.c:1579
         legacy\_get\_tree+0xef/0x190 fs/fs\_context.c:611
         vfs\_get\_tree+0x8c/0x270 fs/super.c:1519
         do\_new\_mount+0x28f/0xae0 fs/namespace.c:3335
         do\_mount fs/namespace.c:3675 \[inline\]
         \_\_do\_sys\_mount fs/namespace.c:3884 \[inline\]
         \_\_se\_sys\_mount+0x2d9/0x3c0 fs/namespace.c:3861
         do\_syscall\_x64 arch/x86/entry/common.c:50 \[inline\]
         do\_syscall\_64+0x41/0xc0 arch/x86/entry/common.c:80
         entry\_SYSCALL\_64\_after\_hwframe+0x63/0xcd

  -\> \#0 (btrfs-tree-01){++++}-{3:3}:
         check\_prev\_add kernel/locking/lockdep.c:3142 \[inline\]
         check\_prevs\_add kernel/locking/lockdep.c:3261 \[inline\]
         validate\_chain kernel/locking/lockdep.c:3876 \[inline\]
         \_\_lock\_acquire+0x39ff/0x7f70 kernel/locking/lockdep.c:5144
         lock\_acquire+0x1e3/0x520 kernel/locking/lockdep.c:5761
         down\_read\_nested+0x49/0x2f0 kernel/locking/rwsem.c:1645
         \_\_btrfs\_tree\_read\_lock+0x2f/0x220 fs/btrfs/locking.c:136
         btrfs\_tree\_read\_lock fs/btrfs/locking.c:142 \[inline\]
         btrfs\_read\_lock\_root\_node+0x292/0x3c0 fs/btrfs/locking.c:281
         btrfs\_search\_slot\_get\_root fs/btrfs/ctree.c:1832 \[inline\]
         btrfs\_search\_slot+0x4ff/0x2f80 fs/btrfs/ctree.c:2154
         btrfs\_lookup\_inode+0xdc/0x480 fs/btrfs/inode-item.c:412
         btrfs\_read\_locked\_inode fs/btrfs/inode.c:3892 \[inline\]
         btrfs\_iget\_path+0x2d9/0x1520 fs/btrfs/inode.c:5716
         btrfs\_search\_path\_in\_tree\_user fs/btrfs/ioctl.c:1961 \[inline\]
         btrfs\_ioctl\_ino\_lookup\_user+0x77a/0xf50 fs/btrfs/ioctl.c:2105
         btrfs\_ioctl+0xb0b/0xd40 fs/btrfs/ioctl.c:4683
         vfs\_ioctl fs/ioctl.c:51 \[inline\]
         \_\_do\_sys\_ioctl fs/ioctl.c:870 \[inline\]
         \_\_se\_sys\_ioctl+0xf8/0x170 fs/ioctl.c:856
         do\_syscall\_x64 arch/x86/entry/common.c:50 \[inline\]
         do\_syscall\_64+0x41/0xc0 arch/x86/entry/common.c:80
         entry\_SYSCALL\_64\_after\_hwframe+0x63/0xcd

  other info 
---truncated---

## Affected and fixed versions

- Linux: \>= 23d0b79dfaed2305b500b0215b0421701ada6b1a, \< 7390bb377b5fb3be23cb021e0f184d1f576be7d6; \>= 23d0b79dfaed2305b500b0215b0421701ada6b1a, \< 380bbd46d61c894a8dcaace09e54bc7426d81014; \>= 23d0b79dfaed2305b500b0215b0421701ada6b1a, \< 50e385d98b2a52480836ea41c142b81eeeb277af; \>= 23d0b79dfaed2305b500b0215b0421701ada6b1a, \< 6fdce81e425be112f1ca129776f4041afeaad413; \>= 23d0b79dfaed2305b500b0215b0421701ada6b1a, \< ee34a82e890a7babb5585daf1a6dd7d4d1cf142a (cvelist)
- Linux: 4.18 (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-2023-54281. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-54281.md
Affected: Linux >= 23d0b79dfaed2305b500b0215b0421701ada6b1a, < 7390bb377b5fb3be23cb021e0f184d1f576be7d6; >= 23d0b79dfaed2305b500b0215b0421701ada6b1a, < 380bbd46d61c894a8dcaace09e54bc7426d81014; >= 23d0b79dfaed2305b500b0215b0421701ada6b1a, < 50e385d98b2a52480836ea41c142b81eeeb277af; >= 23d0b79dfaed2305b500b02…
Fixed in: Linux 7390bb377b5fb3be23cb021e0f184d1f576be7d6, Linux 380bbd46d61c894a8dcaace09e54bc7426d81014, Linux 50e385d98b2a52480836ea41c142b81eeeb277af, Linux 6fdce81e425be112f1ca129776f4041afeaad413

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

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

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

It has no CVSS score yet. Unknown.

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

Linux \>= 23d0b79dfaed2305b500b0215b0421701ada6b1a, \< 7390bb377b5fb3be23cb021e0f184d1f576be7d6; \>= 23d0b79dfaed2305b500b0215b0421701ada6b1a, \< 380bbd46d61c894a8dcaace09e54bc7426d81014; \>= 23d0b79dfaed2305b500b0215b0421701ada6b1a, \< 50e385d98b2a52480836ea41c142b81eeeb277af; \>= 23d0b79dfaed2305b500b0215b0421701ada6b1a, \< 6fdce81e425be112f1ca129776f4041afeaad413; \>= 23d0b79dfaed2305b500b0215b0421701ada6b1a, \< ee34a82e890a7babb5585daf1a6dd7d4d1cf142a; Linux 4.18.

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

Yes. Fixed in Linux 7390bb377b5fb3be23cb021e0f184d1f576be7d6, Linux 380bbd46d61c894a8dcaace09e54bc7426d81014, Linux 50e385d98b2a52480836ea41c142b81eeeb277af, Linux 6fdce81e425be112f1ca129776f4041afeaad413. No fix listed yet: follow the vendor advisory.

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

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/7390bb377b5fb3be23cb021e0f184d1f576be7d6>
- other: <https://git.kernel.org/stable/c/380bbd46d61c894a8dcaace09e54bc7426d81014>
- other: <https://git.kernel.org/stable/c/50e385d98b2a52480836ea41c142b81eeeb277af>
- other: <https://git.kernel.org/stable/c/6fdce81e425be112f1ca129776f4041afeaad413>
- other: <https://git.kernel.org/stable/c/ee34a82e890a7babb5585daf1a6dd7d4d1cf142a>

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

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