Re: [PATCH v6 01/10] of: fix out-of-bounds read in of_alias_scan() stem parser

From: Geert Uytterhoeven

Date: Thu Aug 06 2026 - 04:13:32 EST


On Wed, 5 Aug 2026 at 22:31, Abdurrahman Hussain <abdurrahman@xxxxxxxxxx> wrote:
> The stem parser tests isdigit(*(end - 1)) before checking end > start
> and so reads one byte before the property name when the name is empty
> or all digits. Check the bound first.
>
> Fixes: 611cad720148 ("dt: add of_alias_scan and of_alias_get_id")
> Cc: stable@xxxxxxxxxxxxxxx
> Assisted-by: Claude:claude-fable-5 [Claude Code]
> Signed-off-by: Abdurrahman Hussain <abdurrahman@xxxxxxxxxx>

Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds