Skip to content
Commit 1a770927 authored by Rand Deeb's avatar Rand Deeb Committed by Sasha Levin
Browse files

net: ice: Fix potential NULL pointer dereference in ice_bridge_setlink()

[ Upstream commit 06e456a0 ]

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: b1edc14a

 ("ice: Implement ice_bridge_getlink and ice_bridge_setlink")
Signed-off-by: default avatarRand Deeb <rand.sec96@gmail.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 671a2860
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment