linux-stable/net
Eric Dumazet 71f891a254 tcp_metrics: fix addr_same() helper
[ Upstream commit e6638094d7 ]

Because v4 and v6 families use separate inetpeer trees (respectively
net->ipv4.peers and net->ipv6.peers), inetpeer_addr_cmp(a, b) assumes
a & b share the same family.

tcp_metrics use a common hash table, where entries can have different
families.

We must therefore make sure to not call inetpeer_addr_cmp()
if the families do not match.

Fixes: d39d14ffa2 ("net: Add helper function to compare inetpeer addresses")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://lore.kernel.org/r/20230802131500.1478140-2-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-11 12:08:18 +02:00
..
6lowpan
9p
802
8021q
appletalk
atm
ax25
batman-adv
bluetooth Bluetooth: hci_sync: Avoid use-after-free in dbg for hci_remove_adv_monitor() 2023-07-27 08:50:47 +02:00
bpf
bpfilter
bridge bridge: Add extack warning when enabling STP in netns. 2023-07-27 08:50:40 +02:00
caif
can can: bcm: Fix UAF in bcm_proc_show() 2023-07-27 08:50:27 +02:00
ceph rbd: harden get_lock_owner_info() a bit 2023-08-03 10:24:17 +02:00
core bpf: sockmap: Remove preempt_disable in sock_map_sk_acquire 2023-08-11 12:08:16 +02:00
dcb net: dcb: choose correct policy to parse DCB_ATTR_BCN 2023-08-11 12:08:17 +02:00
dccp net: annotate data-races around sk->sk_mark 2023-08-11 12:08:14 +02:00
dns_resolver
dsa net: dsa: sja1105: always enable the send_meta options 2023-07-19 16:22:06 +02:00
ethernet
ethtool
hsr
ieee802154
ife
ipv4 tcp_metrics: fix addr_same() helper 2023-08-11 12:08:18 +02:00
ipv6 ip6mr: Fix skb_under_panic in ip6mr_cache_report() 2023-08-11 12:08:17 +02:00
iucv
kcm
key
l2tp net: annotate data-races around sk->sk_mark 2023-08-11 12:08:14 +02:00
l3mdev
lapb
llc llc: Don't drop packet from non-root netns. 2023-07-27 08:50:45 +02:00
mac80211
mac802154
mctp
mpls
mptcp net: annotate data-races around sk->sk_mark 2023-08-11 12:08:14 +02:00
ncsi net/ncsi: change from ndo_set_mac_address to dev_set_mac_address 2023-07-23 13:49:51 +02:00
netfilter net: annotate data-races around sk->sk_mark 2023-08-11 12:08:14 +02:00
netlabel
netlink
netrom
nfc
nsh
openvswitch
packet net: annotate data-races around sk->sk_priority 2023-08-11 12:08:15 +02:00
phonet
psample
qrtr
rds
rfkill
rose
rxrpc
sched net/sched: cls_route: No longer copy tcf_result on update to avoid use-after-free 2023-08-11 12:08:16 +02:00
sctp
smc net: annotate data-races around sk->sk_mark 2023-08-11 12:08:14 +02:00
strparser
sunrpc
switchdev
tipc tipc: stop tipc crypto on failure in tipc_node_create 2023-08-03 10:24:02 +02:00
tls
unix net: add missing data-race annotations around sk->sk_peek_off 2023-08-11 12:08:14 +02:00
vmw_vsock
wireless wifi: cfg80211: Fix return value in scan logic 2023-08-11 12:08:11 +02:00
x25
xdp net: annotate data-races around sk->sk_mark 2023-08-11 12:08:14 +02:00
xfrm net: annotate data-races around sk->sk_mark 2023-08-11 12:08:14 +02:00
compat.c
devres.c
Kconfig
Kconfig.debug
Makefile
socket.c
sysctl_net.c