1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-10-18 00:11:48 +02:00
Files
u-boot-megous/include
Richard Weinberger b177d61708 bootstage: Fix out-of-bounds read in reloc_bootstage()
bootstage_get_size() returns the total size of the data structure
including associated records.
When copying from gd->bootstage, only the allocation size of gd->bootstage
must be used. Otherwise too much memory is copied.

This bug caused no harm so far because gd->new_bootstage is always
large enough and reading beyond the allocation length of gd->bootstage
caused no problem due to the U-Boot memory layout.

Fix by using the correct size and perform the initial copy directly
in bootstage_relocate() to have the whole relocation process in the
same function.

Signed-off-by: Richard Weinberger <richard@nod.at>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit 1779a58c66)
2024-10-08 15:41:08 +02:00
..
2024-07-31 16:51:54 +02:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-06-24 13:34:52 -06:00
2024-07-29 15:01:04 -06:00
2024-08-02 15:16:51 -03:00
2024-07-31 16:51:54 +02:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-07-16 17:09:33 -06:00
2024-06-14 12:59:07 -06:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-09-21 10:59:52 +02:00
2024-08-08 09:28:05 +02:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-05-22 08:55:29 -06:00
2024-07-29 15:01:04 -06:00
2024-06-30 13:58:31 +02:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-07-31 16:52:51 +02:00
2024-05-22 08:55:29 -06:00
2024-07-29 15:01:04 -06:00