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 7FA621DE3C3 for ; Wed, 26 Feb 2025 01:59:15 +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=1740535155; cv=none; b=ntzayF44OwskGDd0R/wpzucxNsYfviWiqD7hiJjLcIiWCUS3bvKGMP3QbwVn8EEOjCrgal0iSBGXZlhTxsn4xdVqxOJFrwRk38szmepxAubRP71kZyV5k582wdKeaDrdEgxD0F4vAu2+dgy7N6s/F+SFVPOtwprwKAUbgGlYHvk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740535155; c=relaxed/simple; bh=Rj1FZE556yvELSHyB9xygTU7o1rF3U9mz/qPnKG51pk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=mPKXTd9OT3gciKSVUA4HcLPojN8ExIxzrqoJqgoeYxlTGOJHUgdyzFezORuWO9/Jw5coFyAueJtEJwelFa+CyIX7gmVki240yPsjtt77BjlayepAxLtwV+5vwauyDigfwsFTcep7SSbA9iyufg39zb/9Hm8TbjzqmHhaxbtHrw0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Wu4DvaCT; 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="Wu4DvaCT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B8E9C4CEDD; Wed, 26 Feb 2025 01:59:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740535155; bh=Rj1FZE556yvELSHyB9xygTU7o1rF3U9mz/qPnKG51pk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Wu4DvaCTD20IMP4RtXJIQlL13KWzdyeJMFxdBIRKglYxCS/cHBNYuG+cH2masTECH Jk1/wEoI72C5rC7I/B/IG2fVDcAJz/v1ZQyDI0KKxcOnVHNvKW7olgL/GeNoEsu5Ok 8oBcolvi92+nz9U9PFjD5edL8yBEnQBmVQKToIQ4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49186: clk: visconti: prevent array overflow in visconti_clk_register_gates() Date: Wed, 26 Feb 2025 02:56:31 +0100 Message-ID: <2025022615-CVE-2022-49186-4d69@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=2091; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Rj1FZE556yvELSHyB9xygTU7o1rF3U9mz/qPnKG51pk=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7Stwf+PyuSfmUdb9TP/N6RKV4UkizxZK1gqnznnKfj lLaOF21I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACZSt49hwYIgtxsHXOTOlrEw 3rAJeOnXsMruA1A0efacjvbdBz/Vz71z5UGomlpRynMA 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: clk: visconti: prevent array overflow in visconti_clk_register_gates() This code was using -1 to represent that there was no reset function. Unfortunately, the -1 was stored in u8 so the if (clks[i].rs_id >= 0) condition was always true. This lead to an out of bounds access in visconti_clk_register_gates(). The Linux kernel CVE team has assigned CVE-2022-49186 to this issue. Affected and fixed versions =========================== Issue introduced in 5.17 with commit b4cbe606dc3674b25cb661e7cd1a1c6ddaaafaaa and fixed in 5.17.2 with commit 2723543c1d60278d5aef1c4ad732dbad24b84a81 Issue introduced in 5.17 with commit b4cbe606dc3674b25cb661e7cd1a1c6ddaaafaaa and fixed in 5.18 with commit c5601e0720ce1a3ad895f94a5838530edde01ed3 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-49186 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/clk/visconti/clkc-tmpv770x.c drivers/clk/visconti/clkc.c drivers/clk/visconti/clkc.h 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/2723543c1d60278d5aef1c4ad732dbad24b84a81 https://git.kernel.org/stable/c/c5601e0720ce1a3ad895f94a5838530edde01ed3