Skip to content
Commit 7cf06f09 authored by Sughosh Ganu's avatar Sughosh Ganu Committed by Heinrich Schuchardt
Browse files

capsule: Put a check for image index before the update



The current capsule update code compares the image GUID value in the
capsule header with the image GUID value obtained from the
GetImageInfo function of the Firmware Management Protocol(FMP). This
comparison is done to ascertain if the FMP's SetImage function can be
called for the update. Make this checking more robust by comparing the
image_index value passed through the capsule with that returned by the
FMP's GetImageInfo function. This protects against the scenario of the
firmware being updated in a wrong partition/location on the storage
device if an incorrect value has been passed through the capsule,
since the image_index is used to determine the location of the update
on the storage device.

Signed-off-by: default avatarSughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: default avatarMasami Hiramatsu <masami.hiramatsu@linaro.org>
Reviewed-by: default avatarIlias Apalodimas <ilias.apalodimas@linaro.org>
parent 1ea06bc9
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