https://github.com/torvalds/linux
Revision 2ad41065d9fe518759b695fc2640cf9c07261dd2 authored by Herbert Xu on 27 October 2005, 08:47:46 UTC, committed by Arnaldo Carvalho de Melo on 27 October 2005, 17:11:04 UTC
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>
1 parent 7a4ed93
History
Tip revision: 2ad41065d9fe518759b695fc2640cf9c07261dd2 authored by Herbert Xu on 27 October 2005, 08:47:46 UTC
[TCP]: Clear stale pred_flags when snd_wnd changes
Tip revision: 2ad4106
File Mode Size
Documentation
arch
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
scripts
security
sound
usr
.gitignore -rw-r--r-- 391 bytes
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 87.1 KB
Kbuild -rw-r--r-- 1.2 KB
MAINTAINERS -rw-r--r-- 59.6 KB
Makefile -rw-r--r-- 42.5 KB
README -rw-r--r-- 14.4 KB
REPORTING-BUGS -rw-r--r-- 3.0 KB

README

back to top