[PATCH] reloc_bootstage: Fix out-of-bounds read

Richard Weinberger richard at sigma-star.at
Mon Jul 29 23:57:19 CEST 2024


Simon,

Am Samstag, 13. Juli 2024, 17:13:50 CEST schrieb Simon Glass:
> Can you use 'bootstage' as the commit tag?

Sure.

> > +       debug("Copying bootstage from %p to %p\n", gd->bootstage,
> > +             gd->new_bootstage);
> > +       memcpy(gd->new_bootstage, gd->bootstage, sizeof(struct bootstage_data));
> 
> I would like to have the relocation addresses in board_f like with
> other relocations, so it is easy to see what is happening, in one
> file. So how about passing the old address to bootstage_relocate() so
> it doesn't need to access gd->new_bootstage ?

You mean passing the *new* address?

Thanks,
//richard

-- 
​​​​​sigma star gmbh | Eduard-Bodem-Gasse 6, 6020 Innsbruck, AUT
UID/VAT Nr: ATU 66964118 | FN: 374287y




More information about the U-Boot mailing list