lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20071029.153842.226361489.davem@davemloft.net>
Date:	Mon, 29 Oct 2007 15:38:42 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	shemminger@...ux-foundation.org
Cc:	acme@...hat.com, netdev@...r.kernel.org
Subject: Re: [PATCH] inet: race in wait for connect.

From: Stephen Hemminger <shemminger@...ux-foundation.org>
Date: Mon, 29 Oct 2007 14:37:14 -0700

> On Mon, 29 Oct 2007 19:29:06 -0200
> "Arnaldo Carvalho de Melo" <acme@...hat.com> wrote:
> 
> > Em Mon, Oct 29, 2007 at 01:52:22PM -0700, Stephen Hemminger escreveu:
> > > Fix possible race while waiting for connections in accept. I don't
> > > know of a test case that could reproduce this directly.
> > > 
> > > The state of the socket should be checked before checking the queue.
> > > If the socket has left the TCP_LISTEN state, then the accept queue
> > > is no longer valid.
> > 
> > Well if it left from LISTEN to CLOSED inet_csk_listen_stop must have
> > been called, and that calls reqsk_queue_yank_acceptq, that sets it to
> > NULL, reqsk_queue_empty(&icsk->icsk_accept_queue) returns true and we
> > get to if (sk->sk_state != TCP_LISTEN), returning -EINVAL as with your
> > patch.  So I can't see a race, just one branch less in one case :-)
> > 
> > - Arnaldo
> 
> Yeah, your right. The listen queue is garbage at this point but the
> accept queue is always empty.

Is there some failing test case you are aware of which led
you to this piece of code or did you happen to notice it
while scanning around?
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ