All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Burress <tim@variosecure.net>
To: Henrik Nordstrom <hno@marasystems.com>
Cc: netfilter-devel@lists.netfilter.org,
	NIIBE Yutaka <gniibe@fsij.org>,
	ukai@debian.or.jp
Subject: Re: TCP Connection tracking and SYN/ACK/PSH
Date: Wed, 20 Apr 2005 10:30:31 +0900	[thread overview]
Message-ID: <4265B0B7.5090707@variosecure.net> (raw)
In-Reply-To: <Pine.LNX.4.61.0504180316120.4321@filer.marasystems.com>

Henrik Nordstrom wrote:

> Just a small note to support this: SYN+ACK+PSH is a perfectly valid 
> flags combination, even more so if there actually is data enclosed in 
> the SYN+ACK (which is valid, only a little odd).
>
> There is not really any good reason why conntrack should care in 
> detail about the PSH flag. Most if not all valid flag combinations are 
> good both with and without PSH (even SYN).

We recently had a similar issue, and initially I thought it was overly 
paranoid for Netfilter to mark these segments invalid, but after some 
digging I've changed my mind. The problem is that, even though there is 
no statement in the standards classifying SYN/ACK/PSH itself as invalid, 
the operation that PSH demands -- immediate transmission to the 
application -- is explicitly forbidden during the handshake [RFC 793, 
pg. 30]. In any other protocol, a request to perform a prohibited 
operation would, I think, be considered invalid, so in the end I think 
Netfilter is doing the right thing, inconvenient as it may be for a few 
devices.

In our case the device was a Panasonic WJ-NT104 interface/server for 
network cameras. Apparently there is an embedded TCP/IP stack making the 
rounds in Japan that sets the PSH flag on *every* segment. Panasonic's 
technical support have not yet replied to queries about the issue, but 
we're hoping they will issue a firmware upgrade to fix the problem. In 
the meantime, we modified our rules to allow INVALID traffic to/from the 
device. Obviously it's not ideal, but it gets the job done. If Panasonic 
is unable/unwilling to fix the TCP behavior, we would probably patch 
Netfilter to clear the PSH flag when it occurs in combination with SYN. 
That way we could accept the traffic without allowing invalid segments 
through to hosts on the other side.

Tim

  parent reply	other threads:[~2005-04-20  1:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-17 10:37 TCP Connection tracking and SYN/ACK/PSH NIIBE Yutaka
2005-04-18  1:34 ` Henrik Nordstrom
2005-04-18 23:06   ` Phil Oester
2005-04-20  1:30   ` Tim Burress [this message]
2005-04-20  7:02     ` Re[2]: " Maciej Soltysiak
2005-04-20  7:42     ` Henrik Nordstrom
2005-04-22  9:38       ` Tim Burress
2005-04-22 13:45         ` Jozsef Kadlecsik
2005-04-22 15:34           ` Patrick McHardy

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=4265B0B7.5090707@variosecure.net \
    --to=tim@variosecure.net \
    --cc=gniibe@fsij.org \
    --cc=hno@marasystems.com \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=ukai@debian.or.jp \
    /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.