All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira <pablo@eurodev.net>
To: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
	Patrick McHardy <kaber@trash.net>,
	Martin Josefsson <gandalf@wlug.westbo.se>,
	Netfilter Development Mailinglist
	<netfilter-devel@lists.netfilter.org>,
	Willy Tarreau <willy@w.ods.org>
Subject: Re: [PATCH] modification in current protocol helper API to handle error/unclean packets
Date: Mon, 21 Jun 2004 14:46:31 +0200	[thread overview]
Message-ID: <40D6D8A7.4040809@eurodev.net> (raw)
In-Reply-To: <Pine.LNX.4.33.0406211033420.31871-100000@blackhole.kfki.hu>

Hi Jozsef,

Jozsef Kadlecsik wrote:

>>Would you be willing to apply the patch attached to pom-ng? It applies
>>to linux-2.6.patch_02-udp-icmp and it adds more checkings for invalid
>>icmp combinations.
>>    
>>
>
>Let us be very careful here and not add half of the unclean match to
>conntrack.
>  
>

thanks, it's always ok having someone who has the feet on the ground :-)

>We always have to remind ourselves that the sole task of the connection
>tracking subsystem is to keep track of connections as good as possible.
>We drop packets directly only when letting trough the packet would render
>connection tracking useless (therefore it's so rare). We *advice* the
>admin to drop packets by flagging it as INVALID when we can surely say
>that the packet in question is invalid in the context of the connection
>where it seems to belong to. But it's practically as strong a decision
>as dropping the packet directly, so we have to be careful there as well.
>
>I had already hesitated over the implications of the code
>
>++      /* 15 is the highest 'known' ICMP code. See RFC 1812 */
>++      if (icmph.code > 15) {
>++              if (LOG_INVALID(IPPROTO_ICMP))
>++                      nf_log_packet(PF_INET, 0, skb, NULL, NULL,
>++                                    "ip_ct_icmp: invalid ICMP code ");
>++              return -NF_ACCEPT;ç
>++      }
>
>because it means that if a new ICMP code is introduced, even if we modify
>the source code, all previously installed systems runnin netfilter
>(estimate that number) would refuse to handle the new ICMP code: we
>created a forward-incompatibility.
>  
>

that's true but, if that day comes, we can provide different ways to 
work around the problem:

- The admin could disable dropping invalid ICMP.
- We could use some some /proc stuff or implement custom options in 
iptables like:
iptables setting strong-icmp-tracking on
iptables setting strong-tcp-tracking off
and so on. This way the admin could choose to use your current 
tcp-window-tracking or the old one which is softer.
- We could use that NOTRACK target to untrack icmp packets which have 
those new codes, actually I don't love that target but it could be ok.

And of course, document these issues: Let everyone know what conntrack 
is setting as INVALID. I'll be please to do that, even your 
tcp-window-tracking patch.

If you still consider that we can't provide any methods to work around 
to possible problem, I'll drop checkings and we could leave them in a 
patch in pom-ng as something optional.

The reason why I like adding those pieces of codes is that I like the 
idea of having a strong and smart conntrack system that we could be 
proud of, but always letting the administrator to decide what he wants 
to drop or not.

regards,
Pablo

  parent reply	other threads:[~2004-06-21 12:46 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-14  0:10 [PATCH] modification in current protocol helper API to handle error/unclean packets Pablo Neira
2004-06-14  2:22 ` Patrick McHardy
2004-06-14  3:05   ` Patrick McHardy
2004-06-14 11:37   ` Pablo Neira
2004-06-14 14:03     ` Jozsef Kadlecsik
2004-06-17 12:09       ` Pablo Neira
2004-06-17 12:46         ` Patrick McHardy
2004-06-17 13:46           ` Pablo Neira
2004-06-17 14:15             ` Patrick McHardy
2004-06-17 17:26             ` Pablo Neira
2004-06-17 13:17         ` Jozsef Kadlecsik
2004-06-20 19:17         ` Martin Josefsson
2004-06-20 22:05           ` Pablo Neira
2004-06-21  0:07             ` Patrick McHardy
2004-06-22 12:19               ` Pablo Neira
2004-06-21  8:56             ` Jozsef Kadlecsik
2004-06-21 10:14               ` Henrik Nordstrom
2004-06-21 10:51                 ` Jozsef Kadlecsik
2004-06-22  4:39                   ` Willy Tarreau
2004-06-22 11:14                     ` Pablo Neira
2004-06-22 13:17                     ` Jozsef Kadlecsik
2004-06-22 13:31                       ` Jozsef Kadlecsik
2004-06-22 16:18                       ` Willy Tarreau
2004-06-21 12:46               ` Pablo Neira [this message]
2004-06-21 13:32                 ` Jozsef Kadlecsik
2004-06-21  8:11           ` Jozsef Kadlecsik
2004-06-14  9:05 ` Jozsef Kadlecsik
2004-06-21  4:20 ` Willy Tarreau
2004-06-21 13:40   ` 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=40D6D8A7.4040809@eurodev.net \
    --to=pablo@eurodev.net \
    --cc=gandalf@wlug.westbo.se \
    --cc=kaber@trash.net \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=willy@w.ods.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.