{"id":"CVE-2025-40241","summary":"erofs: fix crafted invalid cases for encoded extents","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nerofs: fix crafted invalid cases for encoded extents\n\nRobert recently reported two corrupted images that can cause system\ncrashes, which are related to the new encoded extents introduced\nin Linux 6.15:\n\n  - The first one [1] has plen != 0 (e.g. plen == 0x2000000) but\n    (plen & Z_EROFS_EXTENT_PLEN_MASK) == 0. It is used to represent\n    special extents such as sparse extents (!EROFS_MAP_MAPPED), but\n    previously only plen == 0 was handled;\n\n  - The second one [2] has pa 0xffffffffffdcffed and plen 0xb4000,\n    then \"cur [0xfffffffffffff000] += bvec.bv_len [0x1000]\" in\n    \"} while ((cur += bvec.bv_len) \u003c end);\" wraps around, causing an\n    out-of-bound access of pcl-\u003ecompressed_bvecs[] in\n    z_erofs_submit_queue().  EROFS only supports 48-bit physical block\n    addresses (up to 1EiB for 4k blocks), so add a sanity check to\n    enforce this.","modified":"2026-03-20T12:43:14.063043Z","published":"2025-12-04T15:31:30.594Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40241.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/00d8fe0b72f4ca0a983abced36aad2160038c421"},{"type":"WEB","url":"https://git.kernel.org/stable/c/a429b76114aaca3ef1aff4cd469dcf025431bd11"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40241.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-40241"},{"type":"PACKAGE","url":"https://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"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40241.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"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"}}],"schema_version":"1.7.5"}