CVE-2025-21874 dm-integrity: Avoid divide by zero in table status in Inline mode

Medium 5.5 Published Updated

A divide-by-zero error in the Linux kernel dm-integrity module causes a system crash when querying table status in Inline mode.

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

What is CVE-2025-21874?

CVE-2025-21874 is a medium-severity denial of service vulnerability in Linux kernel, published on 27 Mar 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:

dm-integrity: Avoid divide by zero in table status in Inline mode

In Inline mode, the journal is unused, and journal_sectors is zero.

Calculating the journal watermark requires dividing by journal_sectors, which should be done only if the journal is configured.

Otherwise, a simple table query (dmsetup table) can cause OOPS.

This bug did not show on some systems, perhaps only due to compiler optimization.

On my 32-bit testing machine, this reliably crashes with the following:

: Oops: divide error: 0000 [#1] PREEMPT SMP : CPU: 0 UID: 0 PID: 2450 Comm: dmsetup Not tainted 6.14.0-rc2+ #959 : EIP: dm_integrity_status+0x2f8/0xab0 [dm_integrity] ...

Weakness: CWE-369

Which versions are affected by CVE-2025-21874?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-21874?

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-21874 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2025-21874, DEBIAN-CVE-2025-21874, GHSA-vhqh-g62v-gqxx, UBUNTU-CVE-2025-21874.

Is CVE-2025-21874 in your software?

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

Check your SBOMs for free