Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1642580
| From | Kees Cook <keescook@chromium.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v6 0/2] security: tty: make TIOCSTI ioctl require CAP_SYS_ADMIN |
| Date | 2017-05-16 16:30 +0200 |
| Message-ID | <tHLE5-6Kq-7@gated-at.bofh.it> (permalink) |
| References | (3 earlier) <tHvfX-4zw-5@gated-at.bofh.it> <tHxrr-6b0-9@gated-at.bofh.it> <tHC7L-GS-1@gated-at.bofh.it> <tHGEq-3GY-23@gated-at.bofh.it> <tHJM0-5yL-71@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, May 16, 2017 at 5:22 AM, Matt Brown <matt@nmatt.com> wrote: > On 05/16/2017 05:01 AM, Peter Dolding wrote: >>> >>> >>> I could see a case being make for CAP_SYS_TTY_CONFIG. However I still >>> choose to do with CAP_SYS_ADMIN because it is already in use in the >>> TIOCSTI ioctl. >>> >> Matt Brown don't give me existing behaviour. CAP_SYS_ADMIN is >> overload. The documentation tells you that you are not to expand it >> and you openly admit you have. >> > > This is not true that I'm openly going against what the documentation > instructs. The part of the email chain where I show this got removed > somehow. Again I will refer to the capabilities man page that you > quoted. > > From http://man7.org/linux/man-pages/man7/capabilities.7.html > > "Don't choose CAP_SYS_ADMIN if you can possibly avoid it! > ... > The only new features that should be associated with CAP_SYS_ADMIN are > ones that closely match existing uses in that silo." > > My feature affects the TIOCSTI ioctl. The TIOCSTI ioctl already falls > under CAP_SYS_ADMIN, therefore I actually *am* following the > documentation. CAP_SYS_ADMIN is the right choice here, I agree with Matt: it is already in use for TIOCSTI. We can't trivially add new capabilities flags (see the various giant threads debating this, the most recently that I remember from the kernel lock-down series related to Secure Boot). >> I fact this usage of TIOCSTI I personally think should require two >> capabilities flags set. CAP_SYS_ADMIN section left as it is at this >> stage. With TIOSCTI stuck behind another capability. >> >> If you had added a new capability flag you could set file capabilities >> on any of the old applications depending on the now secured behaviour. If we're adjusting applications, they should be made to avoid TIOSCTI completely. This looks to me a lot like the symlink restrictions: yes, userspace should be fixed to the do the right thing, but why not provide support to userspace to avoid the problem entirely? -Kees -- Kees Cook Pixel Security
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v6 0/2] security: tty: make TIOCSTI ioctl require CAP_SYS_ADMIN Matt Brown <matt@nmatt.com> - 2017-05-13 22:00 +0200
Re: [PATCH v6 0/2] security: tty: make TIOCSTI ioctl require CAP_SYS_ADMIN Alan Cox <gnomes@lxorguk.ukuu.org.uk> - 2017-05-15 23:00 +0200
Re: [PATCH v6 0/2] security: tty: make TIOCSTI ioctl require CAP_SYS_ADMIN Peter Dolding <oiaohm@gmail.com> - 2017-05-16 01:20 +0200
Re: [PATCH v6 0/2] security: tty: make TIOCSTI ioctl require CAP_SYS_ADMIN Matt Brown <matt@nmatt.com> - 2017-05-16 06:20 +0200
Re: [PATCH v6 0/2] security: tty: make TIOCSTI ioctl require CAP_SYS_ADMIN Peter Dolding <oiaohm@gmail.com> - 2017-05-16 11:10 +0200
Re: [PATCH v6 0/2] security: tty: make TIOCSTI ioctl require CAP_SYS_ADMIN Matt Brown <matt@nmatt.com> - 2017-05-16 14:30 +0200
Re: [PATCH v6 0/2] security: tty: make TIOCSTI ioctl require CAP_SYS_ADMIN Kees Cook <keescook@chromium.org> - 2017-05-16 16:30 +0200
Re: [kernel-hardening] Re: [PATCH v6 0/2] security: tty: make TIOCSTI ioctl require CAP_SYS_ADMIN "Serge E. Hallyn" <serge@hallyn.com> - 2017-05-16 17:50 +0200
Re: [kernel-hardening] Re: [PATCH v6 0/2] security: tty: make TIOCSTI ioctl require CAP_SYS_ADMIN Peter Dolding <oiaohm@gmail.com> - 2017-05-17 00:10 +0200
Re: [PATCH v6 0/2] security: tty: make TIOCSTI ioctl require CAP_SYS_ADMIN Peter Dolding <oiaohm@gmail.com> - 2017-05-16 23:50 +0200
Re: [PATCH v6 0/2] security: tty: make TIOCSTI ioctl require CAP_SYS_ADMIN Matt Brown <matt@nmatt.com> - 2017-05-17 00:00 +0200
Re: [PATCH v6 0/2] security: tty: make TIOCSTI ioctl require CAP_SYS_ADMIN Alan Cox <gnomes@lxorguk.ukuu.org.uk> - 2017-05-17 18:50 +0200
Re: [kernel-hardening] Re: [PATCH v6 0/2] security: tty: make TIOCSTI ioctl require CAP_SYS_ADMIN Daniel Micay <danielmicay@gmail.com> - 2017-05-17 20:30 +0200
Re: [kernel-hardening] Re: [PATCH v6 0/2] security: tty: make TIOCSTI ioctl require CAP_SYS_ADMIN Kees Cook <keescook@chromium.org> - 2017-05-18 05:20 +0200
Re: [kernel-hardening] Re: [PATCH v6 0/2] security: tty: make TIOCSTI ioctl require CAP_SYS_ADMIN Peter Dolding <oiaohm@gmail.com> - 2017-05-19 04:50 +0200
Re: [kernel-hardening] Re: [PATCH v6 0/2] security: tty: make TIOCSTI ioctl require CAP_SYS_ADMIN "Serge E. Hallyn" <serge@hallyn.com> - 2017-05-19 16:40 +0200
csiph-web