Sandboxed process can send input to terminal

It is possible for a sandboxed process to put characters into the input stream of the terminal using the TIOCSTI ioctl() on the tty's file descriptor. This data may be interpreted by a shell running on the terminal, allowing the sandboxed process to run code with the full authority of the user.

See Debian bug #357561.

This is similar to the security issues in the X Window System (see X11Security).

Workaround

This vulnerability can be avoided by not granting access to /dev/tty (this includes not using the -B option to pola-run), and by proxying access to stdin/stdout/stderr by piping them through cat:

cat | pola-run ... 2>&1 | cat

Possible fixes

Related issues

PlashIssues/TtyVulnerability (last edited 2007-11-26 19:20:54 by MarkSeaborn)