panic: oof, we didn't get our fd while playing with devfs(8) and jails

Ed Schouten ed at 80386.nl
Wed Jun 10 16:26:33 UTC 2009


Hey Jilles,

* Jilles Tjoelker <jilles at stack.nl> wrote:
> This KASSERT may happen if you execute a setuid/setgid program with one
> or more of fd 0, 1, 2 closed, and you cannot open /dev/null (e.g. not
> present, bad permissions). The assertion checks td->td_retval[0] even if
> kern_open() failed. After that, if td->td_retval[0] happened to be equal
> to the expected value or INVARIANTS was disabled, the function checks if
> kern_open() failed. If so, it returns an error which eventually causes
> "whoops, no process anymore" process termination in do_execve() (appears
> as SIGABRT).

Too bad we don't have some kind of global nullfd that we could just dup
everywhere. I really don't like the way how we depend on certain
pathnames within the kernel.

-- 
 Ed Schouten <ed at 80386.nl>
 WWW: http://80386.nl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20090610/037d757a/attachment.pgp


More information about the freebsd-current mailing list