All of lore.kernel.org
 help / color / mirror / Atom feed
From: Emmanuel Fleury <fleury@cs.auc.dk>
To: netfilter-devel@lists.samba.org
Subject: Re: Security flaw in Stateful filtering ??????
Date: Thu, 06 Jun 2002 20:34:04 +0200	[thread overview]
Message-ID: <3CFFAB1C.902@cs.auc.dk> (raw)
In-Reply-To: 20020606195706.A21880@oknodo.bof.de

Hi,

Patrick Schaaf wrote:
> 
> The "problem" has been reported here several times, already.

Sorry, I should have browse the archive more carefully.

> The behaviour is intentional. The reason is "connection pickup". Imagine
> a situation where the firewall reboots. All active conntracking information
> will be lost. With the observed behaviour, connections are "relearned"
> on the fly as they create new traffic.

I simply disagree with you on this point (sorry :-/).

I wouldn't accept to have such a flaw in my firewall just because of
an hypothetic reboot of one of my gateway !!!!

Of course, I could be wrong, but in this case this 'feature' should be
highly documented and be disabled as default. IMHO.

One of the major argument in favor of the stateful inspection is that
it prevents from a lot of weird scans (NULL scan, X-MAS scan, ACK scan,
...). If you just drop this feature, I really don't see the point to
activate this 'connection tracking thingy' and make your gateway
sensitiv to DOS attack, just for fun...

Ok, I am pretty newbie in this topic, so I don't have any idea of:
'How often a gateway has to reboot'. But, somehow, I heard that
Linux boxes had pretty good uptimes (well, at least, mine have).

And, even in case of reboot, what sort of connection is more important
than preventing such scan of your network ????

Anyway, I should browse the archive of the mailing-list and try to
convinced myself how foolish I am. :-)

> This is indeed only an ugly hack. Make your students think about what
> exactly they want. Somehow, new connections need to be accepted, or
> you wouldn't have anything to match the ESTABLISHED rule. The thing
> you want to at least accept, are packets with SYN set, and the SYN/ACK
> in the opposite direction. A real forwarding table will additionally
> match on certain ports, to make sure even the SYN is only accepted
> for permitted protocols.
 >
> Thus, you want a ruleset like this to properly do "no connection pickup".
> I assume we are talking about tcp, only:
> 
> 1) permit ESTABLISHED
> 2) deny INVALID
> (now only state NEW should be left, right?)
> 3) deny packets which are neither SYN nor SYN/ACK
> 4-N) specifically permit the desired protocols, using port based matches.
> 
> 
>>We have found something about it in the Iptables tutorial (1.1.8),
>>page 54 (Appendix B, "State NEW packets but no SYN bit set").
>>But, this is not really convincing.
> 
> 
> I hope I could explain the rationale, and how to cope if your policy
> demands it, a bit better.

Actually, they are measuring the Round Trip Time (RTT) of SYN and ACK
packets in order to minimize the time-out of a connection in the
connection table.

One of their experiment was trying to figure out what is the impact of
removing a connection too early from the connection table.

The plan was to see what was happen when the last ACK (answering to
the FIN packet) was retransmitted because of the loss of the FIN packet.

Of course, it was expected that the firewall, as the connection has been
pruned from the connection list, would have dropped the retransmitted
ACK.... of course the behaviour that they get was somehow different of
what they were expected.


Regards
-- 
Emmanuel

What happens if a big asteroid hits the Earth?
Judging from realistic simulations involving a sledge hammer and
a common laboratory frog, we can assume it will be pretty bad.
   -- Dave Barry

  reply	other threads:[~2002-06-06 18:34 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-06 17:21 Security flaw in Stateful filtering ?????? Emmanuel Fleury
2002-06-06 17:48 ` Martin Josefsson
2002-06-06 17:54 ` Maciej Soltysiak
2002-06-06 18:52   ` Emmanuel Fleury
2002-06-06 19:11     ` Maciej Soltysiak
2002-06-06 19:30     ` Guillaume Morin
2002-06-06 19:53       ` Patrick Schaaf
2002-06-06 19:43     ` Henrik Nordstrom
2002-06-06 17:57 ` Patrick Schaaf
2002-06-06 18:34   ` Emmanuel Fleury [this message]
2002-06-06 19:12     ` Patrick Schaaf
2002-06-06 19:28       ` Emmanuel Fleury
2002-06-06 19:27     ` Henrik Nordstrom
2002-06-06 20:50       ` Emmanuel Fleury
2002-06-06 21:26         ` Henrik Nordstrom
  -- strict thread matches above, loose matches on Subject: below --
2002-06-06 19:29 Sneppe Filip
2002-06-06 22:15 Andy Whitcroft
     [not found] <20020606220914.A14542@groar.org>
2002-06-06 23:31 ` Rusty Russell
2002-06-06 23:52   ` Joerg Mayer
2002-06-07  2:10     ` Rusty Russell
2002-06-07  2:53       ` Joerg Mayer
2002-06-07 12:45         ` Marcus Sundberg
2002-06-07 14:36       ` Henrik Nordstrom
2002-06-07 21:48     ` Ben Reser
2002-06-07  8:15   ` Emmanuel Fleury
2002-06-07  8:50     ` Oskar Andreasson
2002-06-07 12:27       ` Jozsef Kadlecsik
2002-06-10  8:04         ` Oskar Andreasson
2002-06-10  8:26           ` Emmanuel Fleury
2002-06-12  9:23           ` Jozsef Kadlecsik
2002-06-07  9:05     ` Henrik Nordstrom
2002-06-07  9:31       ` Emmanuel Fleury
2002-06-07  9:41         ` Oskar Andreasson
2002-06-07  9:43         ` Guillaume Morin
2002-06-07  9:57           ` Emmanuel Fleury
2002-06-07 10:17             ` Guillaume Morin
2002-06-07 11:30               ` Emmanuel Fleury
2002-06-07 13:33                 ` Guillaume Morin
2002-06-07 15:13                   ` Emmanuel Fleury
2002-06-07 18:36                     ` Guillaume Morin
2002-06-07 19:00                       ` Patrick Schaaf
2002-06-08  2:06                         ` Emmanuel Fleury
2002-06-08  8:21                           ` Patrick Schaaf
2002-06-08 12:02                             ` Henrik Nordstrom
2002-06-09  7:03                               ` Emmanuel Fleury
2002-06-09  8:29                                 ` Patrick Schaaf
2002-06-08  1:42                       ` Emmanuel Fleury
2002-06-07 10:17             ` Henrik Nordstrom
2002-06-07 10:11         ` Henrik Nordstrom
2002-06-07 22:02     ` Ben Reser
2002-06-08  2:13       ` Emmanuel Fleury
2002-06-08  8:23         ` Patrick Schaaf
2002-06-08 16:41         ` Ben Reser
2002-06-07  9:42 Mikkel Christiansen
2002-06-08  7:44 ` Harald Welte

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=3CFFAB1C.902@cs.auc.dk \
    --to=fleury@cs.auc.dk \
    --cc=netfilter-devel@lists.samba.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.