From mboxrd@z Thu Jan 1 00:00:00 1970 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 BFFD41A238C for ; Wed, 26 Feb 2025 01:57:33 +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=1740535053; cv=none; b=HPoogKySxkCwdhxWh9t8eHc/h8/Tcs0av/4R5jZPnk2SMgCFcN6nsl5mWdK3pjA4yEMe7oMDbaVFRlt6/FSWqZlzoTZRUbXNix87yTBbJTGFzbiWxu03TssXPXCl9OmqftoCrB8ssrqWNcNYmTJhCyAuEGU5qERRjG/hWm0dsl0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740535053; c=relaxed/simple; bh=e0WTCeOk9A9XhuR8wezriyb2GMEvmjPkIFudcsECkLM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=O+iS0yrZhTna1ITFSouCp1QYMSpjRlcA5dwGG1c7TBkw9vnMPi6Zwy0ZVEkXZB1D6whvy6dYnTBL80wt7X/qeR4hTx4qvYJZDOFoiZSo0uLsBq7fPGvBOI0ERwLG3wwghPJutIMh25GuybUrQ3gEB1tV8cGjcA6os5d4I0Bvf8g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=eU7wRRAh; 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="eU7wRRAh" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36A52C4CEDD; Wed, 26 Feb 2025 01:57:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740535053; bh=e0WTCeOk9A9XhuR8wezriyb2GMEvmjPkIFudcsECkLM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=eU7wRRAhU+PNTYR86TCWYzG09skIEKd3IxvfpyjDlV/2TVCAkGLHvjITVyZBlHXAY VePPY0s6R0MJXX2ruH7lp0GOzmk/1QSBwAPRjSKfl8L3bBlGFYMMSZ6kiavJNzItUv z6omrdYNZL7Ux6n1cTvNeTYeLJCfInkBuODo4E9c= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49044: dm integrity: fix memory corruption when tag_size is less than digest size Date: Wed, 26 Feb 2025 02:54:09 +0100 Message-ID: <2025022650-CVE-2022-49044-43d1@gregkh> X-Mailer: git-send-email 2.48.1 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=2816; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=e0WTCeOk9A9XhuR8wezriyb2GMEvmjPkIFudcsECkLM=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7SvSOb5M18Z80O9Vk5qX2qTNLTb4cKMkoFHgfx7rVZ cNelzVnOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiLzYwLFiVWHjv/uXoDXf7 vrT/PhZzZlXVppUMC87+flSgc+LgpbwzixsfSVzam2twPhUA 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: fix memory corruption when tag_size is less than digest size It is possible to set up dm-integrity in such a way that the "tag_size" parameter is less than the actual digest size. In this situation, a part of the digest beyond tag_size is ignored. In this case, dm-integrity would write beyond the end of the ic->recalc_tags array and corrupt memory. The corruption happened in integrity_recalc->integrity_sector_checksum->crypto_shash_final. Fix this corruption by increasing the tags array so that it has enough padding at the end to accomodate the loop in integrity_recalc() being able to write a full digest size for the last member of the tags array. The Linux kernel CVE team has assigned CVE-2022-49044 to this issue. Affected and fixed versions =========================== Fixed in 4.19.240 with commit 6a95d91c0b315c965198f6ab7dec7c94129e17e0 Fixed in 5.4.190 with commit 7f84c937222944c03f4615ca4742df6bed0e5adf Fixed in 5.10.112 with commit cd02b2687d66f0a8e716384de4b9a0671331f1dc Fixed in 5.15.35 with commit 6b4bf97587ef6c1927a78934b700204920655123 Fixed in 5.17.4 with commit 4d485cf9b609709e45d5113e6e2b1b01254b2fe9 Fixed in 5.18 with commit 08c1af8f1c13bbf210f1760132f4df24d0ed46d6 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-2022-49044 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/6a95d91c0b315c965198f6ab7dec7c94129e17e0 https://git.kernel.org/stable/c/7f84c937222944c03f4615ca4742df6bed0e5adf https://git.kernel.org/stable/c/cd02b2687d66f0a8e716384de4b9a0671331f1dc https://git.kernel.org/stable/c/6b4bf97587ef6c1927a78934b700204920655123 https://git.kernel.org/stable/c/4d485cf9b609709e45d5113e6e2b1b01254b2fe9 https://git.kernel.org/stable/c/08c1af8f1c13bbf210f1760132f4df24d0ed46d6