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-05-20 13:35:03 -06:00
2024-07-31 16:51:54 +02:00
2024-08-13 09:31:19 -03:00
2024-07-31 09:54:53 +02:00
2024-08-09 18:35:23 +08: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-08-08 09:27:50 +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-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-20 13:35:03 -06:00
2024-07-29 15:01:04 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-07-29 15:01:04 -06:00
2024-10-03 09:08:29 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-07-15 00:17:27 +01:00
2024-06-13 16:30:48 -06:00
2024-07-29 15:01:04 -06:00
2024-07-18 07:40:30 -06:00
2024-05-20 13:35:03 -06:00
2024-07-18 13:51:30 -06:00
2024-06-24 13:34:52 -06:00
2024-10-08 15:41:08 +02:00
2024-05-20 13:35:03 -06:00
2024-07-29 15:01:04 -06:00
2024-05-20 13:35:03 -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-05-20 13:35:03 -06:00
2024-07-29 15:01:04 -06:00
2024-05-20 13:35:03 -06:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-06-07 10:47:59 -06:00
2024-05-20 13:35:03 -06:00
2024-07-29 15:01:04 -06:00
2024-06-10 11:43:37 +02:00
2024-07-29 15:01:04 -06:00
2024-06-30 13:58:31 +02:00
2024-09-21 10:59:06 +02:00
2024-07-16 17:09:33 -06:00
2024-06-14 12:59:07 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-07-29 15:01:04 -06:00
2024-09-21 11:02:25 +02:00
2024-09-21 11:01:41 +02:00
2024-07-29 15:01:04 -06:00
2024-06-07 14:05:03 -06:00
2024-07-09 09:15:37 +02:00
2024-06-28 17:30:45 -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-05-20 13:35:03 -06:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-05-20 13:35:03 -06:00
2024-05-24 13:40:03 -06:00
2024-05-24 13:40:04 -06:00
2024-09-21 10:58:38 +02:00
2024-07-29 15:01:04 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-08-22 09:23:33 +02:00
2024-08-13 08:28:24 -03:00
2024-05-20 13:35:03 -06:00
2024-06-19 12:07:44 -06:00
2024-06-19 12:07:44 -06:00
2024-07-29 15:01:04 -06:00
2024-07-30 14:31:24 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -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-05-20 13:35:03 -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-20 13:35:03 -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-05-20 13:35:03 -06:00
2024-06-13 16:27:07 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-07-29 15:01:04 -06:00
2024-05-20 13:35:03 -06:00
2024-07-31 08:29:16 +02:00
2024-07-29 15:01:04 -06:00
2024-08-05 16:10:36 +02:00
2024-07-29 15:01:04 -06:00
2024-05-20 13:35:03 -06:00
2024-05-22 08:55:29 -06:00
2024-06-20 11:41:43 -06:00
2024-07-29 15:01:04 -06:00
2024-06-30 13:58:31 +02:00
2024-06-30 13:58:31 +02:00
2024-08-08 09:28:00 +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-31 16:52:51 +02:00
2024-05-20 13:35:03 -06:00
2024-05-22 08:55:29 -06:00
2024-06-16 12:14:18 +02:00
2024-07-29 15:01:04 -06:00
2024-07-29 15:01:04 -06:00
2024-08-05 16:13:26 +02:00