linux/net/ipv4
Wei Wang 32cb2d4a59 tcp: initialize rcv_mss to TCP_MIN_MSS instead of 0
commit 499350a5a6 upstream.

When tcp_disconnect() is called, inet_csk_delack_init() sets
icsk->icsk_ack.rcv_mss to 0.
This could potentially cause tcp_recvmsg() => tcp_cleanup_rbuf() =>
__tcp_select_window() call path to have division by 0 issue.
So this patch initializes rcv_mss to TCP_MIN_MSS instead of 0.

Reported-by: Andrey Konovalov  <andreyknvl@google.com>
Signed-off-by: Wei Wang <weiwan@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2017-09-15 18:30:18 +01:00
..
netfilter netfilter: nf_nat_snmp: Fix panic when snmp_trap_helper fails to register 2017-07-18 18:40:23 +01:00
af_inet.c net: ping: do not abuse udp_poll() 2017-09-15 18:29:56 +01:00
ah4.c ah4: Use the IPsec protocol multiplexer API 2014-02-25 07:04:17 +01:00
arp.c ipv4: arp: update neighbour address when a gratuitous arp is received and arp_accept is set 2014-01-02 00:08:38 -05:00
cipso_ipv4.c netlabel: out of bound access in cipso_v4_validate() 2017-03-16 02:27:09 +00:00
datagram.c ipv6: lock socket in ip6_datagram_connect() 2015-08-27 13:56:21 +01:00
devinet.c ipv4: Don't do expensive useless work during inetdev destroy. 2016-03-29 15:53:41 +01:00
esp4.c esp4: Use the IPsec protocol multiplexer API 2014-02-25 07:04:17 +01:00
fib_frontend.c ipv4: Don't do expensive useless work during inetdev destroy. 2016-03-29 15:53:41 +01:00
fib_lookup.h ipv4: make fib_detect_death static 2013-12-28 17:01:46 -05:00
fib_rules.c ipv4: Fix incorrect error code when adding an unreachable route 2014-12-01 10:02:09 +00:00
fib_semantics.c ipv4: fix nexthop attlen check in fib_nh_match 2014-11-05 16:32:41 +00:00
fib_trie.c net: Revert "fib_trie: use seq_file_net rather than seq->private" 2014-06-04 15:11:41 -07:00
gre_demux.c GRE: enable offloads for GRE 2014-07-11 13:53:39 -07:00
gre_offload.c tunnels: Don't apply GRO to multiple layers of encapsulation. 2016-05-01 00:06:03 +02:00
icmp.c ipv4: icmp: Fix pMTU handling for rare case 2014-07-07 17:22:57 -07:00
igmp.c igmp, mld: Fix memory leak in igmpv3/mld_del_delrec() 2017-03-16 02:27:26 +00:00
inet_connection_sock.c dccp/tcp: do not inherit mc_list from parent 2017-06-05 21:17:23 +01:00
inet_diag.c inet_diag: fix possible overflow in inet_diag_dump_one_icsk() 2015-03-24 10:29:06 +00:00
inet_fragment.c inet: frag: make sure forced eviction removes all frags 2014-03-06 15:28:45 -05:00
inet_hashtables.c net: Use a more standard macro for INET_ADDR_COOKIE 2014-05-14 16:07:23 -04:00
inet_lro.c lro: remove dead code 2013-12-29 16:34:25 -05:00
inet_timewait_sock.c tcp/dccp: remove twchain 2013-10-08 23:19:24 -04:00
inetpeer.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-06-12 14:27:40 -07:00
ip_forward.c ip_forward: Drop frames with attached skb->sk 2015-04-29 11:26:32 +01:00
ip_fragment.c inet: frags: fix defragmented packet's IP header for af_packet 2015-08-12 09:48:31 +01:00
ip_gre.c gre: fix the inner mac header in nbma tunnel xmit path 2015-01-19 11:07:18 +00:00
ip_input.c net: Fix memory leak if TPROXY used with TCP early demux 2014-01-27 16:22:11 -08:00
ip_options.c ipv4: fix buffer overflow in ip_options_compile() 2014-07-21 20:16:26 -07:00
ip_output.c net: account for current skb length when deciding about UFO 2017-09-15 18:30:15 +01:00
ip_sockglue.c ipv4: keep skb->dst around in presence of IP options 2017-02-26 20:01:50 +00:00
ip_tunnel.c ip_tunnel: fix ipv4 pmtu check to honor inner ip header df 2015-08-10 17:10:17 +01:00
ip_tunnel_core.c ipv4: fix a potential use after free in ip_tunnel_core.c 2014-11-05 16:34:38 +00:00
ip_vti.c ip_tunnel: the lack of vti_link_ops' dellink() cause kernel panic 2014-12-15 10:59:08 +00:00
ipcomp.c ipcomp4: Use the IPsec protocol multiplexer API 2014-02-25 07:04:17 +01:00
ipconfig.c ipv4: ipconfig.c: add parentheses in an if statement 2014-02-14 00:14:23 -05:00
ipip.c ipip: fix one sparse error 2015-07-15 10:01:16 +01:00
ipmr.c ipmr/ip6mr: Initialize the last assert time of mfc entries. 2017-03-16 02:27:17 +00:00
Kconfig net: neighbour: Remove CONFIG_ARPD 2013-09-03 21:41:43 -04:00
Makefile xfrm4: Add IPsec protocol multiplexer 2014-02-25 07:04:16 +01:00
netfilter.c netfilter: remove double colon 2014-02-19 11:41:25 +01:00
ping.c ping: implement proper locking 2017-06-05 21:17:20 +01:00
proc.c net: clean up snmp stats code 2014-05-07 16:06:05 -04:00
protocol.c net: remove outdated comment for ipv4 and ipv6 protocol handler 2013-11-28 18:47:51 -05:00
raw.c ipv4: fix memory leaks in ip_cmsg_send() callers 2016-03-24 10:00:45 +00:00
route.c ipv4: mask tos for input route 2017-06-05 21:17:17 +01:00
syncookies.c net: support marking accepting TCP sockets 2014-05-13 18:35:09 -04:00
sysctl_net_ipv4.c ipv4: use the right lock for ping_group_range 2017-02-23 03:54:19 +00:00
tcp.c tcp: initialize rcv_mss to TCP_MIN_MSS instead of 0 2017-09-15 18:30:18 +01:00
tcp_bic.c tcp: remove in_flight parameter from cong_avoid() methods 2014-05-03 19:23:07 -04:00
tcp_cong.c tcp: remove in_flight parameter from cong_avoid() methods 2014-05-03 19:23:07 -04:00
tcp_cubic.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-05-12 13:19:14 -04:00
tcp_diag.c inet_diag: Rename inet_diag_req into inet_diag_req_v2 2012-01-11 12:56:06 -08:00
tcp_fastopen.c tcp: fix tcp_fastopen unaligned access complaints on sparc 2017-03-16 02:27:23 +00:00
tcp_highspeed.c tcp: remove in_flight parameter from cong_avoid() methods 2014-05-03 19:23:07 -04:00
tcp_htcp.c tcp: remove in_flight parameter from cong_avoid() methods 2014-05-03 19:23:07 -04:00
tcp_hybla.c tcp: remove in_flight parameter from cong_avoid() methods 2014-05-03 19:23:07 -04:00
tcp_illinois.c tcp: remove in_flight parameter from cong_avoid() methods 2014-05-03 19:23:07 -04:00
tcp_input.c tcp: eliminate negative reordering in tcp_clean_rtx_queue 2017-09-15 18:29:39 +01:00
tcp_ipv4.c dccp/tcp: fix routing redirect race 2017-07-18 18:40:12 +01:00
tcp_lp.c tcp: fix wraparound issue in tcp_lp 2017-08-26 02:14:44 +01:00
tcp_memcontrol.c cgroup: replace cftype->trigger() with cftype->write() 2014-05-13 12:16:21 -04:00
tcp_metrics.c tcp: convert cached rtt from usec to jiffies when feeding initial rto 2016-03-24 10:01:13 +00:00
tcp_minisocks.c tcp: account for ts offset only if tsecr not zero 2017-06-05 21:17:13 +01:00
tcp_offload.c net-gre-gro: Fix a bug that breaks the forwarding path 2014-07-16 14:45:26 -07:00
tcp_output.c tcp: fix 0 divide in __tcp_select_window() 2017-03-16 02:27:24 +00:00
tcp_probe.c tcp: switch rtt estimations to usec resolution 2014-02-26 17:08:40 -05:00
tcp_scalable.c tcp: remove in_flight parameter from cong_avoid() methods 2014-05-03 19:23:07 -04:00
tcp_timer.c tcp: snmp stats for Fast Open, SYN rtx, and data pkts 2014-03-03 15:58:03 -05:00
tcp_vegas.c tcp: Fix integer-overflow in TCP vegas 2014-08-14 10:09:43 +08:00
tcp_vegas.h net: ipv4/ipv6: Remove extern from function prototypes 2013-10-19 19:12:11 -04:00
tcp_veno.c tcp: Fix integer-overflows in TCP veno 2014-08-14 10:09:43 +08:00
tcp_westwood.c tcp: remove unused min_cwnd member of tcp_congestion_ops 2014-02-13 18:22:34 -05:00
tcp_yeah.c tcp_yeah: don't set ssthresh below 2 2016-01-28 10:49:49 +00:00
tunnel4.c net: Convert printks to pr_<level> 2012-03-11 23:42:51 -07:00
udp.c udp: consistently apply ufo or fragmentation 2017-08-26 02:14:49 +01:00
udp_diag.c udp_diag: Fix socket skipping within chain 2015-02-10 13:38:49 +00:00
udp_impl.h net: ipv4/ipv6: Remove extern from function prototypes 2013-10-19 19:12:11 -04:00
udp_offload.c tunnels: Don't apply GRO to multiple layers of encapsulation. 2016-05-01 00:06:03 +02:00
udplite.c net: Eliminate no_check from protosw 2014-05-23 16:28:53 -04:00
xfrm4_input.c xfrm4: Add IPsec protocol multiplexer 2014-02-25 07:04:16 +01:00
xfrm4_mode_beet.c ipv4: ERROR: code indent should use tabs where possible 2013-12-26 13:43:21 -05:00
xfrm4_mode_transport.c [IPSEC]: Use IPv6 calling convention as the convention for x->mode->output 2007-10-10 16:55:54 -07:00
xfrm4_mode_tunnel.c inetpeer: get rid of ip_id_count 2014-06-02 11:00:41 -07:00
xfrm4_output.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-05-24 00:32:30 -04:00
xfrm4_policy.c xfrm: dst_entries_init() per-net dst_ops 2016-01-28 11:57:51 +00:00
xfrm4_protocol.c xfrm4: Properly handle unsupported protocols 2014-04-29 08:41:12 +02:00
xfrm4_state.c inet: make no_pmtu_disc per namespace and kill ipv4_config 2013-12-18 16:58:20 -05:00
xfrm4_tunnel.c sit: add IPv4 over IPv4 support 2013-05-31 17:19:05 -07:00