[PATCH v1 1/1] bootm: move OS index bound check into the legacy path
Tom Rini
trini at konsulko.com
Wed Jul 1 21:32:11 CEST 2026
On Fri, 19 Jun 2026 14:45:51 +0000, Aristo Chen wrote:
> Commit 103b1e7ce8cc ("bootm: bound-check OS index in
> bootm_os_get_boot_func()") added a range check to the shared accessor so
> an out-of-range OS id can no longer drive an out-of-bounds read of
> boot_os[]. That accessor is reached by every image format, but only a
> legacy uImage can deliver an unchecked value. bootm_find_os() takes the
> raw 8-bit ih_os byte straight from image_get_os() for legacy images,
> whereas the FIT path reaches the accessor only after fit_image_load()
> has rejected any image whose os is not one of the supported types, and
> the Android path hardcodes IH_OS_LINUX. The check can therefore never
> fail for FIT, where it only adds confusion and code.
>
> [...]
Applied to u-boot/next, thanks!
[1/1] bootm: move OS index bound check into the legacy path
commit: 3900903a588964555c9e76cca53ada7d217c00f7
--
Tom
More information about the U-Boot
mailing list