kernel-ark/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
appletalk
atm
ax25
bluetooth
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
econet
ethernet
ieee80211
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
irda
key
lapb
llc
netfilter
netlink
netrom
packet
rose
rxrpc
sched [NET]: Disable NET_SCH_CLK_CPU for SMP x86 hosts 2005-10-13 14:41:44 -07:00
sctp
sunrpc [PATCH] svcsock timestamp fix 2005-10-26 10:39:43 -07:00
unix
wanrouter
x25
xfrm
compat.c
Kconfig
Makefile
nonet.c
socket.c
sysctl_net.c
TUNABLE