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 38B7821C16F for ; Wed, 26 Feb 2025 02:27:45 +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=1740536865; cv=none; b=QWbnVHvl8oozNfC2NCZ3EPXCfnnAnjiiBHAK5xbQzf4bLXWujPpnk5Go8Qj4iuMVfzekm+9pVXx8zrE25F3ZUVaHMPiUtTznSnwuTEcVqLOslXr7Nlb5K/ST2JaQ5c0Xz0/c/N8qIJHtC3lB08p6d5mnLnCbj+SI2Sx1D8x6uOA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536865; c=relaxed/simple; bh=yyASCcwBVunMf29uos4c2z++GI5OgBg4OnENRzyfeTU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=hnm3FHSBDGKfdJs+c53h7MGoYug6TwtvKG2/OTgYsK1X+TGGxFzXBU5uZBbOT3rRdG5zRnX/7mKOQsQ6MuuOOs2X9l4ew9Zr2LBg2aDF9lSpl0cIsO9oGkqJKcb9uwlJV6DsT9tUIOchjs9JNMdR4fccqHDRo/Ugke5SfXyXXio= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=kFgsFlEi; 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="kFgsFlEi" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E273C4CEDD; Wed, 26 Feb 2025 02:27:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740536865; bh=yyASCcwBVunMf29uos4c2z++GI5OgBg4OnENRzyfeTU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=kFgsFlEi1qSmt4C/AZ4jv6Cts1Ple3SlUdugdAOQktHjciSp2PriRRfJ+CZWpgJwW O7gWN/OzcQOWcxfcELYOvgWcohu3uZskKDBOWkpVgQIJQHYKgZ0ihVDCUb6T52GOrQ VkIsgqTH2fTN9k7zjRtpDNQU2a3ssgDMyKzUyz4o= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49710: dm mirror log: round up region bitmap size to BITS_PER_LONG Date: Wed, 26 Feb 2025 03:24:33 +0100 Message-ID: <2025022630-CVE-2022-49710-0591@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=2850; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=yyASCcwBVunMf29uos4c2z++GI5OgBg4OnENRzyfeTU=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7qp5xPWTcIc7gcorLbZ2bTuKl/x83xz7tLN8ax5kml aMUVSvaEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABNZps4wh/vxFoOJzdN2zJzm Ij4zROzlkz8FVxkW7LT0NN/uevjaTPPJmbO9Tdnl04vnAQA= 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 mirror log: round up region bitmap size to BITS_PER_LONG The code in dm-log rounds up bitset_size to 32 bits. It then uses find_next_zero_bit_le on the allocated region. find_next_zero_bit_le accesses the bitmap using unsigned long pointers. So, on 64-bit architectures, it may access 4 bytes beyond the allocated size. Fix this bug by rounding up bitset_size to BITS_PER_LONG. This bug was found by running the lvm2 testsuite with kasan. The Linux kernel CVE team has assigned CVE-2022-49710 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.18 with commit 29121bd0b00ebb9524971a583fea4a2f7afe8041 and fixed in 5.4.200 with commit ae460312875159285cef5bf3dc654593f404a1ef Issue introduced in 2.6.18 with commit 29121bd0b00ebb9524971a583fea4a2f7afe8041 and fixed in 5.10.124 with commit ba751f0d25f07aa21ce9b85372a3792bf7969d13 Issue introduced in 2.6.18 with commit 29121bd0b00ebb9524971a583fea4a2f7afe8041 and fixed in 5.15.49 with commit 0d2209b54f1de0c2f99cab246d4cf2cfe24aaaa9 Issue introduced in 2.6.18 with commit 29121bd0b00ebb9524971a583fea4a2f7afe8041 and fixed in 5.18.6 with commit 9a02f3275acc628c0d956be771405ced79ac36df Issue introduced in 2.6.18 with commit 29121bd0b00ebb9524971a583fea4a2f7afe8041 and fixed in 5.19 with commit 85e123c27d5cbc22cfdc01de1e2ca1d9003a02d0 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-49710 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-log.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/ae460312875159285cef5bf3dc654593f404a1ef https://git.kernel.org/stable/c/ba751f0d25f07aa21ce9b85372a3792bf7969d13 https://git.kernel.org/stable/c/0d2209b54f1de0c2f99cab246d4cf2cfe24aaaa9 https://git.kernel.org/stable/c/9a02f3275acc628c0d956be771405ced79ac36df https://git.kernel.org/stable/c/85e123c27d5cbc22cfdc01de1e2ca1d9003a02d0