Files
linux/drivers/base
Zijun Hu 7af18e42bd 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:13:27 +01:00
..
2025-02-28 06:54:14 -08:00
2024-09-03 21:15:32 -07:00
2021-06-15 17:14:36 +02:00