mirror of
https://github.com/torvalds/linux.git
synced 2024-11-14 08:02:07 +00:00
63bf28ceb3
When booting the x86 kernel via EFI using the LoadImage/StartImage boot services [as opposed to the deprecated EFI handover protocol], the setup header is taken from the image directly, and given that EFI's LoadImage has no Linux/x86 specific knowledge regarding struct bootparams or struct setup_header, any absolute addresses in the setup header must originate from the file and not from a prior loading stage. Since we cannot generally predict where LoadImage() decides to load an image (*), such absolute addresses must be treated as suspect: even if a prior boot stage intended to make them point somewhere inside the [signed] image, there is no way to validate that, and if they point at an arbitrary location in memory, the setup_data nodes will not be covered by any signatures or TPM measurements either, and could be made to contain an arbitrary sequence of SETUP_xxx nodes, which could interfere quite badly with the early x86 boot sequence. (*) Note that, while LoadImage() does take a buffer/size tuple in addition to a device path, which can be used to provide the image contents directly, it will re-allocate such images, as the memory footprint of an image is generally larger than the PE/COFF file representation. Cc: <stable@vger.kernel.org> # v5.10+ Link: https://lore.kernel.org/all/20220904165321.1140894-1-Jason@zx2c4.com/ Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Acked-by: Jason A. Donenfeld <Jason@zx2c4.com> |
||
---|---|---|
.. | ||
arm_ffa | ||
arm_scmi | ||
broadcom | ||
cirrus | ||
efi | ||
imx | ||
meson | ||
psci | ||
smccc | ||
tegra | ||
xilinx | ||
arm_scpi.c | ||
arm_sdei.c | ||
dmi_scan.c | ||
dmi-id.c | ||
dmi-sysfs.c | ||
edd.c | ||
iscsi_ibft_find.c | ||
iscsi_ibft.c | ||
Kconfig | ||
Makefile | ||
memmap.c | ||
mtk-adsp-ipc.c | ||
pcdp.c | ||
pcdp.h | ||
qcom_scm-legacy.c | ||
qcom_scm-smc.c | ||
qcom_scm.c | ||
qcom_scm.h | ||
qemu_fw_cfg.c | ||
raspberrypi.c | ||
scpi_pm_domain.c | ||
stratix10-rsu.c | ||
stratix10-svc.c | ||
sysfb_simplefb.c | ||
sysfb.c | ||
ti_sci.c | ||
ti_sci.h | ||
trusted_foundations.c | ||
turris-mox-rwtm.c |