Re: security / kbd

Andries Brouwer
2005-12-03T21:44:04Z

On Sat, Dec 03, 2005 at 07:48:19PM +0100, Bodo Eggert wrote:

> > You argue "you can't keep an exploit open" - but as far as I can see
> > there is no problem that needs solving in kernel space.
> > For example - today login does a single vhangup() for the login tty.
> > In case that is a VC it could do a vhangup() for all VCs.
> > That looks like a better solution.
>
> I tried this, but
> 1) vhangup doesn't seem to close file descriptors, so it won't help
> against the exploit

Yes, it does. The permission test was

current->signal->tty == tty

and even if the file descriptor may still be open, after a vhangup
the loadkeys call fails.

> 2) even if it did, the behaviour you described would kill all console
> sessions at once when you terminate one, which is very undesirable

Your definition of desirable is not mine. In all cases it is bad
to put policy in the kernel. Policy belongs in user space.