# CVE-2022-50090: btrfs: replace BTRFS\_MAX\_EXTENT\_SIZE with fs\_info-\>max\_extent\_size

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

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; 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.30% (percentile 15, 2026-11-26)
- **Published:** 2025-06-18T11:02:30.088Z
- **Modified:** 2026-06-17T05:22:44.300Z

## Who should check

- Anyone running Linux \>= d8e3fb106f393858b90b3befc4f6092a76c86d1c, \< 1aa262c1d056551dd1246115af8b7e351184deae; \>= d8e3fb106f393858b90b3befc4f6092a76c86d1c, \< 6cb4b96df97082a54634ba02196516919cda228c; \>= d8e3fb106f393858b90b3befc4f6092a76c86d1c, \< 096e8eb9639b342bc35f9b741cf05e26d0106e92; \>= d8e3fb106f393858b90b3befc4f6092a76c86d1c, \< f7b12a62f008a3041f42f2426983e59a6a0a3c59
- Anyone running Linux 5.12

## Description

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

btrfs: replace BTRFS\_MAX\_EXTENT\_SIZE with fs\_info-\>max\_extent\_size

On zoned filesystem, data write out is limited by max\_zone\_append\_size,
and a large ordered extent is split according the size of a bio. OTOH,
the number of extents to be written is calculated using
BTRFS\_MAX\_EXTENT\_SIZE, and that estimated number is used to reserve the
metadata bytes to update and/or create the metadata items.

The metadata reservation is done at e.g, btrfs\_buffered\_write() and then
released according to the estimation changes. Thus, if the number of extent
increases massively, the reserved metadata can run out.

The increase of the number of extents easily occurs on zoned filesystem
if BTRFS\_MAX\_EXTENT\_SIZE \> max\_zone\_append\_size. And, it causes the
following warning on a small RAM environment with disabling metadata
over-commit (in the following patch).

\[75721.498492\] ------------\[ cut here \]------------
\[75721.505624\] BTRFS: block rsv 1 returned -28
\[75721.512230\] WARNING: CPU: 24 PID: 2327559 at fs/btrfs/block-rsv.c:537 btrfs\_use\_block\_rsv+0x560/0x760 \[btrfs\]
\[75721.581854\] CPU: 24 PID: 2327559 Comm: kworker/u64:10 Kdump: loaded Tainted: G        W         5.18.0-rc2-BTRFS-ZNS+ \#109
\[75721.597200\] Hardware name: Supermicro Super Server/H12SSL-NT, BIOS 2.0 02/22/2021
\[75721.607310\] Workqueue: btrfs-endio-write btrfs\_work\_helper \[btrfs\]
\[75721.616209\] RIP: 0010:btrfs\_use\_block\_rsv+0x560/0x760 \[btrfs\]
\[75721.646649\] RSP: 0018:ffffc9000fbdf3e0 EFLAGS: 00010286
\[75721.654126\] RAX: 0000000000000000 RBX: 0000000000004000 RCX: 0000000000000000
\[75721.663524\] RDX: 0000000000000004 RSI: 0000000000000008 RDI: fffff52001f7be6e
\[75721.672921\] RBP: ffffc9000fbdf420 R08: 0000000000000001 R09: ffff889f8d1fc6c7
\[75721.682493\] R10: ffffed13f1a3f8d8 R11: 0000000000000001 R12: ffff88980a3c0e28
\[75721.692284\] R13: ffff889b66590000 R14: ffff88980a3c0e40 R15: ffff88980a3c0e8a
\[75721.701878\] FS:  0000000000000000(0000) GS:ffff889f8d000000(0000) knlGS:0000000000000000
\[75721.712601\] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
\[75721.720726\] CR2: 000055d12e05c018 CR3: 0000800193594000 CR4: 0000000000350ee0
\[75721.730499\] Call Trace:
\[75721.735166\]  \<TASK\>
\[75721.739886\]  btrfs\_alloc\_tree\_block+0x1e1/0x1100 \[btrfs\]
\[75721.747545\]  ? btrfs\_alloc\_logged\_file\_extent+0x550/0x550 \[btrfs\]
\[75721.756145\]  ? btrfs\_get\_32+0xea/0x2d0 \[btrfs\]
\[75721.762852\]  ? btrfs\_get\_32+0xea/0x2d0 \[btrfs\]
\[75721.769520\]  ? push\_leaf\_left+0x420/0x620 \[btrfs\]
\[75721.776431\]  ? memcpy+0x4e/0x60
\[75721.781931\]  split\_leaf+0x433/0x12d0 \[btrfs\]
\[75721.788392\]  ? btrfs\_get\_token\_32+0x580/0x580 \[btrfs\]
\[75721.795636\]  ? push\_for\_double\_split.isra.0+0x420/0x420 \[btrfs\]
\[75721.803759\]  ? leaf\_space\_used+0x15d/0x1a0 \[btrfs\]
\[75721.811156\]  btrfs\_search\_slot+0x1bc3/0x2790 \[btrfs\]
\[75721.818300\]  ? lock\_downgrade+0x7c0/0x7c0
\[75721.824411\]  ? free\_extent\_buffer.part.0+0x107/0x200 \[btrfs\]
\[75721.832456\]  ? split\_leaf+0x12d0/0x12d0 \[btrfs\]
\[75721.839149\]  ? free\_extent\_buffer.part.0+0x14f/0x200 \[btrfs\]
\[75721.846945\]  ? free\_extent\_buffer+0x13/0x20 \[btrfs\]
\[75721.853960\]  ? btrfs\_release\_path+0x4b/0x190 \[btrfs\]
\[75721.861429\]  btrfs\_csum\_file\_blocks+0x85c/0x1500 \[btrfs\]
\[75721.869313\]  ? rcu\_read\_lock\_sched\_held+0x16/0x80
\[75721.876085\]  ? lock\_release+0x552/0xf80
\[75721.881957\]  ? btrfs\_del\_csums+0x8c0/0x8c0 \[btrfs\]
\[75721.888886\]  ? \_\_kasan\_check\_write+0x14/0x20
\[75721.895152\]  ? do\_raw\_read\_unlock+0x44/0x80
\[75721.901323\]  ? \_raw\_write\_lock\_irq+0x60/0x80
\[75721.907983\]  ? btrfs\_global\_root+0xb9/0xe0 \[btrfs\]
\[75721.915166\]  ? btrfs\_csum\_root+0x12b/0x180 \[btrfs\]
\[75721.921918\]  ? btrfs\_get\_global\_root+0x820/0x820 \[btrfs\]
\[75721.929166\]  ? \_raw\_write\_unlock+0x23/0x40
\[75721.935116\]  ? unpin\_extent\_cache+0x1e3/0x390 \[btrfs\]
\[75721.942041\]  btrfs\_finish\_ordered\_io.isra.0+0xa0c/0x1dc0 \[btrfs\]
\[75721.949906\]  ? try\_to\_wake\_up+0x30/0x14a0
\[75721.955700\]  ? btrfs\_unlink\_subvol+0xda0/0xda0 \[btrfs\]
\[75721.962661\]  ? rcu
---truncated---

## Affected and fixed versions

- Linux: \>= d8e3fb106f393858b90b3befc4f6092a76c86d1c, \< 1aa262c1d056551dd1246115af8b7e351184deae; \>= d8e3fb106f393858b90b3befc4f6092a76c86d1c, \< 6cb4b96df97082a54634ba02196516919cda228c; \>= d8e3fb106f393858b90b3befc4f6092a76c86d1c, \< 096e8eb9639b342bc35f9b741cf05e26d0106e92; \>= d8e3fb106f393858b90b3befc4f6092a76c86d1c, \< f7b12a62f008a3041f42f2426983e59a6a0a3c59 (cvelist)
- Linux: 5.12 (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-2022-50090. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50090.md
Affected: Linux >= d8e3fb106f393858b90b3befc4f6092a76c86d1c, < 1aa262c1d056551dd1246115af8b7e351184deae; >= d8e3fb106f393858b90b3befc4f6092a76c86d1c, < 6cb4b96df97082a54634ba02196516919cda228c; >= d8e3fb106f393858b90b3befc4f6092a76c86d1c, < 096e8eb9639b342bc35f9b741cf05e26d0106e92; >= d8e3fb106f393858b90b3be…
Fixed in: Linux 1aa262c1d056551dd1246115af8b7e351184deae, Linux 6cb4b96df97082a54634ba02196516919cda228c, Linux 096e8eb9639b342bc35f9b741cf05e26d0106e92

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-2022-50090 being exploited?

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

### How serious is CVE-2022-50090?

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

### Which versions are affected by CVE-2022-50090?

Linux \>= d8e3fb106f393858b90b3befc4f6092a76c86d1c, \< 1aa262c1d056551dd1246115af8b7e351184deae; \>= d8e3fb106f393858b90b3befc4f6092a76c86d1c, \< 6cb4b96df97082a54634ba02196516919cda228c; \>= d8e3fb106f393858b90b3befc4f6092a76c86d1c, \< 096e8eb9639b342bc35f9b741cf05e26d0106e92; \>= d8e3fb106f393858b90b3befc4f6092a76c86d1c, \< f7b12a62f008a3041f42f2426983e59a6a0a3c59; Linux 5.12.

### Is there a fix for CVE-2022-50090?

Yes. Fixed in Linux 1aa262c1d056551dd1246115af8b7e351184deae, Linux 6cb4b96df97082a54634ba02196516919cda228c, Linux 096e8eb9639b342bc35f9b741cf05e26d0106e92. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2022-50090?

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/1aa262c1d056551dd1246115af8b7e351184deae>
- patch: <https://git.kernel.org/stable/c/6cb4b96df97082a54634ba02196516919cda228c>
- patch: <https://git.kernel.org/stable/c/096e8eb9639b342bc35f9b741cf05e26d0106e92>
- patch: <https://git.kernel.org/stable/c/f7b12a62f008a3041f42f2426983e59a6a0a3c59>

## 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-2022-50090>

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