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 firmware: arm_scmi: Fix double free in OPTEE transport 2024-10-17 15:20:45 +02:00
broadcom
cirrus
efi efi/libstub: Avoid physical address 0x0 when doing random allocation 2025-03-28 21:59:01 +01:00
google firmware: google: Unregister driver_info on failure 2024-12-14 19:53:16 +01:00
imx firmware: imx-scu: fix OF node leak in .probe() 2025-03-28 21:58:59 +01:00
meson
psci
smccc arm64: smccc: Remove broken support for SMCCCv1.3 SVE discard hint 2024-12-14 19:54:53 +01:00
tegra firmware: tegra: bpmp: Drop unused mbox_client_to_bpmp() 2024-10-17 15:21:51 +02:00
xilinx
arm_scpi.c firmware: arm_scpi: Check the DVFS OPP count returned by the firmware 2024-12-14 19:53:23 +01:00
arm_sdei.c firmware: arm_sdei: Fix the input parameter of cpuhp_remove_state() 2024-11-08 16:26:43 +01:00
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