CVE-2026-139450

erofs: fix xattrs handling when metadata compression is used

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

erofs: fix xattrs handling when metadata compression is used

erofs_bread() reuses a cached folio on page index match without
checking folio->mapping.

xattr.c calls erofs_init_metabuf() twice on the same buffer without
erofs_put_metabuf(); the two in_metabox sources differ, so buf->mapping
can switch while buf->page still belongs to the old address_space.
The next erofs_bread() then reads the wrong mapping, dropping shared
xattrs with METABOX.

We require folio->mapping == buf->mapping in the reuse check; otherwise
drop the cached folio and re-read via the slow path.

Analysis

AI-generated

Technical impact

A flaw in the erofs file system of the Linux kernel allows a stale cache entry to be reused without verifying that the mapping of the folio matches the mapping of the buffer. This incorrect reuse causes the kernel to read a wrong metadata mapping, resulting in the loss of shared extended attributes (xattrs) that use METABOX. The effect is a corruption of protected metadata and can lead to improper file system behavior, including data loss or denial of service. The vulnerability represents a flaw in resource validation and improper handling of cached data structures.

Affected Systems

The issue is present in all versions of the Linux kernel where the erofs file system supports metadata compression. No specific kernel release numbers are supplied, but any Linux distribution that includes the erofs driver and enables metadata compression is potentially affected. Linux kernel builds on x86, ARM, and other architectures that ship erofs are subject to the same bug.

Risk and Exploitability

The CVSS score is not disclosed and the EPSS score is unavailable, and the vulnerability is not listed in the CISA KEV catalog. No public exploitation is known, but the flaw can be triggered when compressed metadata is accessed via a cached folio. The likely attack vector is local, requiring the attacker to manipulate or observe erofs operations, though a remote attack that can influence erofs metadata handling might also be possible on systems exposed to untrusted users. The impact is limited to metadata integrity and could lead to a denial of service if critical xattrs are lost, but it does not immediately provide arbitrary code execution.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a version that incorporates the fix referenced by commit 6b722cefbf83558af07586ca94cdb4b370d5a82d or later
  • If an upgrade is not immediately possible, disable or remove the erofs file system or its metadata compression feature to avoid using the vulnerable code path
  • Monitor the system for missing or corrupted extended attributes and apply corrective actions such as remounting the volume or restoring from backups when corruption is detected

Generated by OpenCVE AI on November 30, 2026 at 22:16 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-665
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: erofs: fix xattrs handling when metadata compression is used erofs_bread() reuses a cached folio on page index match without checking folio->mapping. xattr.c calls erofs_init_metabuf() twice on the same buffer without erofs_put_metabuf(); the two in_metabox sources differ, so buf->mapping can switch while buf->page still belongs to the old address_space. The next erofs_bread() then reads the wrong mapping, dropping shared xattrs with METABOX. We require folio->mapping == buf->mapping in the reuse check; otherwise drop the cached folio and re-read via the slow path.
Title erofs: fix xattrs handling when metadata compression is used
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:34 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:19 PM
Modified
Nov 30, 2026, 2:19 PM