lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 6 Apr 2012 15:17:12 -0700
From:	Neal Cardwell <ncardwell@...gle.com>
To:	Vijay Subramanian <subramanian.vijay@...il.com>
Cc:	chetan loke <loke.chetan@...il.com>, netdev@...r.kernel.org,
	davem@...emloft.net, ilpo.jarvinen@...sinki.fi
Subject: Re: [PATCH net-next V2] tcp: Fix bug when gap in rcv sequence is filled

On Fri, Apr 6, 2012 at 10:36 AM, Vijay Subramanian
<subramanian.vijay@...il.com> wrote:
> As per RFC2581 and the newer RFC5681, "the receiver SHOULD send an immediate ACK
> when it receives a data segment that fills in all or part of a gap in the
> sequence space." When TCP receiver gets the next in-sequence packet, we move
> data from ofo queue to receive queue. At this point, we should send an immediate
> ack by entering quickack mode.  In the current code, instead of entering
> quickack mode upon requeing packets from ofo queue to receive_queue, we enter
> quickack mode only when ofo queue becomes empty after requeuing.  This ignores
> the possibility that there may be further packets left in ofo queue. This patch
> fixes this behavior and enters quickack mode whenever packets are moved from ofo
> queue to receive queue.

If you have some packet traces documenting that there is actually a
bug here, can you please share them?

AFAICT the code correctly generates immediate ACKs in these cases by:

(a) having __tcp_ack_snd_check() call tcp_send_ack() to send an
immediate ack if out_of_order_queue is non-empty.

(b) having tcp_data_queue set icsk_ack.pingpong to 0 when
out_of_order_queue transitions from non-empty to empty

My testing also shows that Linux TCP correctly generates an immediate
ACK when we move data from the out_of_order_queue to the
sk_receive_queue but the out_of_order_queue is still non-empty. Here
is a condensed packet trace showing the behavior I see in tests (with
a trace taken on machine A):

.798 B>A . 50001:60001(10000) ack 1001 win 20000
.838 A>B . ack 60001 win 10000
.848 B>A . 61001:62001(1000) ack 1001 win 20000
.848 A>B . ack 60001 win 10000 <nop,nop,sack 1 {61001:62001}>
.858 B>A . 63001:64001(1000) ack 1001 win 20000
.858 A>B . ack 60001 win 10000 <nop,nop,sack 2 {63001:64001}{61001:62001}>
.868 B>A . 60001:61001(1000) ack 1001 win 20000
.868 A>B . ack 62001 win 10000 <nop,nop,sack 1 {63001:64001}>

neal
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ