Re: security / kbd

From: Andries Brouwer
Date: Sat Dec 03 2005 - 16:43:27 EST


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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/