Skip to content
Commit a7789fd4 authored by Jeongjun Park's avatar Jeongjun Park Committed by Jakub Kicinski
Browse files

net: hsr: prevent NULL pointer dereference in hsr_proxy_announce()



In the function hsr_proxy_annouance() added in the previous commit
5f703ce5 ("net: hsr: Send supervisory frames to HSR network
with ProxyNodeTable data"), the return value of the hsr_port_get_hsr()
function is not checked to be a NULL pointer, which causes a NULL
pointer dereference.

To solve this, we need to add code to check whether the return value
of hsr_port_get_hsr() is NULL.

Reported-by: default avatar <syzbot+02a42d9b1bd395cbcab4@syzkaller.appspotmail.com>
Fixes: 5f703ce5 ("net: hsr: Send supervisory frames to HSR network with ProxyNodeTable data")
Signed-off-by: default avatarJeongjun Park <aha310510@gmail.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Acked-by: default avatarLukasz Majewski <lukma@denx.de>
Link: https://patch.msgid.link/20240907190341.162289-1-aha310510@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 62540317
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment