u-boot/cmd
Heinrich Schuchardt 0e69bcfb27 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>
2020-06-03 17:19:17 +02:00
..
arm command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
mvebu command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
riscv command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
ti common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
x86 x86: mtrr: Drop the mask display when changing an mtrr 2020-05-27 14:40:09 +08:00
.gitignore cmd: rework "license" command 2017-02-08 15:56:28 -05:00
ab_select.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
abootimg.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
acpi.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
adc.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
adtimg.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
aes.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
armflash.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
avb.c cmd: avb: free partition buffer upon verify completion 2020-05-19 14:01:47 -04:00
axi.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
bcb.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
bdinfo.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
bedbug.c common: Drop asm/ptrace.h from common header 2020-05-18 21:19:23 -04:00
bind.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
binop.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
blk_common.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
blkcache.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
blob.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
bmp.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
boot.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
bootcount.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
bootefi.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
booti.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
bootm.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
bootmenu.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
bootstage.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
bootz.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
btrfs.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
cache.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
cbfs.c cbfs: Return the error code from file_cbfs_init() 2020-05-27 14:40:09 +08:00
clk.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
cls.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
config.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
conitrace.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
console.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
cpu.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
cramfs.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
cros_ec.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
dataflash_mmc_mux.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
date.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
demo.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
dfu.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
diag.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
disk.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
dm.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
echo.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
eeprom.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
efi.c efi_loader: add EFI_MEMORY_SP to memory attributes 2020-05-21 10:00:17 +02:00
efidebug.c efi_loader: validate load option 2020-06-03 17:19:17 +02:00
elf.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
ethsw.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
exit.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
ext2.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
ext4.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
fastboot.c common: Drop linux/stringify.h from common header 2020-05-18 21:19:23 -04:00
fat.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
fdt.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
fitupd.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
flash.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
fpga.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
fpgad.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
fs.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
fs_uuid.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
fuse.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
gettime.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
gpio.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
gpt.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
hash.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
help.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
host.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
i2c.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ide.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
ini.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
io.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
iotrace.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
irq.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
itest.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
jffs2.c common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
Kconfig cmd: zip: automatically pull in gzip() 2020-05-25 11:54:53 -04:00
led.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
legacy-mtd-utils.c cmd: nand/sf: isolate legacy code 2019-12-04 17:10:51 -05:00
legacy-mtd-utils.h cmd: nand/sf: isolate legacy code 2019-12-04 17:10:51 -05:00
legacy_led.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
license.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
load.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
log.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
lzmadec.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
mac.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
Makefile acpi: Add an acpi command 2020-04-30 17:16:12 +08:00
md5sum.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
mdio.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
mem.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mfsl.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
mii.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
misc.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
mmc.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
mp.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
mtd.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
mtdparts.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
nand.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
net.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
nvedit.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
nvedit_efi.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
nvme.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
onenand.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
osd.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
part.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
pcap.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
pci.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
pinmux.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
pmc.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
pmic.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
pxe.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
pxe_utils.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
pxe_utils.h command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
qfw.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
read.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
reginfo.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
regulator.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
reiser.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
remoteproc.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
rng.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
rockusb.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
sata.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
sb.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
scsi.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
setexpr.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
sf.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
sha1sum.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
smccc.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
sound.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
source.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
spi.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
spl.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
strings.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
sysboot.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
terminal.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
test.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
thordown.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
time.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
tlv_eeprom.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
tpm-common.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
tpm-user-utils.h command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
tpm-v1.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
tpm-v2.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
tpm_test.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
trace.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
tsi148.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
ubi.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
ubifs.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
ufs.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
universe.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
unlz4.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
unzip.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
usb.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
usb_gadget_sdp.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
usb_mass_storage.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
version.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
virtio.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
w1.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
wdt.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
wol.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
ximg.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
yaffs2.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
zfs.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
zip.c cmd: zip: fix implicit declaration warning 2020-05-25 11:54:53 -04:00