linux-stable/drivers/firmware
Johan Hovold b543e41415 firmware: qemu_fw_cfg: fix sysfs information leak
commit 1b656e9aad upstream.

Make sure to always NUL-terminate file names retrieved from the firmware
to avoid accessing data beyond the entry slab buffer and exposing it
through sysfs in case the firmware data is corrupt.

Fixes: 75f3e8e47f ("firmware: introduce sysfs driver for QEMU's fw_cfg device")
Cc: stable@vger.kernel.org      # 4.6
Cc: Gabriel Somlo <somlo@cmu.edu>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20211201132528.30025-4-johan@kernel.org
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-20 09:19:18 +01:00
..
arm_scmi firmware: arm_scmi: pm: Propagate return value to caller 2021-12-01 09:23:32 +01:00
broadcom
efi efi: Change down_interruptible() in virt_efi_reset_system() to down_trylock() 2021-10-20 11:40:14 +02:00
google
imx firmware: imx: select SOC_BUS to fix firmware build 2021-02-03 23:25:59 +01:00
meson
psci firmware/psci: fix application of sizeof to pointer 2021-11-17 09:48:17 +01:00
tegra firmware: tegra: bpmp: Fix Tegra234-only builds 2021-07-25 14:35:12 +02:00
xilinx
arm_scpi.c firmware: arm_scpi: Prevent the ternary sign expansion bug 2021-05-26 12:05:14 +02:00
arm_sdei.c firmware: arm_sdei: Use cpus_read_lock() to avoid races with cpuhp 2020-10-01 13:17:37 +02:00
dmi-id.c
dmi-sysfs.c
dmi_scan.c
edd.c
iscsi_ibft.c
iscsi_ibft_find.c
Kconfig firmware: qcom-scm: Fix QCOM_SCM configuration 2021-05-14 09:44:22 +02:00
Makefile
memmap.c
pcdp.c
pcdp.h
qcom_scm-32.c
qcom_scm-64.c
qcom_scm.c firmware: qcom_scm: fix bogous abuse of dma-direct internals 2020-06-24 17:50:21 +02:00
qcom_scm.h
qemu_fw_cfg.c firmware: qemu_fw_cfg: fix sysfs information leak 2022-01-20 09:19:18 +01:00
raspberrypi.c
scpi_pm_domain.c firmware: arm_scpi: Fix string overflow in SCPI genpd driver 2021-12-22 09:29:34 +01:00
stratix10-rsu.c
stratix10-svc.c firmware: stratix10-svc: Fix a resource leak in an error handling path 2021-07-14 16:53:40 +02:00
ti_sci.c
ti_sci.h
trusted_foundations.c
turris-mox-rwtm.c firmware: turris-mox-rwtm: add marvell,armada-3700-rwtm-firmware compatible string 2021-07-25 14:35:13 +02:00