Shouldn't the ioctl KDSKBMODE only be usable by root?

From: Stefan Gast
Date: Fri Apr 28 2006 - 07:42:37 EST


Hi,

I'm a bit confused about the fact that everyone who has access to a virtual
console can stop the keyboard from working by using the KDSKBMODE ioctl:

ioctl(fd_to_console_or_tty, KDSKBMODE, K_RAW);

This is a problem because console switching via alt+fx is no longer possible
when the keyboard is in raw mode.

Why is everyone permitted to change the keyboard mode? I guess it is because
of the unicode support, but couldn't a modified unicode_start script be
called by root while running some init script?

The loadkeys (KDSKBENT) and setkeycodes (KDSETKEYCODE) programs fail because
of permisson problems when they are called by a non-privileged user. I
think that's correct, but an unprivileged user should not be able to make
the system unusable by using KDSKBMODE.

Stefan
-
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/