linux-yocto/net
Hangbin Liu 9433ba79c2 hsr: hold rcu and dev lock for hsr_get_port_ndev
[ Upstream commit 847748fc66 ]

hsr_get_port_ndev calls hsr_for_each_port, which need to hold rcu lock.
On the other hand, before return the port device, we need to hold the
device reference to avoid UaF in the caller function.

Suggested-by: Paolo Abeni <pabeni@redhat.com>
Fixes: 9c10dd8eed ("net: hsr: Create and export hsr_get_port_ndev()")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250905091533.377443-4-liuhangbin@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
[ Drop multicast filtering changes ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-01-08 10:14:27 +01:00
..
6lowpan
9p 9p/trans_fd: p9_fd_request: kick rx thread if EPOLLIN 2025-11-13 15:34:34 -05:00
802 net: 802: LLC+SNAP OID:PID lookup on start of skb data 2025-01-17 13:40:37 +01:00
8021q net: vlan: sync VLAN features with lower device 2025-11-13 15:34:37 -05:00
appletalk net: appletalk: Fix use-after-free in AARP proxy probe 2025-08-01 09:48:41 +01:00
atm net: atm: fix memory leak in atm_register_sysfs when device_register fail 2025-09-09 18:58:13 +02:00
ax25 ax25: properly unshare skbs in ax25_kiss_rcv() 2025-09-09 18:58:13 +02:00
batman-adv batman-adv: fix OOB read/write in network-coding decode 2025-09-09 18:58:18 +02:00
bluetooth Bluetooth: SMP: Fix not generating mackey and ltk when repairing 2025-12-07 06:24:54 +09:00
bpf bpf, test_run: Fix use-after-free issue in eth_skb_pkt_type() 2025-02-27 04:30:18 -08:00
bridge net: bridge: fix MST static key usage 2025-11-13 15:34:39 -05:00
caif caif: fix integer underflow in cffrml_receive() 2026-01-08 10:14:01 +01:00
can can: j1939: j1939_local_ecu_get(): undo increment when j1939_local_ecu_get() fails 2025-09-19 16:35:49 +02:00
ceph libceph: make decode_pool() more resilient against corrupted osdmaps 2026-01-08 10:14:21 +01:00
core net: dst: introduce dst->dev_rcu 2025-12-18 13:55:22 +01:00
dcb
dccp
devlink devlink: rate: Unset parent pointer in devl_rate_nodes_destroy 2025-12-01 11:43:33 +01:00
dns_resolver
dsa net: dsa: tag_brcm: legacy: fix untagged rx on unbridged ports for bcm63xx 2025-11-13 15:34:37 -05:00
ethernet ethernet: Extend device_get_mac_address() to use NVMEM 2025-11-13 15:34:25 -05:00
ethtool ethtool: Avoid overflowing userspace buffer on stats query 2026-01-08 10:14:02 +01:00
handshake net/handshake: restore destructor on submit failure 2026-01-08 10:14:24 +01:00
hsr hsr: hold rcu and dev lock for hsr_get_port_ndev 2026-01-08 10:14:27 +01:00
ieee802154 net: ieee802154: do not leave a dangling sk pointer in ieee802154_create() 2024-12-14 20:03:47 +01:00
ife
ipv4 tcp_metrics: use dst_dev_net_rcu() 2025-12-18 13:55:22 +01:00
ipv6 ipv6: clear RA flags when adding a static route 2025-12-18 13:55:01 +01:00
iucv
kcm net: kcm: Fix race condition in kcm_unattach() 2025-08-20 18:30:18 +02:00
key Revert "xfrm: destroy xfrm_state synchronously on net exit path" 2025-12-12 18:37:17 +01:00
l2tp l2tp: do not use sock_hold() in pppol2tp_session_get_sock() 2025-09-04 15:31:51 +02:00
l3mdev
lapb
llc llc: fix data loss when reading from a socket in llc_ui_recvmsg() 2025-05-29 11:03:20 +02:00
mac80211 wifi: mac80211: fix CMAC functions not handling errors 2025-12-18 13:55:02 +01:00
mac802154 mac802154: check local interfaces before deleting sdata list 2025-01-23 17:22:54 +01:00
mctp mctp: return -ENOPROTOOPT for unknown getsockopt options 2025-09-09 18:58:13 +02:00
mpls mpls: Use rcu_dereference_rtnl() in mpls_route_input_rcu(). 2025-06-27 11:11:43 +01:00
mptcp mptcp: avoid deadlock on fallback while reinjecting 2026-01-08 10:14:16 +01:00
ncsi net: ncsi: Fix buffer overflow in fetching version id 2025-08-20 18:30:38 +02:00
netfilter netfilter: nf_tables: remove redundant chain validation on register store 2026-01-08 10:14:01 +01:00
netlabel calipso: unlock rcu before returning -EAFNOSUPPORT 2025-06-19 15:32:37 +02:00
netlink genetlink: fix genl_bind() invoking bind() after -EPERM 2025-09-19 16:35:48 +02:00
netrom netrom: Fix memory leak in nr_sendmsg() 2026-01-08 10:13:59 +01:00
nfc net: nfc: nci: Add parameter validation for packet data 2025-10-15 12:00:21 +02:00
nsh
openvswitch net: openvswitch: fix middle attribute validation in push_nsh() action 2026-01-08 10:14:00 +01:00
packet net/packet: fix a race in packet_set_ring() and packet_notifier() 2025-08-15 12:14:09 +02:00
phonet phonet/pep: Move call to pn_skb_get_dst_sockaddr() earlier in pep_sock_accept() 2025-07-24 08:56:24 +02:00
psample psample: adjust size if rate_as_probability is set 2024-12-27 14:02:06 +01:00
qrtr
rds rds: Fix endianness annotation for RDS_MPATH_HASH 2025-11-13 15:34:15 -05:00
rfkill net: rfkill: gpio: Fix crash due to dereferencering uninitialized pointer 2025-09-25 11:13:47 +02:00
rose net: rose: fix a typo in rose_clear_routes() 2025-09-04 15:31:55 +02:00
rxrpc rxrpc: Fix transmission of an abort in response to an abort 2025-07-24 08:56:35 +02:00
sched net/sched: ets: Remove drr class from the active list if it changes to strict 2026-01-08 10:14:01 +01:00
sctp sctp: Defer SCTP_DBG_OBJCNT_DEC() to sctp_destroy_sock(). 2025-12-18 13:54:48 +01:00
smc net/smc: fix mismatch between CLC header and proposal 2025-11-24 10:35:50 +01:00
strparser strparser: Fix signed/unsigned mismatch bug 2025-11-24 10:35:59 +01:00
sunrpc SUNRPC: svcauth_gss: avoid NULL deref on zero length gss_token in gss_read_proxy_verf 2026-01-08 10:14:25 +01:00
switchdev net: switchdev: Convert blocking notification chain to a raw one 2025-03-22 12:54:12 -07:00
tipc tipc: Fix use-after-free in tipc_mon_reinit_self(). 2025-11-24 10:35:51 +01:00
tls net: tls: Cancel RX async resync request on rcd_delta overflow 2025-12-01 11:43:36 +01:00
unix af_unix: Read sk_peek_offset() again after sleeping in unix_stream_read_generic(). 2025-12-01 11:43:34 +01:00
vmw_vsock vsock: Ignore signal/timeout on connect() if already established 2025-12-01 11:43:34 +01:00
wireless wifi: cfg80211: use cfg80211_leave() in iftype change 2026-01-08 10:13:57 +01:00
x25
xdp xsk: Harden userspace-supplied xdp_desc validation 2025-10-19 16:33:53 +02:00
xfrm xfrm: flush all states in xfrm_state_fini 2025-12-12 18:37:17 +01:00
compat.c
devres.c
Kconfig
Kconfig.debug
Makefile
socket.c
sysctl_net.c