Richard Weinberger
1779a58c66
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 >
2024-08-15 14:35:31 -06:00
..
2024-08-09 16:03:20 -06:00
2024-08-13 06:16:08 +02:00
2024-07-31 09:54:53 +02:00
2024-07-29 15:01:36 -06:00
2024-07-22 13:47:57 -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-31 09:53:01 +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-26 01:28:11 +02:00
2024-08-09 16:03:20 -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-08-07 08:49:10 -06:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-07-18 07:40:30 -06:00
2024-07-18 13:51:30 -06:00
2024-08-15 14:35:31 -06:00
2024-07-29 15:01:04 -06:00
2024-08-01 15:33:19 -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-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-07-16 17:09:33 -06:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-08-15 14:35:15 -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-08-13 06:23:15 +02:00
2024-07-18 13:51:30 -06:00
2024-07-29 15:01:04 -06:00
2024-07-30 14:31:24 -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-08-09 16:03:19 -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-31 08:29:16 +02:00
2024-07-29 15:01:04 -06:00
2024-08-09 16:03:20 -06:00
2024-07-29 15:01:04 -06:00
2024-08-09 16:03:20 -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-31 16:52:51 +02:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00