Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ACB8B211A3D for ; Thu, 27 Mar 2025 14:59:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743087562; cv=none; b=kytUIT71XuG/2kaBl/OMADaK+m1VPQ9BxSXAe7Kcoahi/HKe48sEoKUGvAykIbgOqGeedZqVWG823sOr5qJSvcWhV6lxpyX3BQc06qefeWWWlhZM7+2kA5EXI7Rv4vJie+e6xo2M60pp3yS2j27A5WWffW7TZuf5QWQfovchTtc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743087562; c=relaxed/simple; bh=9SsctTE1MQaHcR8BY4GTpISsIGMVjfmk5JvVXFnIKFw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=gv0MUVQds8jBjQO3qnngqymIsc/TBeNv7GZ0LtZ4sJOlmBM2vdoebfB7Ablvg449gKmFvSXx5F6NzUOW0EjTb3t2JGY6Hbv9dGKNZvBWqCEqrdmDrI3ZBx6/zUxzr6CnPkXFsLg6/quHWA0PerqS0bFBJjcCTGgxvpW8SrieHVM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=IBGyituu; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="IBGyituu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B28DFC4CEDD; Thu, 27 Mar 2025 14:59:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1743087562; bh=9SsctTE1MQaHcR8BY4GTpISsIGMVjfmk5JvVXFnIKFw=; h=From:To:Cc:Subject:Date:Reply-to:From; b=IBGyituu6o14YagOlWPQHzICcP9aCWeJVN2juvTk3oIb2N8y0qiQL5Bw0R4pFe4Ul k0xvAohrOYNuf0Hho+2qkXFDTJj2jmzz5afzwLjBF2MgeuwW6twL7qWmjA/sOXJHZi JgZjnumon1Q8Ug7Cfu3hZlixVmizYEY13vxLoPIQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21874: dm-integrity: Avoid divide by zero in table status in Inline mode Date: Thu, 27 Mar 2025 15:58:08 +0100 Message-ID: <2025032710-CVE-2025-21874-d5d9@gregkh> X-Mailer: git-send-email 2.49.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2611; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=9SsctTE1MQaHcR8BY4GTpISsIGMVjfmk5JvVXFnIKFw=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlP05ueveOvkkw6HqulO/HChOveux2fnJ+00PnHOZtcj tNRKxau6YhlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJKL1gmO/a/Cf+4cFvde/P mH1m3P9R8Xc353mG+Q7Nmv9Xbal56HyuXoutL+5MuvKvAAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit 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