Skip to content
Commit 5d49b32f authored by Masami Hiramatsu's avatar Masami Hiramatsu Committed by Heinrich Schuchardt
Browse files

efi_loader: capsule: Record capsule result only if capsule is read



Record capsule update result only if the capsule file is
successfully read, because the capsule GUID is not sure when
the file can not be read or the file is not a capsule.
Without this fix, if user puts a dummy (non-capsule) file
under (ESP)EFI/UpdateCapsule, U-Boot causes a synchronous
abort.

This also fixes use-after-free bug of the 'capsule' variable.

Fixes: c74cd8bd ("efi_loader: capsule: add capsule_on_disk support")
Signed-off-by: default avatarMasami Hiramatsu <masami.hiramatsu@linaro.org>
Reviewed-by: default avatarIlias Apalodimas <ilias.apalodimas@linaro.org>
parent 3961bd9b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment