android_kernel_samsung_univ.../net/ipv6
Christoph Paasch 6925223ab3 tcp md5sig: Use skb's saddr when replying to an incoming segment
[ Upstream commit 30791ac41927ebd3e75486f9504b6d2280463bf0 ]

The MD5-key that belongs to a connection is identified by the peer's
IP-address. When we are in tcp_v4(6)_reqsk_send_ack(), we are replying
to an incoming segment from tcp_check_req() that failed the seq-number
checks.

Thus, to find the correct key, we need to use the skb's saddr and not
the daddr.

This bug seems to have been there since quite a while, but probably got
unnoticed because the consequences are not catastrophic. We will call
tcp_v4_reqsk_send_ack only to send a challenge-ACK back to the peer,
thus the connection doesn't really fail.

Fixes: 9501f97229 ("tcp md5sig: Let the caller pass appropriate key for tcp_v{4,6}_do_calc_md5_hash().")
Signed-off-by: Christoph Paasch <cpaasch@apple.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-02 20:33:25 +01:00
..
netfilter Revert "net: fix percpu memory leaks" 2017-09-27 11:00:11 +02:00
addrconf_core.c
addrconf.c ipv6: fix sparse warning on rt6i_node 2017-09-27 11:00:10 +02:00
addrlabel.c
af_inet6.c net: reevalulate autoflowlabel setting after sysctl setting 2018-01-02 20:33:25 +01:00
ah6.c
anycast.c
datagram.c
esp6.c
exthdrs_core.c
exthdrs_offload.c
exthdrs.c
fib6_rules.c
icmp.c
ila.c
inet6_connection_sock.c
inet6_hashtables.c
ip6_checksum.c
ip6_fib.c ipv6: fix typo in fib6_net_exit() 2017-09-27 11:00:12 +02:00
ip6_flowlabel.c ipv6: flowlabel: do not leave opt->tot_len with garbage 2017-11-18 11:11:06 +01:00
ip6_gre.c ip6_gre: only increase err_count for some certain type icmpv6 in ip6gre_err 2017-11-18 11:11:06 +01:00
ip6_icmp.c
ip6_input.c
ip6_offload.c
ip6_offload.h
ip6_output.c net: reevalulate autoflowlabel setting after sysctl setting 2018-01-02 20:33:25 +01:00
ip6_tunnel.c
ip6_udp_tunnel.c
ip6_vti.c vti6: Don't report path MTU below IPV6_MIN_MTU. 2017-12-16 10:33:51 +01:00
ip6mr.c
ipcomp6.c
ipv6_sockglue.c net: reevalulate autoflowlabel setting after sysctl setting 2018-01-02 20:33:25 +01:00
Kconfig
Makefile
mcast_snoop.c
mcast.c ipv6: mcast: better catch silly mtu values 2018-01-02 20:33:24 +01:00
mip6.c
ndisc.c
netfilter.c
output_core.c ipv6: accept 64k - 1 packet length in ip6_find_1stfragopt() 2017-09-27 11:00:10 +02:00
ping.c
proc.c
protocol.c
raw.c
reassembly.c Revert "net: fix percpu memory leaks" 2017-09-27 11:00:11 +02:00
route.c ipv6: only call ip6_route_dev_notify() once for NETDEV_UNREGISTER 2017-11-30 08:37:18 +00:00
sit.c sit: update frag_off info 2017-12-16 10:33:56 +01:00
syncookies.c
sysctl_net_ipv6.c
tcp_ipv6.c tcp md5sig: Use skb's saddr when replying to an incoming segment 2018-01-02 20:33:25 +01:00
tcpv6_offload.c
tunnel6.c
udp_impl.h
udp_offload.c
udp.c udpv6: Fix the checksum computation when HW checksum does not apply 2017-10-21 17:09:02 +02:00
udplite.c
xfrm6_input.c
xfrm6_mode_beet.c
xfrm6_mode_ro.c
xfrm6_mode_transport.c
xfrm6_mode_tunnel.c
xfrm6_output.c
xfrm6_policy.c
xfrm6_protocol.c
xfrm6_state.c
xfrm6_tunnel.c