[PATCH 1/3] clk: bcm: rpi: Prevent out-of-bounds access

Stephen Boyd sboyd at kernel.org
Tue Aug 23 15:52:01 PDT 2022


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 <phil at raspberrypi.com>
> Signed-off-by: Stefan Wahren <stefan.wahren at i2se.com>
> ---

Applied to clk-fixes



More information about the linux-arm-kernel mailing list