linux-stable/drivers/firmware
Sudeep Holla 87c4896d5d firmware: arm_scpi: Ensure scpi_info is not assigned if the probe fails
[ Upstream commit 689640efc0 ]

When scpi probe fails, at any point, we need to ensure that the scpi_info
is not set and will remain NULL until the probe succeeds. If it is not
taken care, then it could result use-after-free as the value is exported
via get_scpi_ops() and could refer to a memory allocated via devm_kzalloc()
but freed when the probe fails.

Link: https://lore.kernel.org/r/20220701160310.148344-1-sudeep.holla@arm.com
Cc: stable@vger.kernel.org # 4.19+
Reported-by: huhai <huhai@kylinos.cn>
Reviewed-by: Jackie Liu <liuyun01@kylinos.cn>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-08-17 14:42:21 +02:00
..
arm_ffa firmware: arm_ffa: Remove incorrect assignment of driver_data 2022-06-09 10:30:28 +02:00
arm_scmi firmware: arm_scmi: Fix list protocols enumeration in the base protocol 2022-06-09 10:30:27 +02:00
broadcom
cirrus firmware: cs_dsp: Fix overrun of unterminated control name string 2022-04-12 17:57:04 +01:00
efi efi: Allow to enable EFI runtime services by default on RT 2022-06-09 10:29:58 +02:00
google firmware: google: Properly state IOMEM dependency 2022-03-18 14:18:15 +01:00
imx firmware: imx: scu-pd: imx8q: add vpu mu resources 2022-02-20 14:55:32 +08:00
meson
psci firmware/psci: fix application of sizeof to pointer 2021-10-26 17:40:54 -05:00
smccc firmware: smccc: Fix check for ARCH_SOC_ID not implemented 2021-11-22 11:42:59 +01:00
tegra firmware: tegra: Fix error check return value of debugfs_create_file() 2022-08-17 14:40:25 +02:00
xilinx Char/Misc and other driver updates for 5.18-rc1 2022-03-28 12:27:35 -07:00
Kconfig ACPI: APEI: explicit init of HEST and GHES in apci_init() 2022-03-03 20:24:22 +01:00
Makefile firmware: cs_dsp: add driver to support firmware loading on Cirrus Logic DSPs 2021-09-27 13:00:42 +01:00
arm_scpi.c firmware: arm_scpi: Ensure scpi_info is not assigned if the probe fails 2022-08-17 14:42:21 +02:00
arm_sdei.c ACPI: APEI: explicit init of HEST and GHES in apci_init() 2022-03-03 20:24:22 +01:00
dmi-id.c firmware: dmi: Move product_sku info to the end of the modalias 2021-09-02 17:28:53 +02:00
dmi-sysfs.c firmware: dmi-sysfs: Fix memory leak in dmi_sysfs_register_handle 2022-06-14 18:44:52 +02:00
dmi_scan.c
edd.c firmware: edd: remove empty default_attrs array 2022-01-06 14:28:42 +01:00
iscsi_ibft.c iscsi_ibft: Fix isa_bus_to_virt not working under ARM 2021-09-02 16:22:00 -04:00
iscsi_ibft_find.c iscsi_ibft: fix warning in reserve_ibft_region() 2021-08-05 19:47:57 -04:00
memmap.c firmware: memmap: use default_groups in kobj_type 2022-01-05 19:17:29 +01:00
pcdp.c
pcdp.h
qcom_scm-legacy.c
qcom_scm-smc.c
qcom_scm.c firmware: qcom: scm: Add support for MC boot address API 2022-02-03 21:54:48 -06:00
qcom_scm.h firmware: qcom: scm: Add support for MC boot address API 2022-02-03 21:54:48 -06:00
qemu_fw_cfg.c firmware: qemu_fw_cfg: remove sysfs entries explicitly 2022-01-14 18:50:52 -05:00
raspberrypi.c firmware: raspberrypi: Fix a leak in 'rpi_firmware_get()' 2021-08-18 16:02:08 +02:00
scpi_pm_domain.c firmware: arm_scpi: Fix string overflow in SCPI genpd driver 2021-12-13 15:17:37 +01:00
stratix10-rsu.c
stratix10-svc.c firmware: stratix10-svc: fix a missing check on list iterator 2022-06-14 18:44:47 +02:00
sysfb.c firmware: sysfb: Add sysfb_disable() helper function 2022-07-22 10:21:48 +02:00
sysfb_simplefb.c firmware: sysfb: Make sysfb_create_simplefb() return a pdev pointer 2022-07-22 10:21:48 +02:00
ti_sci.c firmware: ti_sci: inproper error handling of ti_sci_probe 2022-02-02 13:18:51 -06:00
ti_sci.h
trusted_foundations.c
turris-mox-rwtm.c