public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Wolfpaw - Dale Corse" <admin@wolfpaw.net>
To: <kaukasoi@elektroni.ee.tut.fi>
Cc: <linux-kernel@vger.kernel.org>
Subject: RE: Linux 2.4.27 SECURITY BUG - TCP Local and REMOTE(verified) Denial of Service Attack
Date: Sun, 12 Sep 2004 11:29:55 -0600	[thread overview]
Message-ID: <002301c498ee$1e81d4c0$0200a8c0@wolf> (raw)
In-Reply-To: <02a401c498e9$9167aff0$0300a8c0@s>

> On Sun, Sep 12, 2004 at 09:45:38AM -0600, Wolfpaw - Dale Corse wrote:
> >  No problem :) I run the following, against SSH as the target, and I
> > can also kill it. (using telnet as the other side of the attack)
> > 
> > root@maximus:/home/admin# telnet XXXXXXXXXXXXXXX 22
> > Trying XXXXXXXXXXXXXX...
> > Connected to XXXXXXXXXXXXXXXXX.
> > Escape character is '^]'.
> > Connection closed by foreign host.
> > root@maximus:/home/admin#
> 
> > Now.. Do you really want me to post the source code for it?
> 
> With default sshd_config you can DOS sshd trivially by 
> opening ten connections using ten times "telnet XXXXXXXXXXXXXXX 22".

A fair comment :) But look at it this way:

- The TCP RFC was last updated when?
- What is the average time for a tcp packet to fly even across
  the world these days? Maybe 300 ms? 1 second? 5?
- It is not a secret that the TCP protocol has flaws, take for
  example the RST bug, which required among other things, BGP4
  to use MD5 encryption to avoid being potentially attacked.

So this brings me to:

A) Why are the timeouts so long?
B) CLOSE_WAIT having _no timeout at all_ is still using the
   assumption the other side is honest, and will actually
   reply. This is a very bad assumption.
C) Socket still re-uses an FD before it is actually completely
   closed. This is bad, because by calling a second close in
   the case of mysql, you can get the connection to go away,
   but in that case, it closes whatever else is on that FD
   too. (A more likely analysis is that it closes the current
   connection, and then cleans the CLOSE_WAIT on that FD out
   of the other pool)

All I am trying to point out is that the Internet in general, and
The Open Source movement has survived, and evolved because of innovation,
and the ability to meet upcoming threats quickly. TCP has some issues
which are blindingly obvious, and they are issues that, in my view (flawed
as it may be) can be at least somewhat minimized by a few simple changes.

I realize daemons have connection queues, and timeouts for a reason, but
really, if a daemon wishes to close a connection, for whatever reason,
sending something to the other side is required, but I can't see why having
the other side send something back is part of the protocol. This could be
implemented with KEEPALIVE much easier, and would avoid the flaws.. No reply
from the host in say 10 seconds, then drop the connection. You could still
clog queues, to which I would say the application needs to cope with one
client
filling the whole queue as best it can, and it wouldn't stop a DDOS (not much
does), but it might help some at least.

Anyway.. That's my 2 cents. I will continue my conversation with Peter from
mysql in regards to mysql_close, which was really, the entire point. It is
sad however to see a maintainer come across in the manner which David has
during the course of this discussion. It doesn't bode well for the future
of open source to tell someone off, whom likely has a valid point.. whether
or not it is a repairable fault.

Regards,
Dale.
--------------------------------
Dale Corse
System Administrator
Wolfpaw Services Inc.
http://www.wolfpaw.net
(780) 474-4095


       reply	other threads:[~2004-09-12 17:29 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <02a401c498e9$9167aff0$0300a8c0@s>
2004-09-12 17:29 ` Wolfpaw - Dale Corse [this message]
2004-09-12 17:04   ` Linux 2.4.27 SECURITY BUG - TCP Local and REMOTE(verified) Denial of Service Attack Alan Cox
2004-09-12 19:23     ` Toon van der Pas
2004-09-13  3:18       ` Paul Jakma
2004-09-13  3:30         ` Paul Jakma
2004-09-13  4:18           ` Willy Tarreau
2004-09-13  4:25             ` Paul Jakma
2004-09-13 19:07             ` Tonnerre
2004-09-13 19:18               ` Willy Tarreau
2004-09-13 19:25               ` Paul Jakma
2004-09-13 20:11           ` Ville Hallivuori
2004-09-14 14:55             ` Paul Jakma
2004-09-14 15:10               ` Alan Cox
2004-09-14 16:26                 ` Paul Jakma
2004-09-14 16:09                   ` Alan Cox
2004-09-14 17:17                     ` Paul Jakma
2004-09-20 22:02                       ` Florian Weimer
2004-09-21  2:14                         ` Herbert Xu
2004-09-21 18:32                           ` Florian Weimer
2004-09-21 19:56                             ` David S. Miller
2004-09-21 20:04                               ` Florian Weimer
2004-09-21 20:25                                 ` David S. Miller
2004-09-21 20:51                                   ` Florian Weimer
2004-09-14 19:41                 ` Willy Tarreau
2004-09-14 18:56                   ` Alan Cox
2004-09-20 22:03                 ` Florian Weimer
2004-09-20 23:12                   ` Alan Cox
     [not found] <02bf01c498ff$b6512470$0300a8c0@s>
2004-09-12 19:42 ` Wolfpaw - Dale Corse
2004-09-12 19:53   ` Willy Tarreau
     [not found] <02b001c498f6$7942bc50$0300a8c0@s>
2004-09-12 18:52 ` Linux 2.4.27 SECURITY BUG - TCP Local and REMOTE(verified)Denial " Wolfpaw - Dale Corse
2004-09-12 18:06   ` Alan Cox
     [not found] <02b201c498f6$8bb92540$0300a8c0@s>
2004-09-12 18:40 ` Wolfpaw - Dale Corse
2004-09-12 18:01   ` Alan Cox
2004-09-12 19:48   ` Willy Tarreau
2004-09-13  6:59   ` Jurjen Oskam
     [not found] <029201c498d8$dff156f0$0300a8c0@s>
2004-09-12 15:45 ` Linux 2.4.27 SECURITY BUG - TCP Local and REMOTE(verified) Denial " Wolfpaw - Dale Corse
2004-09-12 16:47   ` Petri Kaukasoina
2004-09-12 17:59   ` Willy Tarreau
2004-09-12 17:17     ` Alan Cox
2004-09-12 18:18     ` Willy Tarreau

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='002301c498ee$1e81d4c0$0200a8c0@wolf' \
    --to=admin@wolfpaw.net \
    --cc=kaukasoi@elektroni.ee.tut.fi \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox