linux-stable/net/ipv4
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
..
bpfilter
netfilter netfilter: tproxy: fix deadlock due to missing BH disable 2023-03-17 08:50:25 +01:00
af_inet.c tcp: deny tcp_disconnect() when threads are waiting 2023-06-09 10:34:02 +02:00
ah4.c
arp.c
bpf_tcp_ca.c
cipso_ipv4.c
datagram.c
devinet.c
esp4.c net: ipv4: Use kfree_sensitive instead of kfree 2023-07-27 08:50:45 +02:00
esp4_offload.c xfrm: Linearize the skb after offloading if needed. 2023-06-28 11:12:29 +02:00
fib_frontend.c ipv4: Fix incorrect table ID in IOCTL path 2023-03-22 13:33:50 +01:00
fib_lookup.h
fib_notifier.c
fib_rules.c
fib_semantics.c ipv4: prevent potential spectre v1 gadget in fib_metrics_match() 2023-02-01 08:34:45 +01:00
fib_trie.c
fou.c
gre_demux.c
gre_offload.c
icmp.c icmp: guard against too small mtu 2023-04-13 16:55:21 +02:00
igmp.c
inet_connection_sock.c tcp: annotate data-races around icsk->icsk_syn_retries 2023-07-27 08:50:48 +02:00
inet_diag.c net: annotate data-races around sk->sk_mark 2023-08-11 12:08:14 +02:00
inet_fragment.c
inet_hashtables.c Revert "tcp: avoid the lookup process failing to get sk in ehash table" 2023-07-27 08:50:45 +02:00
inet_timewait_sock.c Revert "tcp: avoid the lookup process failing to get sk in ehash table" 2023-07-27 08:50:45 +02:00
inetpeer.c
ip_forward.c
ip_fragment.c
ip_gre.c erspan: do not use skb_mac_header() in ndo_start_xmit() 2023-03-30 12:49:09 +02:00
ip_input.c
ip_options.c
ip_output.c net: annotate data-races around sk->sk_priority 2023-08-11 12:08:15 +02:00
ip_sockglue.c net: annotate data-races around sk->sk_priority 2023-08-11 12:08:15 +02:00
ip_tunnel.c net: tunnels: annotate lockless accesses to dev->needed_headroom 2023-03-22 13:33:46 +01:00
ip_tunnel_core.c
ip_vti.c
ipcomp.c
ipconfig.c
ipip.c
ipmr.c
ipmr_base.c
Kconfig
Makefile
metrics.c ipv4: prevent potential spectre v1 gadget in ip_metrics_convert() 2023-02-01 08:34:45 +01:00
netfilter.c
netlink.c
nexthop.c
ping.c ping: Fix potentail NULL deref for /proc/net/icmp. 2023-04-13 16:55:24 +02:00
proc.c
protocol.c
raw.c net: annotate data-races around sk->sk_priority 2023-08-11 12:08:15 +02:00
raw_diag.c raw: Fix NULL deref in raw_get_next(). 2023-04-13 16:55:23 +02:00
route.c net: annotate data-races around sk->sk_mark 2023-08-11 12:08:14 +02:00
syncookies.c
sysctl_net_ipv4.c net/ipv4: ping_group_range: allow GID from 2147483648 to 4294967294 2023-06-14 11:15:16 +02:00
tcp.c tcp: annotate data-races around fastopenq.max_qlen 2023-07-27 08:50:49 +02:00
tcp_bbr.c
tcp_bic.c
tcp_bpf.c bpf, sockmap: Incorrectly handling copied_seq 2023-06-05 09:26:19 +02:00
tcp_cdg.c
tcp_cong.c
tcp_cubic.c
tcp_dctcp.c
tcp_dctcp.h
tcp_diag.c
tcp_fastopen.c tcp: annotate data-races around fastopenq.max_qlen 2023-07-27 08:50:49 +02:00
tcp_highspeed.c
tcp_htcp.c
tcp_hybla.c
tcp_illinois.c
tcp_input.c tcp: annotate data races in __tcp_oow_rate_limited() 2023-07-19 16:22:05 +02:00
tcp_ipv4.c net: annotate data-races around sk->sk_priority 2023-08-11 12:08:15 +02:00
tcp_lp.c
tcp_metrics.c tcp_metrics: fix addr_same() helper 2023-08-11 12:08:18 +02:00
tcp_minisocks.c tcp: annotate data-races around tcp_rsk(req)->ts_recent 2023-07-27 08:50:45 +02:00
tcp_nv.c
tcp_offload.c tcp: gso: really support BIG TCP 2023-06-14 11:15:20 +02:00
tcp_output.c tcp: annotate data-races around tcp_rsk(req)->ts_recent 2023-07-27 08:50:45 +02:00
tcp_rate.c
tcp_recovery.c
tcp_scalable.c
tcp_timer.c tcp: fix mishandling when the sack compression is deferred. 2023-06-09 10:34:05 +02:00
tcp_ulp.c net/ulp: use consistent error code when blocking ULP 2023-01-24 07:24:43 +01:00
tcp_vegas.c
tcp_vegas.h
tcp_veno.c
tcp_westwood.c
tcp_yeah.c
tunnel4.c
udp.c bpf, sockmap: Pass skb ownership through read_skb 2023-06-05 09:26:18 +02:00
udp_bpf.c bpf, sockmap: Fix an infinite loop error when len is 0 in tcp_bpf_recvmsg_parser() 2023-03-17 08:50:24 +01:00
udp_diag.c
udp_impl.h
udp_offload.c
udp_tunnel_core.c
udp_tunnel_nic.c
udp_tunnel_stub.c
udplite.c udplite: Fix NULL pointer dereference in __sk_mem_raise_allocated(). 2023-05-30 14:03:20 +01:00
xfrm4_input.c xfrm: fix inbound ipv4/udp/esp packets to UDPv6 dualstack sockets 2023-06-28 11:12:28 +02:00
xfrm4_output.c
xfrm4_policy.c
xfrm4_protocol.c
xfrm4_state.c
xfrm4_tunnel.c