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]
Date:	Fri, 19 Jul 2013 17:10:05 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Eric Wong <normalperson@...t.net>
Cc:	Al Viro <viro@...IV.linux.org.uk>, netdev <netdev@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: strange crashes in tcp_poll() via epoll_wait

On Fri, 2013-07-19 at 23:50 +0000, Eric Wong wrote:
> Eric Dumazet <eric.dumazet@...il.com> wrote:
> > Hi Al
> > 
> > I tried to debug strange crashes in tcp_poll() called from
> > sys_epoll_wait() -> sock_poll()
> > 
> > The symptom is that sock->sk is NULL and we therefore dereference a NULL
> > pointer.
> > 
> > It's really rare crashes but still, it would be nice to understand where
> > is the bug. Presumably latest kernels would crash in sock_poll() because
> > of the sk_can_busy_loop(sock->sk) call.
> > 
> > We do test sock->sk being NULL in sock_fasync(), but epoll should be
> > safe because of existing synchronization (epmutex) ?
> 
> It should be safe because of ep->mtx, actually, as epmutex is not taken
> in sys_epoll_wait.

Hmm, it might be more complex than that for multi threaded programs : 

eventpoll_release_file()

The problem might be because a thread closes a socket while an event
was queued for it.


> 
> I took a look at this but have not found anything.  I've yet to see this
> this on my machines.
> 
> When did you start noticing this?

Hard to say, but we have these crashes on a 3.3+ based kernel.

Probability of said crashes is very very low.


--
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