public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Wolfpaw - Dale Corse" <admin@wolfpaw.net>
To: <davem@davemloft.net>
Cc: <linux-kernel@vger.kernel.org>
Subject: RE: Linux 2.4.27 SECURITY BUG - TCP Local (probable Remote) Denial of Service
Date: Sun, 12 Sep 2004 03:10:29 -0600	[thread overview]
Message-ID: <000f01c498a8$59b24700$0200a8c0@wolf> (raw)
In-Reply-To: <025e01c4989c$ba5f62b0$0300a8c0@s>

David,
> 
> If the application doesn't close it's file descriptors there 
> is absolutely nothing the kernel can do about it.
> 
> It's a resource leak, plain and simple.
> 
> > That being said - below is a the proper description, and 
> the code used
> > to exploit it. Hope it helps. This version is not the one which 
> > invokes the CLOSE_WAIT state, but rather the TIME_WAIT one, 
> I am not 
> > able to publish the source code for the CLOSE_WAIT bug.
> 
> There is nothing wrong with creating tons of TIME_WAIT 
> sockets, they simply time out after 60 seconds (unless hit by 
> a RESET packet or similar).  This is how TCP works.

I am aware of that, you are missing the point. The point is
the part where the socket is reused before it is completely
closed, the end result being the daemon its pointed at keeps
the connection open, and thus ends up in a DOS condition.

Please do me a favor, and read the bug before you comment.

> 
> > The log however clearly shows that a mysql descriptor is 
> closed, and 
> > then used immediately again by the socket call, which 
> causes it never 
> > to end up getting closed. Linux apparently has either no 
> timeout for 
> > CLOSE_WAIT, or it's a very very long one.. Either way is a 
> bad thing.
> 
> Please do us all a favor and learn how TCP works.

A) Stop asking me for favors.
B) You have some serious aggression issues you need to work on :) I
   openly admitted not submitting issues before at the beginning of
   my first email, did I miss the part where it became required for
   you to turn into an asshole? :) I can see why people would toss
   exploits off to the zeroday groups, you get a more warm reception 
   when you report a bug, and it ends up fixed in the end, instead of
   overrun with excuses :)

> CLOSE_WAIT means simply that only one side of the TCP 
> connection has done a close.  Therefore the other end stays 
> open until that side closes as well.
> 
> There is no way to "time things out" or release the
> state.
> 

This is your "godly developer answer" to this bug? Ok, well,
so I am to assume that this is the mission of the kernel:

A) All software must run perfectly, because we "can't do anything
   about resource leaks"
B) The internet is perfect, and there are no problems with TCP, so
   we can't add a timeout for CLOSE_WAIT, we must just leave it there
   forever. Forget the fact it could potentially bring the server, or
   the daemon it is speaking to down to its knees.
C) Don't submit bugs, because David likes to tell you that you know
   nothing, and "as a favor" to please go and find out what the hell
   your talking about. He obviously knows everything, so please, stop
   insulting his mailing list.

Is that correct? Here and I thought the job of the operating system was
to deal with issues such as this. If this is indeed where Linux is headed,
I fear the internet may be in a good deal of trouble.

For the record, I believe Microsoft Windows, and FreeBSD both have timeouts
for this TCP State. But, I better go learn how they work, before I make
such a comment.

Regards,
Dale.


       reply	other threads:[~2004-09-12  9:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <025e01c4989c$ba5f62b0$0300a8c0@s>
2004-09-12  9:10 ` Wolfpaw - Dale Corse [this message]
     [not found] <026001c4989c$e2bddbb0$0300a8c0@s>
2004-09-12  9:24 ` Linux 2.4.27 SECURITY BUG - TCP Local (probable Remote) Denial of Service Wolfpaw - Dale Corse
2004-09-12 10:36   ` Willy Tarreau
     [not found] <022601c49866$9e8aa8f0$0300a8c0@s>
2004-09-12  2:45 ` Wolfpaw - Dale Corse
2004-09-12  3:47   ` David S. Miller
2004-09-12  6:27     ` Peter Zaitsev
2004-09-12  6:56       ` Willy Tarreau
2004-09-12  7:11         ` Peter Zaitsev
2004-09-13 17:46   ` Ron DuFresne
2004-09-11 21:41 Wolfpaw - Dale Corse
2004-09-12  1:12 ` David S. Miller
2004-09-14  9:00 ` Ivan Groenewald

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='000f01c498a8$59b24700$0200a8c0@wolf' \
    --to=admin@wolfpaw.net \
    --cc=davem@davemloft.net \
    --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