All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert L Mathews <lists@tigertech.com>
To: netfilter@vger.kernel.org
Subject: Re: conntrack and RSTs received during CLOSE_WAIT
Date: Thu, 21 May 2009 11:07:14 -0700	[thread overview]
Message-ID: <4A159852.8080609@tigertech.com> (raw)
In-Reply-To: <alpine.DEB.2.00.0905211058160.12567@blackhole.kfki.hu>

Jozsef Kadlecsik wrote:

> The TCP sequence numbers *are* tracked and checked - but with the limit of 
> a node being in the middle of the two communicating endpoints. That limit 
> is physical and cannot be discarded.

That said, would it be safe to say that if conntrack has already seen a 
certain sequence number in one direction, then a RST packet with less 
than sequence number + 1 is automatically invalid?

To take my original example, if the client sends a legitimate packet 
with sequence number 421, then sends a following RST packet that also 
has sequence number 421, the RST packet *must* be bogus, and will 
(hopefully) be ignored by the server.

I realize that in practice, when our node-in-the-middle forwards the two 
seq=421 packets to the server, the first ("real") packet could be lost. 
Or perhaps the two packets arrive at the server in the other order. 
Either case will cause the server to see the bogus RST packet before it 
sees the "real" packet, and the server will "incorrectly" accept the 
bogus RST. And I don't see a way for conntrack to detect whether this 
happened.

However, it seems much more likely that the server will "correctly" 
reject the RST. Perhaps conntrack should assume that, instead? It would 
be correct more often, and it's also less harmful if we're wrong: when 
we receive data that violates the TCP standard, it seems better for 
conntrack to decide that a connection is still open when it's not, than 
to decide that a connection is closed when it isn't.

-- 
Robert L Mathews, Tiger Technologies    http://www.tigertech.net/

  reply	other threads:[~2009-05-21 18:07 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-15 22:10 conntrack and RSTs received during CLOSE_WAIT Robert L Mathews
2009-05-16 21:57 ` Jozsef Kadlecsik
2009-05-17  3:09   ` Robert L Mathews
2009-05-20  5:16     ` Robert L Mathews
2009-05-20  7:19       ` Jozsef Kadlecsik
2009-05-20  7:31         ` Philip Craig
2009-05-20  7:42           ` Jozsef Kadlecsik
2009-05-20  8:06             ` Philip Craig
2009-05-20  8:43               ` Jozsef Kadlecsik
2009-05-20 20:24         ` Robert L Mathews
2009-05-20 21:40           ` Jozsef Kadlecsik
2009-05-21  8:17             ` Anatoly Muliarski
2009-05-21  9:11               ` Jozsef Kadlecsik
2009-05-21 18:07                 ` Robert L Mathews [this message]
2009-05-21 15:31             ` Jozsef Kadlecsik
2009-05-21 18:45               ` Robert L Mathews
2009-05-22  4:32                 ` Anatoly Muliarski
2009-05-22  7:21                   ` Jozsef Kadlecsik
2009-05-22  8:26                     ` Anatoly Muliarski
2009-05-22  8:54                       ` Jozsef Kadlecsik
2009-05-22 11:27                         ` Jozsef Kadlecsik
2009-05-22  7:42                 ` Jozsef Kadlecsik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A159852.8080609@tigertech.com \
    --to=lists@tigertech.com \
    --cc=netfilter@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.