diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2020-05-31 22:46:09 +0200 |
---|---|---|
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2020-06-03 17:19:17 +0200 |
commit | 0e69bcfb27644f9e7c575aa3565bcff922c7dec2 (patch) | |
tree | 1560106fb519adf2d1ac3f6214cc4383df2b0b49 /include/efi_loader.h | |
parent | ecd4d99f654f3f7bfb96001891d69c3125e70b69 (diff) | |
download | u-boot-0e69bcfb27644f9e7c575aa3565bcff922c7dec2.tar.gz |
efi_loader: validate load option
For passing the optional data of the load option to the loaded imaged
protocol we need its size.
efi_deserialize_load_option() is changed to return the size of the optional
data.
As a by-product we get a partial validation of the load option.
Checking the length of the device path remains to be implemented.
Some Coverity defects identified the load options as user input because
get_unaligned_le32() and get_unaligned_le16() is called. But non of these
Coverity defects can be resolved without marking functions with Coverity
specific tags.
Reported-by: Coverity (CID 303760)
Reported-by: Coverity (CID 303768)
Reported-by: Coverity (CID 303776)
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'include/efi_loader.h')
-rw-r--r-- | include/efi_loader.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/efi_loader.h b/include/efi_loader.h index 9533df26dc..c2cae814b6 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -708,7 +708,8 @@ struct efi_load_option { const u8 *optional_data; }; -void efi_deserialize_load_option(struct efi_load_option *lo, u8 *data); +efi_status_t efi_deserialize_load_option(struct efi_load_option *lo, u8 *data, + efi_uintn_t *size); unsigned long efi_serialize_load_option(struct efi_load_option *lo, u8 **data); efi_status_t efi_bootmgr_load(efi_handle_t *handle); |