All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Krzysztof Oledzki <ole@ans.pl>
Cc: Netfilter Developer Mailing List <netfilter-devel@lists.netfilter.org>
Subject: Re: What should we do with packets marked as INVALID?
Date: Thu, 28 Dec 2006 03:26:55 +0100	[thread overview]
Message-ID: <45932B6F.3040802@netfilter.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0612250059460.27316@bizon.gios.gov.pl>

Krzysztof Oledzki wrote:
> One of the most important feature provided by the netfilter subsystem is
> stateful connection tracking - the ability to decide that a packet is
> valid (or not) using not only data from a packet itself but also from a
> history of a flaw.
> 
> So, the question is: what should we do with packets marked as INVALID?
> 
> [...]
> 
> So OK, REJECT is wrong (possibly kills valid connections), DROP (makes
> invalid connections hang "forever") is also wrong, so maybe we should
> forward such packets and allow dst hosts to handle it
> (ignore/reset/etc). Bzzzz... no, wait, it is also wrong as we lose one
> of the most important netfilter feature.

IMO, the default action should be drop. Having a look at the errors in
the tcp window tracking code, I can't think about a sane connection that
can generate invalid out of window packets even under packet lost.

> So, I have two propositions:
>  - Add another state (ex. UNCLEAN) for packet that matches
> proto/src/dst/sport/dport, but netfilter consider that it is wrong.

If you let the invalid packet go through just because there is a tuple
in the conntrack table that matches it then, why do you want the whole
TCP window tracking? Just disabled it via ip_conntrack_tcp_be_liberal if
you want to do so, out of window packets will not be marked as invalid,
and you can still drop unclean packets since they are marked as invalid.

-- 
The dawn of the fourth age of Linux firewalling is coming; a time of
great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris

  parent reply	other threads:[~2006-12-28  2:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-25  1:33 What should we do with packets marked as INVALID? Krzysztof Oledzki
2006-12-25 12:29 ` Jan Engelhardt
2006-12-25 14:08   ` Krzysztof Oledzki
2006-12-28  2:26 ` Pablo Neira Ayuso [this message]
2006-12-28 10:06   ` Krzysztof Oledzki
2006-12-28 16:25     ` Pablo Neira Ayuso
2006-12-28 16:36       ` Krzysztof Oledzki
2007-01-10  6:06 ` Patrick McHardy
2007-01-15 10:41   ` Krzysztof Oledzki
2007-01-15 14:35     ` 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=45932B6F.3040802@netfilter.org \
    --to=pablo@netfilter.org \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=ole@ans.pl \
    /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.