android_kernel_samsung_msm8976/net/ipv4
Eric Dumazet 0d4f060861 tcp: dont handle MTU reduction on LISTEN socket
When an ICMP ICMP_FRAG_NEEDED (or ICMPV6_PKT_TOOBIG) message finds a
LISTEN socket, and this socket is currently owned by the user, we
set TCP_MTU_REDUCED_DEFERRED flag in listener tsq_flags.

This is bad because if we clone the parent before it had a chance to
clear the flag, the child inherits the tsq_flags value, and next
tcp_release_cb() on the child will decrement sk_refcnt.

Result is that we might free a live TCP socket, as reported by
Dormando.

IPv4: Attempt to release TCP socket in state 1

Fix this issue by testing sk_state against TCP_LISTEN early, so that we
set TCP_MTU_REDUCED_DEFERRED on appropriate sockets (not a LISTEN one)

This bug was introduced in commit 563d34d057
(tcp: dont drop MTU reduction indications)

Reported-by: dormando <dormando@rydia.net>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-18 13:31:28 -04:00
..
netfilter Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-02-26 20:16:07 -08:00
af_inet.c IP_GRE: Fix IP-Identification. 2013-02-25 15:47:41 -05:00
ah4.c net: Add skb_unclone() helper function. 2013-02-15 15:10:37 -05:00
arp.c net: proc: change proc_net_remove to remove_proc_entry 2013-02-18 14:53:08 -05:00
cipso_ipv4.c
datagram.c
devinet.c hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
esp4.c
fib_frontend.c hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
fib_lookup.h
fib_rules.c
fib_semantics.c hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
fib_trie.c hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
gre.c v4 GRE: Add TCP segmentation offload for GRE 2013-02-15 15:17:11 -05:00
icmp.c ipv4: fix error handling in icmp_protocol. 2013-02-22 15:10:18 -05:00
igmp.c net: proc: change proc_net_remove to remove_proc_entry 2013-02-18 14:53:08 -05:00
inet_connection_sock.c Fix: sparse warning in inet_csk_prepare_forced_close 2013-03-07 16:31:29 -05:00
inet_diag.c
inet_fragment.c hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
inet_hashtables.c hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
inet_lro.c
inet_timewait_sock.c hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
inetpeer.c
ip_forward.c
ip_fragment.c net: Add skb_unclone() helper function. 2013-02-15 15:10:37 -05:00
ip_gre.c Revert "ip_gre: make ipgre_tunnel_xmit() not parse network header as IP unconditionally" 2013-03-16 23:00:41 -04:00
ip_input.c ipv[4|6]: correct dropwatch false positive in local_deliver_finish 2013-03-01 15:56:29 -05:00
ip_options.c net/ipv4: Ensure that location of timestamp option is stored 2013-03-12 05:35:39 -04:00
ip_output.c net: Fix possible wrong checksum generation. 2013-02-13 13:30:10 -05:00
ip_sockglue.c
ip_vti.c
ipcomp.c ipcomp: Mark as netns_ok. 2013-02-04 15:46:15 -05:00
ipconfig.c net: proc: change proc_net_fops_create to proc_create 2013-02-18 14:53:08 -05:00
ipip.c
ipmr.c net: proc: change proc_net_remove to remove_proc_entry 2013-02-18 14:53:08 -05:00
Kconfig
Makefile
netfilter.c
ping.c ipv4: fix a bug in ping_err(). 2013-02-21 15:25:00 -05:00
proc.c net: proc: change proc_net_remove to remove_proc_entry 2013-02-18 14:53:08 -05:00
protocol.c ipv4: Disallow non-namespace aware protocols to register. 2013-02-05 14:42:23 -05:00
raw.c hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
route.c net: ipv4: fix waring -Wunused-variable 2013-02-19 13:18:13 -05:00
syncookies.c
sysctl_net_ipv4.c tcp: remove Appropriate Byte Count support 2013-02-05 14:51:16 -05:00
tcp.c tcp: fix skb_availroom() 2013-03-14 11:49:45 -04:00
tcp_bic.c
tcp_cong.c tcp: remove Appropriate Byte Count support 2013-02-05 14:51:16 -05:00
tcp_cubic.c
tcp_diag.c
tcp_fastopen.c
tcp_highspeed.c
tcp_htcp.c
tcp_hybla.c
tcp_illinois.c
tcp_input.c tcp: fix double-counted receiver RTT when leaving receiver fast path 2013-03-04 14:12:07 -05:00
tcp_ipv4.c tcp: dont handle MTU reduction on LISTEN socket 2013-03-18 13:31:28 -04:00
tcp_lp.c
tcp_memcontrol.c
tcp_metrics.c
tcp_minisocks.c tcp: send packets with a socket timestamp 2013-02-13 13:22:16 -05:00
tcp_output.c tcp: fix skb_availroom() 2013-03-14 11:49:45 -04:00
tcp_probe.c net: proc: change proc_net_remove to remove_proc_entry 2013-02-18 14:53:08 -05:00
tcp_scalable.c
tcp_timer.c
tcp_vegas.c
tcp_vegas.h
tcp_veno.c
tcp_westwood.c
tcp_yeah.c
tunnel4.c
udp.c net: proc: change proc_net_remove to remove_proc_entry 2013-02-18 14:53:08 -05:00
udp_diag.c
udp_impl.h
udplite.c
xfrm4_input.c net: Add skb_unclone() helper function. 2013-02-15 15:10:37 -05:00
xfrm4_mode_beet.c
xfrm4_mode_transport.c
xfrm4_mode_tunnel.c ip: fix warning in xfrm4_mode_tunnel_input 2013-02-18 12:42:48 -05:00
xfrm4_output.c
xfrm4_policy.c xfrm: make gc_thresh configurable in all namespaces 2013-02-06 11:36:29 +01:00
xfrm4_state.c
xfrm4_tunnel.c