[lkml]   [2003]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Re: kernel bug in socketpair()

> On Wed, 23 Jul 2003 09:32:09 -0400 (EDT)
> David Korn <> wrote:
> [ Added, the proper place to discuss networking kernel issues
> . ]
> > The first problem is that files created with socketpair() are not accessible
> > via /dev/fd/n or /proc/$$/fd/n where n is the file descriptor returned
> > by socketpair(). Note that this is not a problem with pipe().
> Not a bug.
> Sockets are not openable via /proc files under any circumstances,
> not just the circumstances you describe. This is a policy decision and
> prevents a whole slew of potential security holes.

Thanks for you quick response.

This make sense for INET sockets, but I don't understand the security
considerations for UNIX domain sockets. Could you please elaborate?
Moreover, /dev/fd/n, (as opposed to /proc/$$/n) is restricted to
the current process and its decendents if close-on-exec is not specified.
Again, I don't understand why this would create a security problem
either since the socket is already accesible via the original

Finally if this is a security problem, why is the errno is set to ENXIO
rather than EACCESS?

David Korn
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:47    [W:0.061 / U:0.024 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site