CVE-2025-40241: erofs: fix crafted invalid cases for encoded extents

Published Dec 4, 2025
·
Updated

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

erofs: fix crafted invalid cases for encoded extents

Robert recently reported two corrupted images that can cause system crashes, which are related to the new encoded extents introduced in Linux 6.15:

- The first one [1] has plen != 0 (e.g. plen == 0x2000000) but (plen & ZEROFSEXTENTPLENMASK) == 0. It is used to represent special extents such as sparse extents (!EROFSMAPMAPPED), but previously only plen == 0 was handled;

- The second one [2] has pa 0xffffffffffdcffed and plen 0xb4000, then "cur [0xfffffffffffff000] += bvec.bvlen [0x1000]" in "} while ((cur += bvec.bvlen) < end);" wraps around, causing an out-of-bound access of pcl->compressedbvecs[] in zerofssubmitqueue(). EROFS only supports 48-bit physical block addresses (up to 1EiB for 4k blocks), so add a sanity check to enforce this.

Affected Software

1 affected component
Linux Kernel>6.15

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Linux kernel erofs (encoded extents) to a version that resolves this vulnerability.

    Fixed in 6.15Patch erofs: fix crafted invalid cases for encoded extents
  2. Configuration

    In z_erofs_submit_queue() (erofs), add/enforce a sanity check for crafted invalid cases for encoded extents so that invalid plen handling (including out-of-bound access to pcl->compressed_bvecs[] and wraparound) is prevented; ensure the additional crafted cases beyond only plen == 0 are handled.

    Linux kernel erofs encoded extents sanity check / invalid cases handling = enabled

Event History

Dec 4, 2025
CVE Published
via MITRE·03:31 PM
Data Sourced
via MITRE·03:31 PM
DescriptionSeverity
Data Sourced
via NVD·04:16 PM
DescriptionSeverity

Frequently Asked Questions

1

What is the severity of CVE-2025-40241?

CVE-2025-40241 has been classified with a severity rating that indicates a potential for system instability due to crafted invalid cases.

2

How do I fix CVE-2025-40241?

To fix CVE-2025-40241, it is advised to update the Linux kernel to a version later than 6.15 where this vulnerability has been resolved.

3

What versions of the Linux kernel are affected by CVE-2025-40241?

CVE-2025-40241 specifically affects the Linux kernel version 6.15.

4

What type of vulnerability is CVE-2025-40241?

CVE-2025-40241 is a vulnerability related to system crashes caused by corrupted images affecting the encoded extents in the Linux kernel.

5

Who reported CVE-2025-40241?

CVE-2025-40241 was reported by an individual named Robert, who identified issues with corrupted image handling.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203