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:	Mon, 18 Jun 2007 13:01:52 +0100
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Thomas Graf <tgraf@...g.ch>
Cc:	Miklos Szeredi <miklos@...redi.hu>, davem@...emloft.net,
	akpm@...ux-foundation.org, viro@....linux.org.uk,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fix race in AF_UNIX

On Mon, 18 Jun 2007 12:43:40 +0200
Thomas Graf <tgraf@...g.ch> wrote:

> * Miklos Szeredi <miklos@...redi.hu> 2007-06-18 12:39
> > You are wrong.  Look in unix_release_sock():
> > 
> > 	if (atomic_read(&unix_tot_inflight))
> > 		unix_gc();		/* Garbage collect fds */
> > 
> > 
> > unix_tot_inflight is the number of AF_UNIX sockets currently being
> > transferred over some AF_UNIX sockets.
> > 
> > That means that just sending (non-unix socket) fds over unix sockets
> > will never invoke the gc.
> 
> That's what I meant, I'm sorry, I should have written unix socket
> file descriptor to not leave any room for misinterpretation.

You can bound the worst case on this and I think stay within the specs
(as the specs don't say a lot about it). One way would be to make
unix_gc() kick off a thread/tasklet and if the last unix_gc was within 5
seconds then use a timer to defer it - that prevents any user driven
"lets cause a ton of gc" cases.
-
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