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

erofs: fix managed cache race for unaligned extents

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.
Published: 2026-07-19
Score: 7.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The erofs filesystem contains a race condition that is triggered when unaligned compressed extents are processed concurrently. Two threads can add the same folio to the file map while the folio's private data still indicates it is pre‑allocated, allowing the second thread to write the folio again before the first has cleared the flag. This flaw, identified as CWE‑367, can corrupt filesystem data structures and potentially lead to a denial‑of‑service if the filesystem becomes unusable.

Affected Systems

All versions of the Linux kernel that support the erofs filesystem with unaligned compression (for example, the -E48bit zstd mode). The vulnerability exists in any kernel build preceding the commit that clears folio->private before the folio is exposed to the managed cache. Vendors affected are simply Linux kernel releases; no specific product names or version ranges are listed in the CNA data.

Risk and Exploitability

The CVSS score of 7.8 indicates high severity, while the EPSS score of less than 1 % suggests a low probability of real‑world exploitation. The vulnerability is not currently listed in the CISA KEV catalog. Based on the description, the likely attack vector requires an attacker with write access to an erofs partition that has unaligned compression enabled; by triggering concurrent writes, the attacker can induce the race, potentially corrupting data or rendering the filesystem inoperative. Consequently, the risk is moderate to high for affected systems, but active exploitation would be uncommon unless the attackers target specific deployments with this configuration.

Generated by OpenCVE AI on August 3, 2026 at 01:34 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a version that includes the commit that clears folio->private before exposing the folio to the managed cache.
  • If an upgrade is not feasible, disable unaligned data compression on erofs (e.g., avoid using the -E48bit zstd option) or remount the filesystem with compression disabled.
  • Monitor filesystem integrity and consider enabling checksums or regular backups to mitigate potential data loss.

Generated by OpenCVE AI on August 3, 2026 at 01:34 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Ubuntu USN Ubuntu USN USN-8593-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8603-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8618-1 Linux kernel vulnerabilities
History

Thu, 30 Jul 2026 21:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-362

Wed, 22 Jul 2026 00:15:00 +0000


Tue, 21 Jul 2026 22:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-362

Mon, 20 Jul 2026 14:45:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}


Sun, 19 Jul 2026 15:45:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: erofs: fix managed cache race for unaligned extents 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.
Title erofs: fix managed cache race for unaligned extents
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-08-05T12:38:25.282Z

Reserved: 2026-07-19T07:54:57.028Z

Link: CVE-2026-64031

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

Severity :

Publid Date: 2026-07-19T00:00:00Z

Links: CVE-2026-64031 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T01:45:02Z

Weaknesses
  • CWE-367

    Time-of-check Time-of-use (TOCTOU) Race Condition