tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Remote pid with SOCK_DGRAM local socket



On Sat, May 14, 2011 at 05:15:57AM -0400, Thor Lancelot Simon wrote:
> 
> Without that this sort of thing is fraught with danger.  No matter how
> clever you are, sooner or later someone will find yet another sneaky
> way to trick you into either trusting or killing the wrong process.  I
> have the scars to prove it.

Last time I managed to kill the wrong process was in a Linux driver
where they've stopped you sending a signal by pid, instead you have
to have a pointer to a little kernel structure.
I'd got a stale pointer to such a structure and killed the next
process to be created!
(Not helped by not being able to ref-count that structure in a non-GPL
driver.)

Since NetBSD won't reuse a pid immediately, a slightly stale pid number
is almost certainly not a problem.

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index