[Vserver] "Abstract" (not FS based) UNIX sockets collision

From: Andreas Schultz <aschultz_at_warp10.net>
Date: Wed 25 Jan 2006 - 14:35:23 GMT
Message-Id: <200601251535.26987.aschultz@warp10.net>

Hi,

It seems that abstract UNIX sockets "leak" from a vserver. I'm trying to run
the same java app inside two vservers and only the first one started succeeds.

The critical piece from strace is:

20397 socket(PF_FILE, SOCK_STREAM, 0) = 5
20397 setsockopt(5, SOL_SOCKET, SO_PASSCRED, [7738151124464566273], 4) = 0
20397 bind(5, {sa_family=AF_FILE, path=@var/run/.php-java-bridge_socket}, 110) = -1 EADDRINUSE (Address already in use)

Looking at unix_bind() in net/unix/af_unix.c, it would seem that the socket
hashes are identical across all vservers and that no additional context check
is used. There is a context check in include/net/af_unix.h, but this
does not seem to be used when creating sockets from unix_bind().

Any ideas?

Regards
Andreas

_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver

Received on Wed Jan 25 14:36:11 2006
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Wed 25 Jan 2006 - 14:36:17 GMT by hypermail 2.1.8