Rand Deeb 37fe99016b net: ice: Fix potential NULL pointer dereference in ice_bridge_setlink()
[ Upstream commit 06e456a05d669ca30b224b8ed962421770c1496c ]

The function ice_bridge_setlink() may encounter a NULL pointer dereference
if nlmsg_find_attr() returns NULL and br_spec is dereferenced subsequently
in nla_for_each_nested(). To address this issue, add a check to ensure that
br_spec is not NULL before proceeding with the nested attribute iteration.

Fixes: b1edc14a3fbf ("ice: Implement ice_bridge_getlink and ice_bridge_setlink")
Signed-off-by: Rand Deeb <rand.sec96@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:15 -04:00
..
2023-09-19 12:20:19 +02:00
2024-02-23 08:42:30 +01:00
2023-07-27 08:44:00 +02:00
2023-11-20 11:06:50 +01:00
2024-02-23 08:42:29 +01:00
2024-02-23 08:42:03 +01:00
2024-01-25 14:37:38 -08:00
2023-07-27 08:44:02 +02:00