[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025032710-CVE-2025-21874-d5d9@gregkh>
Date: Thu, 27 Mar 2025 15:58:08 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: CVE-2025-21874: dm-integrity: Avoid divide by zero in table status in Inline mode
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]
...
The Linux kernel CVE team has assigned CVE-2025-21874 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.11 with commit fb0987682c629c1d2c476f35f6fde405a5e304a4 and fixed in 6.12.18 with commit 22c6f577b3cb184857b440ae5e5916f6c9e7021d
Issue introduced in 6.11 with commit fb0987682c629c1d2c476f35f6fde405a5e304a4 and fixed in 6.13.6 with commit 06d9895f265282e939a8933bb18de82eba2b4dda
Issue introduced in 6.11 with commit fb0987682c629c1d2c476f35f6fde405a5e304a4 and fixed in 6.14 with commit 7fb39882b20c98a9a393c244c86b56ef6933cff8
Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to
older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2025-21874
will be updated if fixes are backported, please check that for the most
up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/md/dm-integrity.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes. Individual
changes are never tested alone, but rather are part of a larger kernel
release. Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all. If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
https://git.kernel.org/stable/c/22c6f577b3cb184857b440ae5e5916f6c9e7021d
https://git.kernel.org/stable/c/06d9895f265282e939a8933bb18de82eba2b4dda
https://git.kernel.org/stable/c/7fb39882b20c98a9a393c244c86b56ef6933cff8
Powered by blists - more mailing lists