Re: F_SETOWN...

Ricky Beam (root@defiant.interpath.net)
Tue, 24 Nov 1998 03:29:26 -0500 (EST)


Letting the chips fall where they may, I quote Alan Cox:
>> Does no one else think that's just a little on the brain damaged side? No
>> sanity checks what-so-ever in handing a filedesc to an arbitrary process
>> number... no permissions check, no pid check, nothing.

(I still think that's a bad idea.)

>Read a little further. In paticular read the send_sigio function and you'll
>see the check is done at signal delivery time where it should be done,
>otherwise you could set up a SIGIO on a process that then execs a setuid
>process you shouldnt be able to signal

Bad example... exec() (and friends) would reset the ownership of all the
fd's. In my example, the same user (or superuser) was ultimately generating
the signal, thus it did get sent. Has anyone tested 2.0?

I'm still a little concerned about handing over a file descriptor without
at least verifying the process exists. (I know I'm being paranoid.)

--Ricky

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/