]> git.karo-electronics.de Git - karo-tx-linux.git/commit
TTY: do not update atime/mtime on read/write
authorJiri Slaby <jslaby@suse.cz>
Fri, 15 Feb 2013 14:25:05 +0000 (15:25 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 May 2013 16:41:03 +0000 (09:41 -0700)
commit3ab8db7b9c2e0a399e65a95999e0794a85c63975
tree63b1cbf8ad7016b4a0f6b360da0f18c77762461d
parent6bcd3002a29b597e2774a733b74c204c1b344026
TTY: do not update atime/mtime on read/write

commit b0de59b5733d18b0d1974a060860a8b5c1b36a2e upstream.

On http://vladz.devzero.fr/013_ptmx-timing.php, we can see how to find
out length of a password using timestamps of /dev/ptmx. It is
documented in "Timing Analysis of Keystrokes and Timing Attacks on
SSH". To avoid that problem, do not update time when reading
from/writing to a TTY.

I am afraid of regressions as this is a behavior we have since 0.97
and apps may expect the time to be current, e.g. for monitoring
whether there was a change on the TTY. Now, there is no change. So
this would better have a lot of testing before it goes upstream.

References: CVE-2013-0160

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty_io.c