Re: kernel: multiple flaws allowing to sniff keystrokes timings

From: Alan Cox
Date: Wed Nov 09 2011 - 17:52:42 EST


> > 1) show zero fields to unprivileged users (for /proc/interrupts and
> > /proc/stat it is CAP_SYS_ADMIN, for /proc/$PID/{stat,sched,schedstat} it
> > is ptrace_may_access(), for ttys it is uid check) and real values for
> > privileged. The same technique is used in /proc/$PID/sched for eip/esp
> > values.
>
> That makes sense to a point, users will wonder why they aren't seeing
> interrupts anymore, which is a valuable debug tool.

For the interrupts case you don't want show misleading data. It really
has only one use so it's better to change the permissions in the
hardening case. Something distros can already do

> All that is leaking here is the number of keystrokes at most, right?

If even that on USB.

> If we provide a "good" library function for keyboard password usage, we
> could get other applications to use it, but yes, it is a tough issue :(

You can also create noise by rounding off the values a bit. I don't think
it would need much rounding to keep useful data and fuzz, and the
rounding factor can be stuck in sysfs and default to 0.

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