linux-yocto/drivers/base
Zijun Hu 4b3383110b software node: Correct a OOB check in software_node_get_reference_args()
[ Upstream commit 31e4e12e0e ]

software_node_get_reference_args() wants to get @index-th element, so
the property value requires at least '(index + 1) * sizeof(*ref)' bytes
but that can not be guaranteed by current OOB check, and may cause OOB
for malformed property.

Fix by using as OOB check '((index + 1) * sizeof(*ref) > prop->length)'.

Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Link: https://lore.kernel.org/r/20250414-fix_swnode-v2-1-9c9e6ae11eab@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-27 11:11:34 +01:00
..
firmware_loader
power PM: runtime: fix denying of auto suspend in pm_suspend_timer_fn() 2025-06-27 11:11:28 +01:00
regmap regmap-irq: Add missing kfree() 2025-02-21 14:01:37 +01:00
test
arch_numa.c
arch_topology.c
attribute_container.c
auxiliary_sysfs.c
auxiliary.c
base.h driver core: fix potential NULL pointer dereference in dev_uevent() 2025-05-02 07:59:29 +02:00
bus.c driver core: fix potential NULL pointer dereference in dev_uevent() 2025-05-02 07:59:29 +02:00
cacheinfo.c
class.c
component.c
container.c
core.c driver core: fix potential NULL pointer dereference in dev_uevent() 2025-05-02 07:59:29 +02:00
cpu.c x86/its: Enable Indirect Target Selection mitigation 2025-05-18 08:24:59 +02:00
dd.c driver core: introduce device_set_driver() helper 2025-05-02 07:59:28 +02:00
devcoredump.c
devres.c drivers: base: devres: Allow to release group on device release 2025-04-20 10:15:24 +02:00
devtmpfs.c
driver.c
firmware.c
hypervisor.c
init.c
isa.c
Kconfig
Makefile
map.c
memory.c
module.c drivers: base: handle module_kobject creation 2025-05-09 09:50:52 +02:00
node.c
physical_location.c
physical_location.h
pinctrl.c
platform-msi.c platform-msi: Add msi_remove_device_irq_domain() in platform_device_msi_free_irqs_all() 2025-06-27 11:11:27 +01:00
platform.c
property.c
soc.c
swnode.c software node: Correct a OOB check in software_node_get_reference_args() 2025-06-27 11:11:34 +01:00
syscore.c
topology.c
trace.c
trace.h
transport_class.c