{"id":"CVE-2025-39924","state":"PUBLISHED","title":"erofs: fix invalid algorithm for encoded extents","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nerofs: fix invalid algorithm for encoded extents\n\nThe current algorithm sanity checks do not properly apply to new\nencoded extents.\n\nUnify the algorithm check with Z_EROFS_COMPRESSION(_RUNTIME)_MAX\nand ensure consistency with sbi->available_compr_algs.","publishedAt":"2025-10-01T08:07:12.300Z","updatedAt":"2026-08-05T12:06:05.169Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1d191b4ca51d73699cb127386b95ac152af2b930","status":"affected","lessThan":"db5d7abd379a8dcf030be8f52f99cadf7e397ba8","versionType":"git"},{"version":"1d191b4ca51d73699cb127386b95ac152af2b930","status":"affected","lessThan":"131897c65e2b86cf14bec7379f44aa8fbb407526","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/erofs/zmap.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.15","versionType":"semver"},{"version":"6.16.8","status":"unaffected","lessThanOrEqual":"6.16.*","versionType":"semver"},{"version":"6.17","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/erofs/zmap.c"]}],"references":["https://git.kernel.org/stable/c/db5d7abd379a8dcf030be8f52f99cadf7e397ba8","https://git.kernel.org/stable/c/131897c65e2b86cf14bec7379f44aa8fbb407526"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/39xxx/CVE-2025-39924.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-39924","state":"PUBLISHED","datePublished":"2025-10-01T08:07:12.300Z","dateUpdated":"2026-08-05T12:06:05.169Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T07:20:57.147Z"},"containers":{"cna":{"title":"erofs: fix invalid algorithm for encoded extents","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nerofs: fix invalid algorithm for encoded extents\n\nThe current algorithm sanity checks do not properly apply to new\nencoded extents.\n\nUnify the algorithm check with Z_EROFS_COMPRESSION(_RUNTIME)_MAX\nand ensure consistency with sbi->available_compr_algs."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1d191b4ca51d73699cb127386b95ac152af2b930","status":"affected","lessThan":"db5d7abd379a8dcf030be8f52f99cadf7e397ba8","versionType":"git"},{"version":"1d191b4ca51d73699cb127386b95ac152af2b930","status":"affected","lessThan":"131897c65e2b86cf14bec7379f44aa8fbb407526","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/erofs/zmap.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.15","versionType":"semver"},{"version":"6.16.8","status":"unaffected","lessThanOrEqual":"6.16.*","versionType":"semver"},{"version":"6.17","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/erofs/zmap.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/db5d7abd379a8dcf030be8f52f99cadf7e397ba8"},{"url":"https://git.kernel.org/stable/c/131897c65e2b86cf14bec7379f44aa8fbb407526"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - Triggering requires a crafted EROFS image to be mounted and a file within it read on the local system (loop/USB/file-backed mount, container image snapshotter, or automounter); erofs parses no remote protocol data, so the attack surface is local file/block input.\nAC:L - The algorithm index is a plain 4-bit field of the on-disk extent record (`ext->plen >> 28`), so setting it to 7..15 deterministically yields out-of-bounds index 6..14 into the 6-entry `z_erofs_decomp[]` table on every read of that file — no race, no heap grooming, and the global layout is fixed per build.\nPR:N - The attacker needs no privileges on the target at all — they only need to supply the malicious image file/blob, which is then mounted by an automounter, container image snapshotter, or ordinary user; this matches the scoring of the sibling encoded-extent fix CVE-2026-43166.\nUI:R - Some agent on the target must mount the attacker-supplied EROFS image and read a file from it before `z_erofs_decompress_pcluster()` indexes the decompressor table.\nS:U - The out-of-bounds read and subsequent indirect call occur entirely within the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The out-of-bounds read pulls arbitrary kernel `.data` contents (up to 72 bytes past `z_erofs_decomp[]`, KASAN-confirmed by syzbot) and the resulting pointer's `->name` field is dereferenced and printed to the kernel log by `erofs_err()`, disclosing out-of-bounds kernel memory as a string.\nI:H - The out-of-bounds value is treated as a `struct z_erofs_decompressor *` and its `->decompress` member is invoked as a function pointer (`zdata.c:1295`) with an attacker-selectable index — a type-confusion/control-flow-hijack primitive, not merely a data read.\nA:H - In practice the OOB slot holds a non-decompressor value, so `alg->decompress` is a garbage pointer whose call/dereference causes a general protection fault or oops (KASAN reports global-out-of-bounds), crashing the kernel on every read of the crafted file."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:06:05.169Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15","versionEndExcluding":"6.16.8"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15","versionEndExcluding":"6.17"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":5.5,"attackVector":"LOCAL","baseSeverity":"MEDIUM","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","integrityImpact":"NONE","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"NONE"}},{"other":{"type":"ssvc","content":{"id":"CVE-2025-39924","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2026-01-14T17:43:35.519769Z"}}}],"problemTypes":[{"descriptions":[{"lang":"en","type":"CWE","description":"CWE-noinfo Not enough information"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-01-14T17:52:56.071Z"}}]}}}