WSL2-Linux-Kernel/drivers/firmware
Sudeep Holla 0c29e149b6 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:24:20 +02:00
..
arm_ffa firmware: arm_ffa: Remove incorrect assignment of driver_data 2022-06-09 10:23:09 +02:00
arm_scmi firmware: arm_scmi: Fix list protocols enumeration in the base protocol 2022-06-09 10:23:08 +02:00
broadcom firmware: tee_bnxt: Release TEE shm, session, and context during kexec 2021-07-21 07:55:50 +02:00
efi pstore: Don't use semaphores in always-atomic-context code 2022-04-08 14:23:01 +02:00
google firmware: google: Properly state IOMEM dependency 2022-04-08 14:23:50 +02:00
imx firmware: imx: scu-pd: add missed ADC1 pd 2021-03-29 09:34:37 +08:00
meson firmware: meson-sm: enable build as module 2020-10-26 13:36:05 -07:00
psci firmware/psci: fix application of sizeof to pointer 2021-11-18 19:15:53 +01:00
smccc firmware: smccc: Fix check for ARCH_SOC_ID not implemented 2021-12-01 09:04:49 +01:00
tegra firmware: tegra: Fix error check return value of debugfs_create_file() 2022-08-17 14:23:04 +02:00
xilinx firmware: xilinx: Fix incorrect names in kernel-doc 2021-08-06 15:17:53 +02:00
Kconfig ACPI: APEI: explicit init of HEST and GHES in apci_init() 2022-08-17 14:23:11 +02:00
Makefile ARM: SoC drivers for 5.15 2021-09-01 15:25:28 -07:00
arm_scpi.c firmware: arm_scpi: Ensure scpi_info is not assigned if the probe fails 2022-08-17 14:24:20 +02:00
arm_sdei.c ACPI: APEI: explicit init of HEST and GHES in apci_init() 2022-08-17 14:23:11 +02: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:36:09 +02:00
dmi_scan.c ASoC: soc-core: fix DMI handling 2021-03-11 13:25:09 +00:00
edd.c edd: Use scnprintf() for avoiding potential buffer overflow 2020-04-02 20:42:29 +02: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
pcdp.c
pcdp.h firmware: pcdp: Replace zero-length array with flexible-array 2020-06-15 23:08:32 -05:00
qcom_scm-legacy.c firmware: qcom_scm: Fix kernel-doc function names to match 2021-04-06 21:25:49 -05:00
qcom_scm-smc.c firmware: qcom_scm: Reduce locking section for __get_convention() 2021-04-06 21:25:23 -05:00
qcom_scm.c firmware: qcom: scm: Remove reassignment to desc following initializer 2022-04-08 14:23:15 +02:00
qcom_scm.h firmware: qcom_scm: Introduce SCM calls to access LMh 2021-08-18 09:31:53 +02:00
qemu_fw_cfg.c firmware: qemu_fw_cfg: fix kobject leak in probe error path 2022-01-20 09:13:15 +01: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-22 09:32:35 +01:00
stratix10-rsu.c firmware: stratix10-rsu: fix warnings 2020-07-02 14:48:48 +02:00
stratix10-svc.c firmware: stratix10-svc: fix a missing check on list iterator 2022-06-14 18:36:05 +02:00
sysfb.c firmware: sysfb: Add sysfb_disable() helper function 2022-07-21 21:24:35 +02:00
sysfb_simplefb.c firmware: sysfb: Make sysfb_create_simplefb() return a pdev pointer 2022-07-21 21:24:34 +02:00
ti_sci.c firmware: ti_sci: rm: Remove unused config() from ti_sci_rm_ringacc_ops 2020-11-01 19:38:04 -08:00
ti_sci.h firmware: ti_sci: rm: Add new ops for ring configuration 2020-11-01 19:38:02 -08:00
trusted_foundations.c firmware: tf: Different way of L2 cache enabling after LP2 suspend 2020-05-06 18:27:26 +02:00
turris-mox-rwtm.c mvebu drivers for 5.14 (part 1) 2021-06-23 18:57:40 -07:00