[PATCH] fdt: Fix bounds check in devfdt_get_addr_index

Simon Glass sjg at chromium.org
Mon Oct 31 20:27:11 CET 2022


On Sun, 30 Oct 2022 at 21:41, Samuel Holland <samuel at sholland.org> wrote:
>
> reg must contain enough cells for the entire next address/size pair
> after skipping `index` pairs. The previous code allows an out-of-bounds
> read when na + ns > 1.
>
> Fixes: 69b41388ba45 ("dm: core: Add a new api to get indexed device address")
> Signed-off-by: Samuel Holland <samuel at sholland.org>
> ---
>
>  drivers/core/fdtaddr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list