CVE-2025-40241

Source
https://cve.org/CVERecord?id=CVE-2025-40241
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40241.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-40241
Downstream
Published
2025-12-04T15:31:30.594Z
Modified
2025-12-04T20:06:48.281320Z
Summary
erofs: fix crafted invalid cases for encoded extents
Details

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.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40241.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
1d191b4ca51d73699cb127386b95ac152af2b930
Fixed
00d8fe0b72f4ca0a983abced36aad2160038c421
Fixed
a429b76114aaca3ef1aff4cd469dcf025431bd11

Affected versions

v6.*
v6.14
v6.14-rc7
v6.15
v6.15-rc1
v6.15-rc2
v6.15-rc3
v6.15-rc4
v6.15-rc5
v6.15-rc6
v6.15-rc7
v6.16
v6.16-rc1
v6.16-rc2
v6.16-rc3
v6.16-rc4
v6.16-rc5
v6.16-rc6
v6.16-rc7
v6.17
v6.17-rc1
v6.17-rc2
v6.17-rc3
v6.17-rc4
v6.17-rc5
v6.17-rc6
v6.17-rc7
v6.17.1
v6.17.2
v6.17.3
v6.17.4
v6.17.5
v6.18-rc1

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40241.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.15.0
Fixed
6.17.6

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40241.json"