linux/net/hsr
Sebastian Andrzej Siewior 430d67bdcb net: hsr: Use the seqnr lock for frames received via interlink port.
syzbot reported that the seqnr_lock is not acquire for frames received
over the interlink port. In the interlink case a new seqnr is generated
and assigned to the frame.
Frames, which are received over the slave port have already a sequence
number assigned so the lock is not required.

Acquire the hsr_priv::seqnr_lock during in the invocation of
hsr_forward_skb() if a packet has been received from the interlink port.

Reported-by: syzbot+3d602af7549af539274e@syzkaller.appspotmail.com
Closes: https://groups.google.com/g/syzkaller-bugs/c/KppVvGviGg4/m/EItSdCZdBAAJ
Fixes: 5055cccfc2 ("net: hsr: Provide RedBox support (HSR-SAN)")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Tested-by: Lukasz Majewski <lukma@denx.de>
Link: https://patch.msgid.link/20240906132816.657485-2-bigeasy@linutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-11 15:49:07 -07:00
..
hsr_debugfs.c Revert "net: hsr: use hlist_head instead of list_head for mac addresses" 2022-12-01 20:26:20 -08:00
hsr_device.c netdev_features: convert NETIF_F_NETNS_LOCAL to dev->netns_local 2024-09-03 11:36:43 +02:00
hsr_device.h net: hsr: Provide RedBox support (HSR-SAN) 2024-04-26 12:04:43 +02:00
hsr_forward.c net: hsr: cosmetic: Remove extra white space 2024-06-19 17:32:57 -07:00
hsr_forward.h
hsr_framereg.c net: hsr: Send supervisory frames to HSR network with ProxyNodeTable data 2024-06-14 08:21:46 +01:00
hsr_framereg.h net: hsr: Send supervisory frames to HSR network with ProxyNodeTable data 2024-06-14 08:21:46 +01:00
hsr_main.c net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
hsr_main.h net: hsr: Send supervisory frames to HSR network with ProxyNodeTable data 2024-06-14 08:21:46 +01:00
hsr_netlink.c net: hsr: Send supervisory frames to HSR network with ProxyNodeTable data 2024-06-14 08:21:46 +01:00
hsr_netlink.h net/hsr: Remove unused function declarations 2023-07-31 20:11:47 -07:00
hsr_slave.c net: hsr: Use the seqnr lock for frames received via interlink port. 2024-09-11 15:49:07 -07:00
hsr_slave.h
Kconfig
Makefile