<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/tty/tty_io.c, branch v3.4.98</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/tty/tty_io.c?h=v3.4.98</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/tty/tty_io.c?h=v3.4.98'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-05-08T02:51:53Z</updated>
<entry>
<title>tty: fix up atime/mtime mess, take three</title>
<updated>2013-05-08T02:51:53Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-05-01T14:32:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ce5b62fd947369813666074f725aa0c1d819fc29'/>
<id>urn:sha1:ce5b62fd947369813666074f725aa0c1d819fc29</id>
<content type='text'>
commit b0b885657b6c8ef63a46bc9299b2a7715d19acde upstream.

We first tried to avoid updating atime/mtime entirely (commit
b0de59b5733d: "TTY: do not update atime/mtime on read/write"), and then
limited it to only update it occasionally (commit 37b7f3c76595: "TTY:
fix atime/mtime regression"), but it turns out that this was both
insufficient and overkill.

It was insufficient because we let people attach to the shared ptmx node
to see activity without even reading atime/mtime, and it was overkill
because the "only once a minute" means that you can't really tell an
idle person from an active one with 'w'.

So this tries to fix the problem properly.  It marks the shared ptmx
node as un-notifiable, and it lowers the "only once a minute" to a few
seconds instead - still long enough that you can't time individual
keystrokes, but short enough that you can tell whether somebody is
active or not.

Reported-by: Simon Kirby &lt;sim@hostway.ca&gt;
Acked-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>TTY: fix atime/mtime regression</title>
<updated>2013-05-01T16:41:03Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2013-04-26T11:48:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c61642cce0247175489666d90ebd59f8a04e7c76'/>
<id>urn:sha1:c61642cce0247175489666d90ebd59f8a04e7c76</id>
<content type='text'>
commit 37b7f3c76595e23257f61bd80b223de8658617ee upstream.

In commit b0de59b5733d ("TTY: do not update atime/mtime on read/write")
we removed timestamps from tty inodes to fix a security issue and waited
if something breaks.  Well, 'w', the utility to find out logged users
and their inactivity time broke.  It shows that users are inactive since
the time they logged in.

To revert to the old behaviour while still preventing attackers to
guess the password length, we update the timestamps in one-minute
intervals by this patch.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>TTY: do not update atime/mtime on read/write</title>
<updated>2013-05-01T16:41:03Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2013-02-15T14:25:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3ab8db7b9c2e0a399e65a95999e0794a85c63975'/>
<id>urn:sha1:3ab8db7b9c2e0a399e65a95999e0794a85c63975</id>
<content type='text'>
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 &lt;jslaby@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Remove all #inclusions of asm/system.h</title>
<updated>2012-03-28T17:30:03Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2012-03-28T17:30:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9ffc93f203c18a70623f21950f1dd473c9ec48cd'/>
<id>urn:sha1:9ffc93f203c18a70623f21950f1dd473c9ec48cd</id>
<content type='text'>
Remove all #inclusions of asm/system.h preparatory to splitting and killing
it.  Performed with the following command:

perl -p -i -e 's!^#\s*include\s*&lt;asm/system[.]h&gt;.*\n!!' `grep -Irl '^#\s*include\s*&lt;asm/system[.]h&gt;' *`

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
</entry>
<entry>
<title>TTY: remove tty driver re-set from tty_reopen</title>
<updated>2012-03-08T19:38:50Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2012-03-05T13:51:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ecd166507f4218c9988d005feb04b7215f9df321'/>
<id>urn:sha1:ecd166507f4218c9988d005feb04b7215f9df321</id>
<content type='text'>
This is from tty_reopen:
    struct tty_driver *driver = tty-&gt;driver;
    ...
    tty-&gt;driver = driver;
and it doesn't make sense at all. The driver is intended to be set in
initialize_tty_struct from tty_init_dev (initial open). So this set in
tty_reopen is not needed.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>TTY: simplify tty_driver_lookup_tty a bit</title>
<updated>2012-03-08T19:38:50Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2012-03-05T13:51:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d4834267e81c8f08685e6ee55751551fa60f66e3'/>
<id>urn:sha1:d4834267e81c8f08685e6ee55751551fa60f66e3</id>
<content type='text'>
Remove the useless local variable and return the value itself.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>TTY: let alloc_tty_driver deduce the owner automatically</title>
<updated>2012-03-08T19:30:21Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2012-03-05T13:51:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1a54a76d5171f3ffd89eb69f6f38d535724e3d05'/>
<id>urn:sha1:1a54a76d5171f3ffd89eb69f6f38d535724e3d05</id>
<content type='text'>
Like the rest of the kernel, make a stub from alloc_tty_driver which
calls __alloc_tty_driver with proper owner. This will save us one more
assignment on the driver side.

Also this fixes some drivers which didn't set the owner. This allowed
user to remove the module from the system even though a tty from the
driver is still open.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>TTY: tty_io, remove buffer re-assignments</title>
<updated>2012-03-08T19:30:21Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2012-03-05T13:51:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a8fbc974c347a798fd0c6f0bffe7bf46b8c6dfb6'/>
<id>urn:sha1:a8fbc974c347a798fd0c6f0bffe7bf46b8c6dfb6</id>
<content type='text'>
TTY buffer head and tail are initialized in tty_buffer_init. No need
to do it once again in initialize_tty_struct where tty_buffer_init is
called.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "TTY: get rid of BTM around devpts_*"</title>
<updated>2012-02-24T21:55:54Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2012-02-24T21:55:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0ef1698e4d6282a1665207c40b115ec78fceda9b'/>
<id>urn:sha1:0ef1698e4d6282a1665207c40b115ec78fceda9b</id>
<content type='text'>
This reverts commit d3bda5298aad98c7a27678bdd0dd9d008ab9e685.

Sasha reported that this causes problems, so revert it.

Cc: Sasha Levin &lt;levinsasha928@gmail.com&gt;
Cc: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>TTY: get rid of BTM around devpts_*</title>
<updated>2012-02-02T23:10:46Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2012-01-30T20:14:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d3bda5298aad98c7a27678bdd0dd9d008ab9e685'/>
<id>urn:sha1:d3bda5298aad98c7a27678bdd0dd9d008ab9e685</id>
<content type='text'>
devpts operations are protected by inode mutexes and dentry
refcounting. There is no need to hold BTM.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
