sst-linux/drivers/firmware
Ard Biesheuvel ccb4aef2e7 efi/libstub: Avoid physical address 0x0 when doing random allocation
commit cb16dfed0093217a68c0faa9394fa5823927e04c upstream.

Ben reports spurious EFI zboot failures on a system where physical RAM
starts at 0x0. When doing random memory allocation from the EFI stub on
such a platform, a random seed of 0x0 (which means no entropy source is
available) will result in the allocation to be placed at address 0x0 if
sufficient space is available.

When this allocation is subsequently passed on to the decompression
code, the 0x0 address is mistaken for NULL and the code complains and
gives up.

So avoid address 0x0 when doing random allocation, and set the minimum
address to the minimum alignment.

Cc: <stable@vger.kernel.org>
Reported-by: Ben Schneider <ben@bens.haus>
Tested-by: Ben Schneider <ben@bens.haus>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-03-28 21:59:01 +01:00
..
arm_ffa
arm_scmi
broadcom
cirrus
efi efi/libstub: Avoid physical address 0x0 when doing random allocation 2025-03-28 21:59:01 +01:00
google
imx firmware: imx-scu: fix OF node leak in .probe() 2025-03-28 21:58:59 +01:00
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 iscsi_ibft: Fix UBSAN shift-out-of-bounds warning in ibft_attr_show_nic() 2025-03-28 21:58:50 +01:00
Kconfig firmware: iscsi_ibft: fix ISCSI_IBFT Kconfig entry 2025-02-21 13:49:36 +01:00
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