oss-security June 2011 archive
Main Archive Page > Month Archives  > oss-security archives
oss-security: Re: [oss-security] CVE request -- coreutils -- tty

Re: [oss-security] CVE request -- coreutils -- tty hijacking possible in "su" via TIOCSTI ioctl

From: Todd C. Miller <Todd.Miller_at_nospam>
Date: Wed Jun 22 2011 - 14:19:23 GMT
To: Ludwig Nussel <ludwig.nussel@suse.de>

On Wed, 22 Jun 2011 15:41:09 +0200, Ludwig Nussel wrote:

> Newer sudo actually have a use_pty option that fixes the problem.
> It's not enabled by default though.
> As I just found out there's also code missing to make sudo actually
> honor the option in the config (patch attached, CC'd upstream).

Thanks for the patch, it will be part of sudo 1.8.2.

> Introducing similar code in su would be possible but requires some
> programming effort. sudo has a liberal licence though so the code
> could probably be reused.

The level of effort involved depends on whether or not you need job
control to work between the user's tty and the command running in
the pty. Sudo proxies job control signals via an extra process so
that for, e.g. "sudo vi foo", the vi process be suspended by ^Z
even when it is running in a pty. I don't think that people using
"su -c command" have the same expectations so it is probably not
worth the extra effort.

 - todd