Heinrich Schuchardt a9080e600c efi_loader: avoid buffer overrun in efi_var_restore()
The value of buf->length comes from outside U-Boot and may be incorrect.
We must avoid to overrun our internal buffer for excessive values.

If buf->length is shorter than the variable file header, the variable
file is invalid.

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2026-03-14 08:14:01 +01:00
..
2025-11-06 08:30:33 -06:00
2025-04-11 12:16:44 -06:00
2024-07-15 12:12:18 -06:00
2024-07-15 12:12:18 -06:00
2025-04-11 12:16:44 -06:00
2024-07-15 12:12:18 -06:00
2025-07-26 07:34:31 +02:00
2026-03-09 15:26:34 -06:00
2024-07-15 12:12:18 -06:00
2024-10-11 11:44:48 -06:00
2024-07-15 12:12:18 -06:00
2024-07-15 12:12:18 -06:00
2024-07-15 12:12:18 -06:00
2024-07-15 12:12:18 -06:00
2025-02-03 16:01:36 -06:00
2025-02-03 16:01:36 -06:00
2024-12-06 17:47:23 -06:00
2025-04-03 16:54:49 -06:00
2024-12-06 17:47:23 -06:00
2025-01-18 17:12:47 -06:00
2024-12-06 17:47:23 -06:00
2026-02-11 11:13:47 +02:00
2025-02-12 12:37:12 -06:00
2024-11-13 08:14:23 -06:00
2025-01-28 08:58:41 +02:00
2025-12-04 09:38:58 -06:00
2024-10-14 17:58:30 -06:00
2025-12-04 09:38:58 -06:00
2025-04-23 13:19:44 -06:00
2024-11-13 08:16:41 -06:00