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 202382877C3 for ; Wed, 18 Jun 2025 11:02:49 +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=1750244569; cv=none; b=DX0UWyr+k98L1NlAYxSrLUidBmhE3QJGUwg3kLdCqj7betbiIywMUcKXc/VEsto3LsdWXyN05CfH8ZWtEZjibBes/OGhI8afDfRFWZSLABgStbqHeFKJrn3EoifZJE+cJmHhILnyJ72FYTzPksgqaZTpYSv/kaxNsNL/qyluebg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750244569; c=relaxed/simple; bh=7eTLYzn1xHZro5d11WZZYs/6o7n+AJnSqEiQKH2J4YU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=jropSfvn/jW/G4oKd3YzOL7kpbtI83Cf3EckwRAxoAI1piDFhJT6KzlDH4fWr1xZr7zAAUR93AHUBym8XjrRELr1wVDR6TVZGUAiGFU3sDRunShbyARQsR6xFuwm+H13HGIg8LSshwEGutwyPoRLrurGnHZflXF7nSkLOfMpos8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=OxYCM7np; 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="OxYCM7np" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A45F0C4CEE7; Wed, 18 Jun 2025 11:02:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750244569; bh=7eTLYzn1xHZro5d11WZZYs/6o7n+AJnSqEiQKH2J4YU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=OxYCM7npzgt0QW58e0H8138FL8ZAd+kqwHrvGEeS2qVzGHbZtABVZpay4SOw0JDu+ pmIab4A0ANipRnZZW3zqt8NjAwjiVmEQCdjA6LdBC4tppOxo7hFI9Qh6TE6neAljPd ybPJ4cnySHnbEbt9LkVTbW7MrHLQ0HzSpPKNtIZQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49946: clk: bcm: rpi: Prevent out-of-bounds access Date: Wed, 18 Jun 2025 13:00:11 +0200 Message-ID: <2025061808-CVE-2022-49946-6601@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=2517; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=pYKm86Yzjg3H4MqnWWx/2F7wEZ4M4RDJj/5yYFCYHbo=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlBcyz47LY2y0470Gt5ZbfhvsO+4XZBF1kmT9DT2C1/t yzitcrKjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZiI1w+G+RnG2pIFp32EviS/ n5OSfk/hcP6pMoYFF1TctN4LZB+VlUnR+ujLeyos2kERAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: clk: bcm: rpi: Prevent out-of-bounds access The while loop in raspberrypi_discover_clocks() relies on the assumption that the id of the last clock element is zero. Because this data comes from the Videocore firmware and it doesn't guarantuee such a behavior this could lead to out-of-bounds access. So fix this by providing a sentinel element. The Linux kernel CVE team has assigned CVE-2022-49946 to this issue. Affected and fixed versions =========================== Issue introduced in 5.9 with commit 93d2725affd65686792f4b57e49ef660f3c8c0f9 and fixed in 5.10.142 with commit fcae47b2d23c81603b01f56cf8db63ed64599d34 Issue introduced in 5.9 with commit 93d2725affd65686792f4b57e49ef660f3c8c0f9 and fixed in 5.15.66 with commit ff0b144d4b0a9fbd6efe4d2c0a4b6c9bae2138d2 Issue introduced in 5.9 with commit 93d2725affd65686792f4b57e49ef660f3c8c0f9 and fixed in 5.19.8 with commit c8b04b731d43366824841ebdca4ac715f95e0ea4 Issue introduced in 5.9 with commit 93d2725affd65686792f4b57e49ef660f3c8c0f9 and fixed in 6.0 with commit bc163555603e4ae9c817675ad80d618a4cdbfa2d 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-49946 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/bcm/clk-raspberrypi.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/fcae47b2d23c81603b01f56cf8db63ed64599d34 https://git.kernel.org/stable/c/ff0b144d4b0a9fbd6efe4d2c0a4b6c9bae2138d2 https://git.kernel.org/stable/c/c8b04b731d43366824841ebdca4ac715f95e0ea4 https://git.kernel.org/stable/c/bc163555603e4ae9c817675ad80d618a4cdbfa2d