Look up another CVE · open CVE-2026-64031 in the interactive tracker
CVE-2026-64031
erofs: fix managed cache race for unaligned extents
Published 2026-07-19 (3 months ago) by the Linux kernel CNA. Subsystem fs/erofs. Debian urgency: unimportant.
What to do, per Debian release
Debian's own status for CVE-2026-64031 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source
| Release | Status | Version | What this means |
|---|---|---|---|
| Debian 12bookworm | not affected | 6.1.190-1 | Nothing to do. bookworm never shipped the vulnerable code. |
| Debian 13trixie | not affected | 6.12.113-1 | Nothing to do. trixie never shipped the vulnerable code. |
| Debian 14forky | fixed | 7.0.12-1 | Update the kernel and reboot. Fixed in 7.0.12-1. A running kernel keeps the old code until the machine restarts. |
| Debian unstablesid | fixed | 7.0.12-1 | Update the kernel and reboot. Fixed in 7.0.12-1. A running kernel keeps the old code until the machine restarts. |
The vulnerability
What the bug is
After unaligned compressed extents were introduced, the following race could occur: [Thread 1] [Thread 2] (z_erofs_fill_bio_vec) <handle a Z_EROFS_PREALLOCATED_FOLIO folio> ... filemap_add_folio (1) (z_erofs_bind_cache) <the same folio is found..> .. .. folio_attach_private (2) filemap_add_folio (3) again Since (1) is executed but (2) hasn't been executed yet, it's possible that another thread finds the same managed folio in z_erofs_bind_cache() for a different pcluster and calls filemap_add_folio() again since folio->private is still Z_EROFS_PREALLOCATED_FOLIO. Fix this by explicitly clearing folio->private before making the folio visible in the managed cache so that another pcluster can simply wait on the locked managed folio as what we did for other shared cases [1]. This only impacts unaligned data compression (`-E48bit` with zstd, for example). [1] Commit 9e2f9d34dd12 ("erofs: handle overlapped pclusters out of crafted images properly") was originally introduced to handle crafted overlapped extents, but it addresses unaligned extents as well.
Where it lives
The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.
fs/erofs/zdata.c
- What this is
- EROFS FILE SYSTEMMAINTAINERS section matched on fs/erofs/ · linux-erofs@lists.ozlabs.org · Maintained
- Kernel module
- erofs
Check it on the machine
grep -wE 'CONFIG_EROFS_FS|CONFIG_EROFS_FS_ZIP' /boot/config-$(uname -r)Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.
lsmod | grep -w erofsPrints a line if that module is loaded right now, and nothing if it is not. One that is not loaded can still be loaded later by anything that needs it.
Show whether Debian builds this, per release
Debian builds this as a loadable module. Every release below compiles it as a module on every flavour, so whether the code is in the running kernel depends on whether that module is loaded.
- bookworm, trixie, forky, sidm
- m
- a loadable module on every flavour - check lsmod, can be blacklisted
- Build switches
- CONFIG_EROFS_FS, CONFIG_EROFS_FS_ZIP
- Reads as
- all on means the file is compiled; any one off means it is not.
From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages
Signals
- Published
- 2026-07-19 (3 months ago)source
- CVSS
- 7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:Hsource recompute it - Attack vector
- local (AV:L)source
- EPSS
- 0.10%, higher than 0.8% of all CVEssource
- CISA KEV
- not listedthe KEV catalogue
- Debian urgency
- unimportantsource
- Subsystem
- fs/erofs
Upstream fixes
The versions the CNA records as introducing and fixing this, and the commit for each. source
| Introduced | Fixed in | Commit |
|---|---|---|
| 6.12.110 | 6.12.110 | 2718cdb6db0f |
| 6.15 | 6.18.34 | 425d32d6288d |
| 6.15 | 7.0.11 | 038166f873c4 |
| 6.15 | 7.1 | 649932fc3815 |
Why the CNA scored it this way
Quoted from the kernel CNA's own scoring file, word for word. A highlighted metric carries the most severe value CVSS v3.1 defines for it, which is what pushes the score up. source
- AV:LAttack vector, local
- The bug is reached only through local VFS read paths (`read`/`pread`/`mmap` faults) on a mounted EROFS volume, flowing through `z_erofs_read_folio`/`z_erofs_readahead` → `z_erofs_runqueue` → `z_erofs_submit_queue` → `z_erofs_fill_bio_vec` and `z_erofs_bind_cache`. There is no network-facing handler; exploitation requires local filesystem access.
- AC:LAttack complexity, low
- The race is between concurrent read/decompress threads that the attacker fully controls by issuing parallel reads against a crafted image with overlapping unaligned compressed extents. No timing or layout conditions outside attacker control are required beyond crafting the image and spawning concurrent I/O.
- PR:LPrivileges required, low
- Triggering the vulnerable managed-cache path requires mounting a crafted EROFS image with unaligned zstd extents, which is achievable with CAP_SYS_ADMIN inside an unprivileged user namespace (`unshare -Urn`) plus loop mount. After mount, only normal unprivileged file read access is needed to hit the race.
- UI:NUser interaction, none
- Once the attacker can mount the crafted image (e.g., via user namespace), exploitation is fully automated through concurrent reads and requires no additional victim interaction such as opening a specific application or clicking a link.
- S:UScope, unchanged
- Impact is confined to kernel memory corruption and privilege escalation within the same kernel/host security boundary; this is not a VM escape, IOMMU bypass, or cross-authority sandbox breakout.
- C:HConfidentiality impact, high
- The race leaves managed folios visible in the page cache while `folio->private` still marks them preallocated, allowing duplicate `filemap_add_folio` and conflicting `folio_attach_private`/`folio_detach_private` bindings to different pclusters—classic page-cache corruption that can yield arbitrary kernel memory disclosure via confused folio ownership.
- I:HIntegrity impact, high
- Associating one managed folio with multiple pclusters corrupts `folio->private` and compressed-bvec references, creating use-after-free/refcount confusion in the managed cache that is exploitable for arbitrary kernel writes or control-flow hijack, not merely a benign error return.
- A:HAvailability impact, high
- The corrupted managed-cache state can cause kernel oops/panic, hung tasks, or deadlock (similar overlapped-pcluster crafted-image failures previously caused syzbot hangs), and any successful UAF in this path also implies high availability impact even before full exploitation.