GNU bug report logs - #24541
runcon tty hijacking via TIOCSTI ioctl

Previous Next

Package: coreutils;

Reported by: up201407890 <at> alunos.dcc.fc.up.pt

Date: Sun, 25 Sep 2016 15:58:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 24541 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: up201407890 <at> alunos.dcc.fc.up.pt, 24541 <at> debbugs.gnu.org,
 SE-Linux <SELinux <at> tycho.nsa.gov>
Subject: Re: bug#24541: runcon tty hijacking via TIOCSTI ioctl
Date: Sun, 25 Sep 2016 11:49:40 -0700
[Message part 1 (text/plain, inline)]
up201407890 <at> alunos.dcc.fc.up.pt wrote re <http://bugs.gnu.org/24541>:
> When executing a program via the runcon utility, the nonpriv session
> can escape to the parent session by using the TIOCSTI ioctl to push
> characters into the terminal's input buffer, allowing an attacker to
> execute arbitrary commands without the SELinux security context.

Thanks for the bug report. Surely this is a bug in the setexeccon system call, 
not in the runcon command that uses the system call. That being said, perhaps 
runcon should work around the bug via something like the attached patch.
[runcon.diff (text/x-diff, attachment)]

This bug report was last modified 7 years and 270 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.