WSL2-Linux-Kernel/net
Herbert Xu 2ad41065d9 [TCP]: Clear stale pred_flags when snd_wnd changes
This bug is responsible for causing the infamous "Treason uncloaked"
messages that's been popping up everywhere since the printk was added.
It has usually been blamed on foreign operating systems.  However,
some of those reports implicate Linux as both systems are running
Linux or the TCP connection is going across the loopback interface.

In fact, there really is a bug in the Linux TCP header prediction code
that's been there since at least 2.1.8.  This bug was tracked down with
help from Dale Blount.

The effect of this bug ranges from harmless "Treason uncloaked"
messages to hung/aborted TCP connections.  The details of the bug
and fix is as follows.

When snd_wnd is updated, we only update pred_flags if
tcp_fast_path_check succeeds.  When it fails (for example,
when our rcvbuf is used up), we will leave pred_flags with
an out-of-date snd_wnd value.

When the out-of-date pred_flags happens to match the next incoming
packet we will again hit the fast path and use the current snd_wnd
which will be wrong.

In the case of the treason messages, it just happens that the snd_wnd
cached in pred_flags is zero while tp->snd_wnd is non-zero.  Therefore
when a zero-window packet comes in we incorrectly conclude that the
window is non-zero.

In fact if the peer continues to send us zero-window pure ACKs we
will continue making the same mistake.  It's only when the peer
transmits a zero-window packet with data attached that we get a
chance to snap out of it.  This is what triggers the treason
message at the next retransmit timeout.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2005-10-27 15:11:04 -02:00
..
802 [TR]: Preserve RIF flag even for 2 byte RIF fields. 2005-10-25 21:31:38 -02:00
8021q [8021Q]: Add endian annotations. 2005-09-19 15:41:28 -07:00
appletalk [APPLETALK]: Fix broadcast bug. 2005-09-27 16:11:29 -07:00
atm [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
ax25 [AX.25]: Fix packet socket crash 2005-10-05 12:16:04 -07:00
bluetooth [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
bridge [NETFILTER]: Fix OOPSes on machines with discontiguous cpu numbering. 2005-10-13 14:41:23 -07:00
core [PATCH] kill massive wireless-related log spam 2005-10-26 10:39:43 -07:00
dccp [DCCP]: Clear the IPCB area 2005-10-20 14:49:59 -02:00
decnet [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
econet [IPV4]: Replace __in_dev_get with __in_dev_get_rcu/rtnl 2005-10-03 14:35:55 -07:00
ethernet [NET]: Fix reversed logic in eth_type_trans(). 2005-09-28 22:37:53 -07:00
ieee80211 [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
ipv4 [TCP]: Clear stale pred_flags when snd_wnd changes 2005-10-27 15:11:04 -02:00
ipv6 [IPV6]: Fix refcnt of struct ip6_flowlabel 2005-10-25 21:17:52 -02:00
ipx [NET]: Fix sparse warnings 2005-08-29 16:01:32 -07:00
irda [IPV4]: Replace __in_dev_get with __in_dev_get_rcu/rtnl 2005-10-03 14:35:55 -07:00
key [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
lapb [NET]: Kill skb->list 2005-08-29 15:31:14 -07:00
llc [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
netfilter [NETFILTER] nfnetlink: use highest bit of nfa_type to indicate nested TLV 2005-10-10 20:52:19 -07:00
netlink [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
netrom [AX.25]: Fix packet socket crash 2005-10-05 12:16:04 -07:00
packet [NET]: Fix packet timestamping. 2005-10-03 13:57:23 -07:00
rose [ROSE]: fix typo (regeistration) 2005-09-27 15:45:15 -07:00
rxrpc [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
sched [NET]: Disable NET_SCH_CLK_CPU for SMP x86 hosts 2005-10-13 14:41:44 -07:00
sctp [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
sunrpc [PATCH] svcsock timestamp fix 2005-10-26 10:39:43 -07:00
unix [NET]: Fix sparse warnings 2005-08-29 16:01:32 -07:00
wanrouter [TCP]: Move the tcp sock states to net/tcp_states.h 2005-08-29 15:41:54 -07:00
x25 [TCP]: Move the tcp sock states to net/tcp_states.h 2005-08-29 15:41:54 -07:00
xfrm [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
Kconfig [NETFILTER] move nfnetlink options to right location in kconfig menu 2005-09-17 00:41:21 -07:00
Makefile /spare/repo/netdev-2.6 branch 'master' 2005-09-01 18:02:01 -04:00
TUNABLE Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
compat.c [PATCH] Fix 32bit sendmsg() flaw 2005-09-08 08:14:11 -07:00
nonet.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
socket.c [NET]: Fix module reference counts for loadable protocol modules 2005-09-27 15:23:38 -07:00
sysctl_net.c [NET]: Fix "sysctl_net.c:36: error: 'core_table' undeclared here" 2005-10-03 14:16:34 -07:00