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

Not scored Published Updated

A crafted EROFS image can cause an infinite loop in the Linux kernel, leading to a denial of service.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-68251?

CVE-2025-68251 is a denial of service vulnerability in Linux, published on 16 Dec 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official 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()`.

Which versions are affected by CVE-2025-68251?

How do I fix CVE-2025-68251?

Apply the vendor's patch.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2025-68251 being exploited?

There is no known exploitation of CVE-2025-68251 in the wild and no public exploit code.

Sources

Also known as AZL-87137, BELL-CVE-2025-68251, DEBIAN-CVE-2025-68251, GHSA-8mgh-pc39-hmfh, ROOT-OS-DEBIAN-13-CVE-2025-68251, ROOT-OS-UBUNTU-2404-CVE-2025-68251 and 1 more.

Is CVE-2025-68251 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free