From: Michael Tokarev <mjt@tls.msk.ru>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Denys Fedoryshchenko <denys@visp.net.lb>, netdev@vger.kernel.org
Subject: Re: SYN attack, with FIN flag set
Date: Sat, 03 Dec 2011 13:03:54 +0400 [thread overview]
Message-ID: <4ED9E5FA.30204@msgid.tls.msk.ru> (raw)
In-Reply-To: <1322902401.2762.85.camel@edumazet-laptop>
On 03.12.2011 12:53, Eric Dumazet wrote:
[]
> TCP stack first tries to lookup a socket, given the tuple found in
> incoming packet.
>
> This is where your machine is hit : we find the listener socket and lock
> it.
>
> Then, once socket was found and locked, state machine handle various
> possible states.
>
> In your case, you want to bypass the lookup, and eventually bypass the
> IP route lookup as well (to keep IP route cache small)
>
> iptables -t raw -I PREROUTING -p tcp --tcp-flags SYN,FIN SYN,FIN -j DROP
Maybe it makes some sence to add a basic "sanity" check rule
before the socket lookup?
The question here is why SYN+FIN results in worse behavour than
SYN alone - in the default setup, without iptables rules? As
far as I understand, "regular" SYN attack is handled just fine,
but SYN+FIN attack makes the machine to "choke", and it is not
obvious how to fix it -- naive --syn iptables rule does not help.
The price for the sanity check appears to be small since there's
already a check for RST.
Just asking, not suggesting anything... ;)
Thanks,
/mjt
next prev parent reply other threads:[~2011-12-03 9:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-02 22:29 SYN attack, with FIN flag set Denys Fedoryshchenko
2011-12-03 7:27 ` Eric Dumazet
2011-12-03 7:55 ` Eric Dumazet
2011-12-03 8:18 ` Denys Fedoryshchenko
2011-12-03 8:53 ` Eric Dumazet
2011-12-03 9:03 ` Michael Tokarev [this message]
2011-12-03 9:07 ` Denys Fedoryshchenko
2011-12-03 9:41 ` Eric Dumazet
2011-12-03 10:02 ` Eric Dumazet
2011-12-03 18:40 ` Denys Fedoryshchenko
2011-12-04 6:26 ` David Miller
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=4ED9E5FA.30204@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=denys@visp.net.lb \
--cc=eric.dumazet@gmail.com \
--cc=netdev@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.