Re: [kernel-hardening] Re: [PATCH v7 2/2] security: tty: make TIOCSTI ioctl require CAP_SYS_ADMIN
From: Nick Kralevich
Date: Fri Jun 02 2017 - 16:12:04 EST
On Fri, Jun 2, 2017 at 1:05 PM, Alan Cox <gnomes@xxxxxxxxxxxxxxxxxxx> wrote:
> So I'd say it's all the generic tty ioctls except TIOCSTI and TIOCSETD
> but it would be good to see what Android is going with and why.
Android limits tty ioctls to the following whitelist:
TIOCOUTQ
FIOCLEX
TCGETS
TCSETS
TIOCGWINSZ
TIOCSWINSZ
TIOCSCTTY
TCSETSW
TCFLSH
TIOCSPGRP
TIOCGPGRP
See unpriv_tty_ioctls at
https://android.googlesource.com/platform/system/sepolicy/+/34b4b73729b288b4109b2225c1445eb58393b8cb/public/ioctl_macros#51
--
Nick Kralevich | Android Security | nnk@xxxxxxxxxx | 650.214.4037