summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHem Parekh <[email protected]>2026-07-27 13:03:36 +0200
committerHeinrich Schuchardt <[email protected]>2026-07-27 18:50:28 +0200
commit3d47f55832833744b870dc8b9c7564ceed48d2bd (patch)
treeadb2e827fdd465d71e03de371c151a479eda15e4 /include
parentaf5234975669b64898ecde92b4b2d6236d24a495 (diff)
efi_loader: check efi_deserialize_load_option() in get_dp_device()
get_dp_device() reads a Boot#### variable and passes its contents to efi_deserialize_load_option() but ignores the return value. On failure efi_deserialize_load_option() may return without having initialised the caller's struct efi_load_option, and even on a malformed device path it sets lo.file_path before validating it with efi_dp_check_length(). As a result get_dp_device() can proceed to walk lo.file_path with efi_dp_split_file_path() (via efi_dp_dup()/efi_dp_size()) on a device path that was never validated, or on an uninitialised pointer when the variable is too short to be parsed. A device-path node with a length of zero makes the walk loop forever, and a length below the 4-byte node header leads to an out-of-bounds read. The Boot#### variable is attacker-controlled in threat models where writing EFI variables does not imply the ability to execute firmware code, so this is reachable during capsule-on-disk processing at boot. Check the return value and bail out, as every other caller of efi_deserialize_load_option() already does. Suggested-by: Hem Parekh <[email protected]> Cc: Hem Parekh <[email protected]> Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions