Commit e434311d authored by Heinrich Schuchardt's avatar Heinrich Schuchardt
Browse files

efi_loader: avoid invalid free

load_options passed from do_efibootmgr() to do_bootefi_exec() may contain
invalid data from the stack which will lead to an invalid free().

Fixes: 0ad64007

 ("efi_loader: set load options in boot manager")
Signed-off-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
parent 9abb01af
...@@ -275,7 +275,7 @@ static efi_status_t try_load_entry(u16 n, efi_handle_t *handle, ...@@ -275,7 +275,7 @@ static efi_status_t try_load_entry(u16 n, efi_handle_t *handle,
memcpy(*load_options, lo.optional_data, size); memcpy(*load_options, lo.optional_data, size);
ret = efi_set_load_options(*handle, size, *load_options); ret = efi_set_load_options(*handle, size, *load_options);
} else { } else {
load_options = NULL; *load_options = NULL;
} }
error: error:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment