linux-yocto/drivers/base
Zijun Hu 9324127b07 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:07:35 +01:00
..
firmware_loader firmware_loader: Block path traversal 2024-10-17 15:21:20 +02:00
power PM: runtime: fix denying of auto suspend in pm_suspend_timer_fn() 2025-06-27 11:07:32 +01:00
regmap regmap-irq: Add missing kfree() 2025-02-21 13:50:05 +01:00
test
arch_numa.c arm64: irq: set the correct node for VMAP stack 2024-02-05 20:12:46 +00:00
arch_topology.c
attribute_container.c
auxiliary.c
base.h
bus.c driver core: bus: Fix double free in driver API bus_register() 2024-12-14 19:54:00 +01:00
cacheinfo.c
class.c
component.c
container.c
core.c drivers: core: fix device leak in __fw_devlink_relax_cycles() 2025-03-13 12:53:22 +01:00
cpu.c x86/its: Enable Indirect Target Selection mitigation 2025-05-18 08:21:26 +02:00
dd.c driver core: Release all resources during unbind before updating device links 2023-11-28 17:07:13 +00:00
devcoredump.c devcoredump: Send uevent once devcd is ready 2023-12-13 18:39:28 +01:00
devres.c drivers: base: devres: Allow to release group on device release 2025-04-25 10:43:32 +02:00
devtmpfs.c
driver.c
firmware.c
hypervisor.c
init.c
isa.c
Kconfig
Makefile
map.c
memory.c mm/memory_hotplug: add missing mem_hotplug_lock 2024-01-10 17:10:33 +01:00
module.c Revert "driver core: Fix uevent_show() vs driver detach race" 2024-11-08 16:26:44 +01:00
node.c base/node.c: initialize the accessor list before registering 2024-01-25 15:27:46 -08:00
physical_location.c
physical_location.h
pinctrl.c
platform-msi.c
platform.c
property.c device property: Constify device child node APIs 2024-12-14 19:54:28 +01:00
soc.c
swnode.c software node: Correct a OOB check in software_node_get_reference_args() 2025-06-27 11:07:35 +01:00
syscore.c
topology.c topology: Keep the cpumask unchanged when printing cpumap 2025-01-17 13:34:44 +01:00
trace.c
trace.h
transport_class.c