netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Wolfpaw - Dale Corse <admin@wolfpaw.net>
Cc: peter@mysql.com, netdev@oss.sgi.com, kaukasoi@elektroni.ee.tut.fi
Subject: RE: Linux 2.4.27 SECURITY BUG - TCP Local andREMOTE(verified)Denial of Service Attack
Date: Mon, 13 Sep 2004 11:49:10 +0100	[thread overview]
Message-ID: <1095072549.14359.3.camel@localhost.localdomain> (raw)
In-Reply-To: <002b01c498ff$c4619b30$0200a8c0@wolf>

On Sul, 2004-09-12 at 20:36, Wolfpaw - Dale Corse wrote:
> Mysql connection: descriptor 3 (from mysql.net.fd)
> Mysql connection closed (desc 3) (goes into CLOSE_WAIT now)
> New connection (outbound) for regular proxy on Desc 3
>   (this was created by a call to socket, and then connect)

fd != socket. Thats really important to realise. What you get on 
fd 3 from the new connection isn't the same as you had before. 
The one you closed has been handed off to the kernel to clean up
as and when everyone who has a copy has finished using it. Thats
why I asked about fork() - because you can end up giving handles
by mistake to other processes you create which don't close them

> The other bug being, if I simply leave them, in a short time, MySQL
> is saying "too many connections", and we can't query any data from
> it. This also occurs with FIFO sockets (such as /tmp/mysql.sock)
> wherein the connection simply sits as "ESTABLISHED".

I'd say your code is buggy then

> So something needs to trigger a "flush" of the left over data
> on the SQL side before closing the connection - yes?

That will occur anyway for you. I think you need to find out where the
other copies of the same fd went and how mysql manages them

  reply	other threads:[~2004-09-13 10:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <02be01c498fd$3b63a370$0300a8c0@s>
2004-09-12 19:36 ` Linux 2.4.27 SECURITY BUG - TCP Local andREMOTE(verified)Denial of Service Attack Wolfpaw - Dale Corse
2004-09-13 10:49   ` Alan Cox [this message]
     [not found] <02bd01c498fc$fe1954b0$0300a8c0@s>
2004-09-12 19:18 ` Wolfpaw - Dale Corse

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=1095072549.14359.3.camel@localhost.localdomain \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=admin@wolfpaw.net \
    --cc=kaukasoi@elektroni.ee.tut.fi \
    --cc=netdev@oss.sgi.com \
    --cc=peter@mysql.com \
    /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;
as well as URLs for NNTP newsgroup(s).