From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8B6B5C32772 for ; Tue, 23 Aug 2022 22:53:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:To:Cc:From:Subject: References:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AyIkciy3hCtk2eA+9cfjNmB9lGs5QrFS81kOXgk9JfQ=; b=KiAXrUnh/zIChC g2PR0Pa2InrHaH74eYeFH9CSs+MLhhWuEk0HGmorJ034jAuMfLUSFuaWmZoRUkfQHwenWGOQnDpSX 8jCy6YBJ++kjtmiaxrH27s0416ZrV+34BIKXD76/KrDJf92I6Ip3TUBjUPgc9uAAfmzVNCJCirT+m WskHPijJg3H1UC0/5vguJzFfAGrWE48an4eN3bp4Q3yEBgV5t6m4EpjgK4nEcbNmpvPz5lZRtMl82 h502bvSYvNRU7s4GJ/dHQmq1fl9VCUeBf9kI2RkE+1vr6NF5dZBLiyKdLwV7YOehbGjY/4k7vo9dm 0A+jVJB/mpULo5aZWLig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oQckj-0091lU-4i; Tue, 23 Aug 2022 22:52:09 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oQckg-0091jv-Ai for linux-arm-kernel@lists.infradead.org; Tue, 23 Aug 2022 22:52:07 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id F2044B821EE; Tue, 23 Aug 2022 22:52:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 92B6DC433D6; Tue, 23 Aug 2022 22:52:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661295123; bh=ypcp98VMiz7kBu3cGUG6LeZApIJKQVW/y2vnoL910eE=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=DZr0NmbKznJeIxoMhkhF17OzDK9v7sRfbGjSpGHBhpuFXyaHu8pNRwi/f4WhYs1gu fekrHQ9D3yzuX7WWC9la2iCPghUT/3qpBnlV2W+ecrQekSCy1AuZS+x0Q9ITg7vxwq kqDbik3OjleTwSvxURbUmFKUVr9Qlj3oR+nuq1v0HACDIpkYN1ZVMQP1vxVdvfFL28 daUG1+gDBGClvtNGSaBHq3pBpfmKnHGbiEb1tWlquRDv1zfMlpceI2OWt+kdXL2L+8 QmiOq4fP2jZetKEMikK6z3hOqwNJhTGV8qPoOaI2pC/d5yPnDvrHSX7VAXOb2o/Xyg ULw0dMO4rLqNw== MIME-Version: 1.0 In-Reply-To: <20220713154953.3336-2-stefan.wahren@i2se.com> References: <20220713154953.3336-1-stefan.wahren@i2se.com> <20220713154953.3336-2-stefan.wahren@i2se.com> Subject: Re: [PATCH 1/3] clk: bcm: rpi: Prevent out-of-bounds access From: Stephen Boyd Cc: bcm-kernel-feedback-list@broadcom.com, Maxime Ripard , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Stefan Wahren , Phil Elwell To: Florian Fainelli , Michael Turquette , Stefan Wahren Date: Tue, 23 Aug 2022 15:52:01 -0700 User-Agent: alot/0.10 Message-Id: <20220823225203.92B6DC433D6@smtp.kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220823_155206_536131_0A61B53E X-CRM114-Status: GOOD ( 10.79 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Quoting Stefan Wahren (2022-07-13 08:49:51) > 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. > > Fixes: 93d2725affd6 ("clk: bcm: rpi: Discover the firmware clocks") > Link: https://github.com/raspberrypi/firmware/issues/1688 > Suggested-by: Phil Elwell > Signed-off-by: Stefan Wahren > --- Applied to clk-fixes _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel