# CVE-2026-90265: btrfs: defrag: fix deadlock between defrag and delalloc space reservation

> 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.21% (percentile 7, 2026-11-26)
- **Published:** 2026-09-17T16:08:01.372Z
- **Modified:** 2026-10-30T13:20:48.347Z

## Who should check

- Anyone running Linux \>= 22b398eeeed43d51e85b1008e51bf9663ac1f491, \< 046396bd16fdf0a9fbdf5f04c6eda26024e7695e; \>= 22b398eeeed43d51e85b1008e51bf9663ac1f491, \< c97277aa6ce8ac725642aced0fe20cd8d31f6e09; \>= 22b398eeeed43d51e85b1008e51bf9663ac1f491, \< 37614074596827a5f292243673b699c90ff63e7d; \>= 22b398eeeed43d51e85b1008e51bf9663ac1f491, \< a9701dd06e82c345fe70debdf8835b7eb5000c59; \>= 22b398eeeed43d51e85b1008e51bf9663ac1f491, \< ac916391e1c70801649f7d6f85014f687983bc33; \>= 22b398eeeed43d51e85b1008e51bf9663ac1f491, \< ba02eab28041f9a4bbe9fc90c7249644fef6de0f
- Anyone running Linux 5.16

## Description

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

btrfs: defrag: fix deadlock between defrag and delalloc space reservation

While running fsstress with autodefrag and flushoncommit, hit a deadlock
due to the fact that defrag reserves delalloc space while it's holding
dirty and locked folios, besides the extent range lock. The stack traces
are the following:

   \[958.624\] task:kworker/u50:3   state:D stack:0     pid:20365 tgid:20365 ppid:2      task\_flags:0x4208060 flags:0x00080000
   \[958.626\] Workqueue: events\_unbound btrfs\_async\_reclaim\_metadata\_space \[btrfs\]
   \[958.627\] Call Trace:
   \[958.628\]  \<TASK\>
   \[958.628\]  \_\_schedule+0x4be/0x10f0
   \[958.629\]  ? preempt\_count\_add+0x69/0xa0
   \[958.630\]  schedule+0x26/0xd0
   \[958.631\]  wait\_current\_trans+0x102/0x160 \[btrfs\]
   \[958.632\]  ? \_\_pfx\_autoremove\_wake\_function+0x10/0x10
   \[958.633\]  start\_transaction+0x374/0x900 \[btrfs\]
   \[958.634\]  btrfs\_commit\_current\_transaction+0x1d/0x70 \[btrfs\]
   \[958.635\]  flush\_space+0xca/0x5e0 \[btrfs\]
   \[958.636\]  ? \_raw\_spin\_unlock+0x15/0x30
   \[958.637\]  ? btrfs\_reduce\_alloc\_profile+0x8c/0x190 \[btrfs\]
   \[958.639\]  ? \_raw\_spin\_unlock+0x15/0x30
   \[958.640\]  ? calc\_available\_free\_space.isra.0+0x6f/0x110 \[btrfs\]
   \[958.641\]  do\_async\_reclaim\_metadata\_space+0x84/0x190 \[btrfs\]
   \[958.642\]  btrfs\_async\_reclaim\_metadata\_space+0x64/0x80 \[btrfs\]
   \[958.644\]  process\_one\_work+0x19d/0x3a0
   \[958.644\]  worker\_thread+0x1c4/0x330
   \[958.645\]  ? \_\_pfx\_worker\_thread+0x10/0x10
   \[958.646\]  kthread+0xfc/0x130
   \[958.647\]  ? \_\_pfx\_kthread+0x10/0x10
   \[958.648\]  ret\_from\_fork+0x1f7/0x2c0
   \[958.648\]  ? \_\_pfx\_kthread+0x10/0x10
   \[958.649\]  ret\_from\_fork\_asm+0x1a/0x30
   \[958.650\]  \</TASK\>
   \[958.651\] task:kworker/u49:7   state:D stack:0     pid:52990 tgid:52990 ppid:2      task\_flags:0x4208060 flags:0x00080000
   \[958.653\] Workqueue: writeback wb\_workfn (flush-btrfs-334)
   \[958.655\] Call Trace:
   \[958.655\]  \<TASK\>
   \[958.656\]  \_\_schedule+0x4be/0x10f0
   \[958.657\]  ? \_\_blk\_flush\_plug+0xe9/0x140
   \[958.658\]  schedule+0x26/0xd0
   \[958.658\]  io\_schedule+0x42/0x70
   \[958.659\]  folio\_wait\_bit\_common+0x12b/0x330
   \[958.660\]  ? folio\_wait\_bit\_common+0x100/0x330
   \[958.662\]  ? \_\_pfx\_wake\_page\_function+0x10/0x10
   \[958.663\]  extent\_write\_cache\_pages+0x599/0x830 \[btrfs\]
   \[958.664\]  ? acpi\_fwnode\_get\_reference\_args+0x1fa/0x270
   \[958.665\]  btrfs\_writepages+0x77/0x130 \[btrfs\]
   \[958.666\]  ? \_\_pfx\_end\_bbio\_data\_write+0x10/0x10 \[btrfs\]
   \[958.667\]  do\_writepages+0xc6/0x160
   \[958.668\]  \_\_writeback\_single\_inode+0x42/0x310
   \[958.669\]  writeback\_sb\_inodes+0x231/0x570
   \[958.670\]  wb\_writeback+0x8a/0x340
   \[958.671\]  wb\_workfn+0xbf/0x450
   \[958.672\]  ? finish\_task\_switch.isra.0+0xc1/0x350
   \[958.673\]  process\_one\_work+0x19d/0x3a0
   \[958.673\]  worker\_thread+0x1c4/0x330
   \[958.674\]  ? \_\_pfx\_worker\_thread+0x10/0x10
   \[958.675\]  kthread+0xfc/0x130
   \[958.676\]  ? \_\_pfx\_kthread+0x10/0x10
   \[958.676\]  ret\_from\_fork+0x1f7/0x2c0
   \[958.677\]  ? \_\_pfx\_kthread+0x10/0x10
   \[958.678\]  ret\_from\_fork\_asm+0x1a/0x30
   \[958.679\]  \</TASK\>
   \[958.679\] task:btrfs-cleaner   state:D stack:0     pid:296750 tgid:296750 ppid:2      task\_flags:0x208040 flags:0x00080000
   \[958.681\] Call Trace:
   \[958.682\]  \<TASK\>
   \[958.682\]  \_\_schedule+0x4be/0x10f0
   \[958.683\]  schedule+0x26/0xd0
   \[958.684\]  handle\_reserve\_ticket+0x1b9/0x2c0 \[btrfs\]
   \[958.685\]  ? \_\_pfx\_autoremove\_wake\_function+0x10/0x10
   \[958.686\]  reserve\_bytes+0x283/0x4c0 \[btrfs\]
   \[958.687\]  btrfs\_reserve\_metadata\_bytes+0x18/0xb0 \[btrfs\]
   \[958.688\]  btrfs\_delalloc\_reserve\_metadata+0x121/0x320 \[btrfs\]
   \[958.690\]  btrfs\_delalloc\_reserve\_space+0x46/0xb0 \[btrfs\]
   \[958.691\]  btrfs\_defrag\_file+0x903/0x1110 \[btrfs\]
   \[958.692\]  btrfs\_run\_defrag\_inodes+0x334/0x430 \[btrfs\]
   \[958.694\]  cleaner\_kthread+0x97/0x1c0 \[btrfs\]
   \[958.694\]  ? \_\_pfx\_cleaner\_kthread+0x10/0x10 \[btrfs\]
   \[958.696\]  kthread+0xfc/0x130
   \[958.696\]  ? \_\_pfx\_kthread+0x10/0x10
   \[958.697\]  ret\_
---truncated---

## Affected and fixed versions

- Linux: \>= 22b398eeeed43d51e85b1008e51bf9663ac1f491, \< 046396bd16fdf0a9fbdf5f04c6eda26024e7695e; \>= 22b398eeeed43d51e85b1008e51bf9663ac1f491, \< c97277aa6ce8ac725642aced0fe20cd8d31f6e09; \>= 22b398eeeed43d51e85b1008e51bf9663ac1f491, \< 37614074596827a5f292243673b699c90ff63e7d; \>= 22b398eeeed43d51e85b1008e51bf9663ac1f491, \< a9701dd06e82c345fe70debdf8835b7eb5000c59; \>= 22b398eeeed43d51e85b1008e51bf9663ac1f491, \< ac916391e1c70801649f7d6f85014f687983bc33; \>= 22b398eeeed43d51e85b1008e51bf9663ac1f491, \< ba02eab28041f9a4bbe9fc90c7249644fef6de0f (cvelist)
- Linux: 5.16 (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-90265. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-90265.md
Affected: Linux >= 22b398eeeed43d51e85b1008e51bf9663ac1f491, < 046396bd16fdf0a9fbdf5f04c6eda26024e7695e; >= 22b398eeeed43d51e85b1008e51bf9663ac1f491, < c97277aa6ce8ac725642aced0fe20cd8d31f6e09; >= 22b398eeeed43d51e85b1008e51bf9663ac1f491, < 37614074596827a5f292243673b699c90ff63e7d; >= 22b398eeeed43d51e85b100…
Fixed in: Linux 046396bd16fdf0a9fbdf5f04c6eda26024e7695e, Linux 37614074596827a5f292243673b699c90ff63e7d

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

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

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

It has no CVSS score yet. Unknown.

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

Linux \>= 22b398eeeed43d51e85b1008e51bf9663ac1f491, \< 046396bd16fdf0a9fbdf5f04c6eda26024e7695e; \>= 22b398eeeed43d51e85b1008e51bf9663ac1f491, \< c97277aa6ce8ac725642aced0fe20cd8d31f6e09; \>= 22b398eeeed43d51e85b1008e51bf9663ac1f491, \< 37614074596827a5f292243673b699c90ff63e7d; \>= 22b398eeeed43d51e85b1008e51bf9663ac1f491, \< a9701dd06e82c345fe70debdf8835b7eb5000c59; \>= 22b398eeeed43d51e85b1008e51bf9663ac1f491, \< ac916391e1c70801649f7d6f85014f687983bc33; \>= 22b398eeeed43d51e85b1008e51bf9663ac1f491, \< ba02eab28041f9a4bbe9fc90c7249644fef6de0f; Linux 5.16.

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

Yes. Fixed in Linux 046396bd16fdf0a9fbdf5f04c6eda26024e7695e, Linux 37614074596827a5f292243673b699c90ff63e7d. No fix listed yet: follow the vendor advisory.

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

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/046396bd16fdf0a9fbdf5f04c6eda26024e7695e>
- other: <https://git.kernel.org/stable/c/c97277aa6ce8ac725642aced0fe20cd8d31f6e09>
- other: <https://git.kernel.org/stable/c/37614074596827a5f292243673b699c90ff63e7d>
- other: <https://git.kernel.org/stable/c/a9701dd06e82c345fe70debdf8835b7eb5000c59>
- other: <https://git.kernel.org/stable/c/ac916391e1c70801649f7d6f85014f687983bc33>
- other: <https://git.kernel.org/stable/c/ba02eab28041f9a4bbe9fc90c7249644fef6de0f>

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

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