• Jiri Slaby's avatar
    TTY: do not update atime/mtime on read/write · b0de59b5
    Jiri Slaby authored
    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: default avatarJiri Slaby <jslaby@suse.cz>
    Cc: stable <stable@vger.kernel.org> # after 3.9 is out
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    b0de59b5
tty_io.c 86.7 KB