linux/drivers/sh/intc
Dan Carpenter c3f4f4547f sh: intc: Fix use-after-free bug in register_intc_controller()
[ Upstream commit 63e72e5519 ]

In the error handling for this function, d is freed without ever
removing it from intc_list which would lead to a use after free.
To fix this, let's only add it to the list after everything has
succeeded.

Fixes: 2dcec7a988 ("sh: intc: set_irq_wake() support")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2024-12-14 19:51:21 +01:00
..
access.c sh: Fix up more fallout from pointless ARM __iomem churn. 2012-10-15 14:08:48 +09:00
balancing.c sh: intc: remove dependency on NR_IRQS 2012-01-25 20:37:48 -06:00
chip.c genirq: Add and use an irq_data_update_affinity helper 2023-03-11 13:57:31 +01:00
core.c sh: intc: Fix use-after-free bug in register_intc_controller() 2024-12-14 19:51:21 +01:00
handle.c SuperH updates for 3.4 merge window 2012-03-30 00:09:17 -07:00
internals.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
irqdomain.c sh: intc: initial irqdomain support. 2012-08-01 17:13:46 +09:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
userimask.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
virq-debugfs.c sh: intc: Convert to DEFINE_SHOW_ATTRIBUTE 2021-01-06 19:55:24 -05:00
virq.c drivers/sh/intc/virq.c: delete an error message for a failed memory allocation in add_virq_to_pirq() 2017-07-06 16:24:30 -07:00