netdev
[Top] [All Lists]

Re: kernel bug in socketpair()

To: Glenn Fowler <gsf@xxxxxxxxxxxxxxxx>
Subject: Re: kernel bug in socketpair()
From: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>
Date: 23 Jul 2003 18:50:41 +0100
Cc: davem@xxxxxxxxxx, dgk@xxxxxxxxxxxxxxxx, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, netdev@xxxxxxxxxxx
In-reply-to: <200307231656.MAA69129@raptor.research.att.com>
Organization:
References: <200307231428.KAA15254@raptor.research.att.com> <20030723074615.25eea776.davem@redhat.com> <200307231656.MAA69129@raptor.research.att.com>
Sender: netdev-bounce@xxxxxxxxxxx
On Mer, 2003-07-23 at 17:56, Glenn Fowler wrote:
> you can eliminate the security implications for all fd types by
> simply translating
>       open("/dev/fd/N",...)
> to
>       dup(atoi(N))
> w.r.t. fd N in the current process

This has very different semantics. Consider lseek().

> otherwise there is a bug in the /dev/fd/N -> /proc/self/fd/N implementation
> and /dev/fd/N should be separated out to its (original) dup(atoi(N))
> semantics

I don't see a bug. I see differing behaviour between Linux and BSD on a
completely non standards defined item. Also btw nobody ever really wrote
a /dev/fd/ for Linux - it was just a byproduct of the proc stuff someone
noticed. I guess someone could write a Plan-9 style dev/fd or devfdfs
for Linux if they wanted.

Alan


<Prev in Thread] Current Thread [Next in Thread>