# CVE-2023-54253: btrfs: set page extent mapped after read\_folio in relocate\_one\_page

> 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 10, 2026-11-26)
- **Published:** 2025-12-30T12:15:49.460Z
- **Modified:** 2026-06-17T06:47:06.030Z

## Who should check

- Anyone running Linux \>= 32443de3382be98c0a8b8f6f50d23da2e10c4117, \< 08daa38ca212d87f77beae839bc9be71079c7abf; \>= 32443de3382be98c0a8b8f6f50d23da2e10c4117, \< 9d1e020ed9649cf140fcfafd052cfdcce9e9d67d; \>= 32443de3382be98c0a8b8f6f50d23da2e10c4117, \< e7f1326cc24e22b38afc3acd328480a1183f9e79
- Anyone running Linux 5.12

## Description

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

btrfs: set page extent mapped after read\_folio in relocate\_one\_page

One of the CI runs triggered the following panic

  assertion failed: PagePrivate(page) && page-\>private, in fs/btrfs/subpage.c:229
  ------------\[ cut here \]------------
  kernel BUG at fs/btrfs/subpage.c:229!
  Internal error: Oops - BUG: 00000000f2000800 \[\#1\] SMP
  CPU: 0 PID: 923660 Comm: btrfs Not tainted 6.5.0-rc3+ \#1
  pstate: 61400005 (nZCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--)
  pc : btrfs\_subpage\_assert+0xbc/0xf0
  lr : btrfs\_subpage\_assert+0xbc/0xf0
  sp : ffff800093213720
  x29: ffff800093213720 x28: ffff8000932138b4 x27: 000000000c280000
  x26: 00000001b5d00000 x25: 000000000c281000 x24: 000000000c281fff
  x23: 0000000000001000 x22: 0000000000000000 x21: ffffff42b95bf880
  x20: ffff42b9528e0000 x19: 0000000000001000 x18: ffffffffffffffff
  x17: 667274622f736620 x16: 6e69202c65746176 x15: 0000000000000028
  x14: 0000000000000003 x13: 00000000002672d7 x12: 0000000000000000
  x11: ffffcd3f0ccd9204 x10: ffffcd3f0554ae50 x9 : ffffcd3f0379528c
  x8 : ffff800093213428 x7 : 0000000000000000 x6 : ffffcd3f091771e8
  x5 : ffff42b97f333948 x4 : 0000000000000000 x3 : 0000000000000000
  x2 : 0000000000000000 x1 : ffff42b9556cde80 x0 : 000000000000004f
  Call trace:
   btrfs\_subpage\_assert+0xbc/0xf0
   btrfs\_subpage\_set\_dirty+0x38/0xa0
   btrfs\_page\_set\_dirty+0x58/0x88
   relocate\_one\_page+0x204/0x5f0
   relocate\_file\_extent\_cluster+0x11c/0x180
   relocate\_data\_extent+0xd0/0xf8
   relocate\_block\_group+0x3d0/0x4e8
   btrfs\_relocate\_block\_group+0x2d8/0x490
   btrfs\_relocate\_chunk+0x54/0x1a8
   btrfs\_balance+0x7f4/0x1150
   btrfs\_ioctl+0x10f0/0x20b8
   \_\_arm64\_sys\_ioctl+0x120/0x11d8
   invoke\_syscall.constprop.0+0x80/0xd8
   do\_el0\_svc+0x6c/0x158
   el0\_svc+0x50/0x1b0
   el0t\_64\_sync\_handler+0x120/0x130
   el0t\_64\_sync+0x194/0x198
  Code: 91098021 b0007fa0 91346000 97e9c6d2 (d4210000)

This is the same problem outlined in 17b17fcd6d44 ("btrfs:
set\_page\_extent\_mapped after read\_folio in btrfs\_cont\_expand") , and the
fix is the same.  I originally looked for the same pattern elsewhere in
our code, but mistakenly skipped over this code because I saw the page
cache readahead before we set\_page\_extent\_mapped, not realizing that
this was only in the !page case, that we can still end up with a
!uptodate page and then do the btrfs\_read\_folio further down.

The fix here is the same as the above mentioned patch, move the
set\_page\_extent\_mapped call to after the btrfs\_read\_folio() block to
make sure that we have the subpage blocksize stuff setup properly before
using the page.

## Affected and fixed versions

- Linux: \>= 32443de3382be98c0a8b8f6f50d23da2e10c4117, \< 08daa38ca212d87f77beae839bc9be71079c7abf; \>= 32443de3382be98c0a8b8f6f50d23da2e10c4117, \< 9d1e020ed9649cf140fcfafd052cfdcce9e9d67d; \>= 32443de3382be98c0a8b8f6f50d23da2e10c4117, \< e7f1326cc24e22b38afc3acd328480a1183f9e79 (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-2023-54253. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-54253.md
Affected: Linux >= 32443de3382be98c0a8b8f6f50d23da2e10c4117, < 08daa38ca212d87f77beae839bc9be71079c7abf; >= 32443de3382be98c0a8b8f6f50d23da2e10c4117, < 9d1e020ed9649cf140fcfafd052cfdcce9e9d67d; >= 32443de3382be98c0a8b8f6f50d23da2e10c4117, < e7f1326cc24e22b38afc3acd328480a1183f9e79; Linux 5.12
Fixed in: Linux 08daa38ca212d87f77beae839bc9be71079c7abf, Linux 9d1e020ed9649cf140fcfafd052cfdcce9e9d67d

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

There is no confirmed exploitation: CVE-2023-54253 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-26).

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

It has no CVSS score yet. Unknown.

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

Linux \>= 32443de3382be98c0a8b8f6f50d23da2e10c4117, \< 08daa38ca212d87f77beae839bc9be71079c7abf; \>= 32443de3382be98c0a8b8f6f50d23da2e10c4117, \< 9d1e020ed9649cf140fcfafd052cfdcce9e9d67d; \>= 32443de3382be98c0a8b8f6f50d23da2e10c4117, \< e7f1326cc24e22b38afc3acd328480a1183f9e79; Linux 5.12.

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

Yes. Fixed in Linux 08daa38ca212d87f77beae839bc9be71079c7abf, Linux 9d1e020ed9649cf140fcfafd052cfdcce9e9d67d. No fix listed yet: follow the vendor advisory.

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

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/08daa38ca212d87f77beae839bc9be71079c7abf>
- other: <https://git.kernel.org/stable/c/9d1e020ed9649cf140fcfafd052cfdcce9e9d67d>
- other: <https://git.kernel.org/stable/c/e7f1326cc24e22b38afc3acd328480a1183f9e79>

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

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