# CVE-2022-48902: btrfs: do not WARN\_ON() if we have PageError set

> 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.30% (percentile 16, 2026-11-26)
- **Published:** 2024-08-22T01:30:18.531Z
- **Modified:** 2026-06-17T05:16:34.053Z

## Who should check

- Anyone running Linux \>= 0b32f4bbb423f02acee6d43cd442f5f0775db7e0, \< e00077aa439f0e8f416699fa4e9600db6583db70; \>= 0b32f4bbb423f02acee6d43cd442f5f0775db7e0, \< 9efcc83b33b576302147634eca9bece8e3737e34; \>= 0b32f4bbb423f02acee6d43cd442f5f0775db7e0, \< a50e1fcbc9b85fd4e95b89a75c0884cb032a3e06
- Anyone running Linux 3.4

## Description

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

btrfs: do not WARN\_ON() if we have PageError set

Whenever we do any extent buffer operations we call
assert\_eb\_page\_uptodate() to complain loudly if we're operating on an
non-uptodate page.  Our overnight tests caught this warning earlier this
week

  WARNING: CPU: 1 PID: 553508 at fs/btrfs/extent\_io.c:6849 assert\_eb\_page\_uptodate+0x3f/0x50
  CPU: 1 PID: 553508 Comm: kworker/u4:13 Tainted: G        W         5.17.0-rc3+ \#564
  Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
  Workqueue: btrfs-cache btrfs\_work\_helper
  RIP: 0010:assert\_eb\_page\_uptodate+0x3f/0x50
  RSP: 0018:ffffa961440a7c68 EFLAGS: 00010246
  RAX: 0017ffffc0002112 RBX: ffffe6e74453f9c0 RCX: 0000000000001000
  RDX: ffffe6e74467c887 RSI: ffffe6e74453f9c0 RDI: ffff8d4c5efc2fc0
  RBP: 0000000000000d56 R08: ffff8d4d4a224000 R09: 0000000000000000
  R10: 00015817fa9d1ef0 R11: 000000000000000c R12: 00000000000007b1
  R13: ffff8d4c5efc2fc0 R14: 0000000001500000 R15: 0000000001cb1000
  FS:  0000000000000000(0000) GS:ffff8d4dbbd00000(0000) knlGS:0000000000000000
  CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
  CR2: 00007ff31d3448d8 CR3: 0000000118be8004 CR4: 0000000000370ee0
  Call Trace:

   extent\_buffer\_test\_bit+0x3f/0x70
   free\_space\_test\_bit+0xa6/0xc0
   load\_free\_space\_tree+0x1f6/0x470
   caching\_thread+0x454/0x630
   ? rcu\_read\_lock\_sched\_held+0x12/0x60
   ? rcu\_read\_lock\_sched\_held+0x12/0x60
   ? rcu\_read\_lock\_sched\_held+0x12/0x60
   ? lock\_release+0x1f0/0x2d0
   btrfs\_work\_helper+0xf2/0x3e0
   ? lock\_release+0x1f0/0x2d0
   ? finish\_task\_switch.isra.0+0xf9/0x3a0
   process\_one\_work+0x26d/0x580
   ? process\_one\_work+0x580/0x580
   worker\_thread+0x55/0x3b0
   ? process\_one\_work+0x580/0x580
   kthread+0xf0/0x120
   ? kthread\_complete\_and\_exit+0x20/0x20
   ret\_from\_fork+0x1f/0x30

This was partially fixed by c2e39305299f01 ("btrfs: clear extent buffer
uptodate when we fail to write it"), however all that fix did was keep
us from finding extent buffers after a failed writeout.  It didn't keep
us from continuing to use a buffer that we already had found.

In this case we're searching the commit root to cache the block group,
so we can start committing the transaction and switch the commit root
and then start writing.  After the switch we can look up an extent
buffer that hasn't been written yet and start processing that block
group.  Then we fail to write that block out and clear Uptodate on the
page, and then we start spewing these errors.

Normally we're protected by the tree lock to a certain degree here.  If
we read a block we have that block read locked, and we block the writer
from locking the block before we submit it for the write.  However this
isn't necessarily fool proof because the read could happen before we do
the submit\_bio and after we locked and unlocked the extent buffer.

Also in this particular case we have path-\>skip\_locking set, so that
won't save us here.  We'll simply get a block that was valid when we
read it, but became invalid while we were using it.

What we really want is to catch the case where we've "read" a block but
it's not marked Uptodate.  On read we ClearPageError(), so if we're
!Uptodate and !Error we know we didn't do the right thing for reading
the page.

Fix this by checking !Uptodate && !Error, this way we will not complain
if our buffer gets invalidated while we're using it, and we'll maintain
the spirit of the check which is to make sure we have a fully in-cache
block while we're messing with it.

## Affected and fixed versions

- Linux: \>= 0b32f4bbb423f02acee6d43cd442f5f0775db7e0, \< e00077aa439f0e8f416699fa4e9600db6583db70; \>= 0b32f4bbb423f02acee6d43cd442f5f0775db7e0, \< 9efcc83b33b576302147634eca9bece8e3737e34; \>= 0b32f4bbb423f02acee6d43cd442f5f0775db7e0, \< a50e1fcbc9b85fd4e95b89a75c0884cb032a3e06 (cvelist)
- Linux: 3.4 (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-48902. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-48902.md
Affected: Linux >= 0b32f4bbb423f02acee6d43cd442f5f0775db7e0, < e00077aa439f0e8f416699fa4e9600db6583db70; >= 0b32f4bbb423f02acee6d43cd442f5f0775db7e0, < 9efcc83b33b576302147634eca9bece8e3737e34; >= 0b32f4bbb423f02acee6d43cd442f5f0775db7e0, < a50e1fcbc9b85fd4e95b89a75c0884cb032a3e06; Linux 3.4
Fixed in: Linux 9efcc83b33b576302147634eca9bece8e3737e34

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

There is no confirmed exploitation: CVE-2022-48902 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-48902?

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

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

Linux \>= 0b32f4bbb423f02acee6d43cd442f5f0775db7e0, \< e00077aa439f0e8f416699fa4e9600db6583db70; \>= 0b32f4bbb423f02acee6d43cd442f5f0775db7e0, \< 9efcc83b33b576302147634eca9bece8e3737e34; \>= 0b32f4bbb423f02acee6d43cd442f5f0775db7e0, \< a50e1fcbc9b85fd4e95b89a75c0884cb032a3e06; Linux 3.4.

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

Yes. Fixed in Linux 9efcc83b33b576302147634eca9bece8e3737e34. No fix listed yet: follow the vendor advisory.

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

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/e00077aa439f0e8f416699fa4e9600db6583db70>
- patch: <https://git.kernel.org/stable/c/9efcc83b33b576302147634eca9bece8e3737e34>
- patch: <https://git.kernel.org/stable/c/a50e1fcbc9b85fd4e95b89a75c0884cb032a3e06>

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

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