WSL2-Linux-Kernel/drivers/firmware/efi
Johan Hovold 41a15855c1 efi: random: fix NULL-deref when refreshing seed
Do not try to refresh the RNG seed in case the firmware does not support
setting variables.

This is specifically needed to prevent a NULL-pointer dereference on the
Lenovo X13s with some firmware revisions, or more generally, whenever
the runtime services have been disabled (e.g. efi=noruntime or with
PREEMPT_RT).

Fixes: e7b813b32a ("efi: random: refresh non-volatile random seed when RNG is initialized")
Reported-by: Steev Klimaszewski <steev@kali.org>
Reported-by: Bjorn Andersson <andersson@kernel.org>
Tested-by: Steev Klimaszewski <steev@kali.org>
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2022-12-20 03:13:45 +01:00
..
libstub - Do some spring cleaning to the compressed boot code by moving the 2022-12-13 14:45:29 -08:00
test
Kconfig
Makefile
apple-properties.c
arm-runtime.c ARM updates for 6.2 2022-12-13 15:22:14 -08:00
capsule-loader.c
capsule.c
cper-arm.c
cper-x86.c
cper.c
cper_cxl.c
cper_cxl.h
dev-path-parser.c
earlycon.c
efi-bgrt.c
efi-init.c
efi-pstore.c
efi.c efi: random: fix NULL-deref when refreshing seed 2022-12-20 03:13:45 +01:00
efibc.c
embedded-firmware.c
esrt.c
fdtparams.c
memattr.c
memmap.c
mokvar-table.c
rci2-table.c
reboot.c
riscv-runtime.c
runtime-wrappers.c
sysfb_efi.c
tpm.c
vars.c