Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1425284

Re: [kernel-hardening] [PATCH 2/2] security,perf: Allow further restriction of perf_event_open

From Daniel Micay <danielmicay@gmail.com>
Newsgroups linux.kernel
Subject Re: [kernel-hardening] [PATCH 2/2] security,perf: Allow further restriction of perf_event_open
Date 2016-06-17 18:20 +0200
Message-ID <rL4EV-my-1@gated-at.bofh.it> (permalink)
References (1 earlier) <qPMzU-4ae-17@gated-at.bofh.it> <rnvGh-3Tg-9@gated-at.bofh.it> <rKNXs-5C7-23@gated-at.bofh.it> <rKNXs-5C7-21@gated-at.bofh.it> <rKVUZ-372-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Fri, 2016-06-17 at 08:54 +0200, Peter Zijlstra wrote:
> On Thu, Jun 16, 2016 at 03:27:55PM -0700, Kees Cook wrote:
> > Hi guys,
> > 
> > This patch wasn't originally CCed to you (I'm fixing that now).
> > Would
> > you consider taking this into the perf tree? 
> 
> No.
> 
> > It's been in active use
> > in both Debian and Android for a while now.
> 
> Very nice of you all to finally inform us I suppose :/

It was in Debian a lot longer than Android, although the Android feature
came from a downstream variant where it was done much earlier:

https://android-review.googlesource.com/#/c/233736/

> > > > > 
> > > > > access to performance events by users without CAP_SYS_ADMIN.
> > > > > Add a Kconfig symbol CONFIG_SECURITY_PERF_EVENTS_RESTRICT that
> > > > > makes this value the default.
> > > > > 
> > > > > This is based on a similar feature in grsecurity
> > > > > (CONFIG_GRKERNSEC_PERF_HARDEN).  This version doesn't include
> > > > > making
> > > > > the variable read-only.  It also allows enabling further
> > > > > restriction
> > > > > at run-time regardless of whether the default is changed.
> 
> This Changelog is completely devoid of information. _WHY_ are you
> doing
> this?

Attack surface reduction. It's possible to use seccomp-bpf for some
limited cases, but it's not flexible enough. There are lots of
information leaks and local privilege escalation vulnerabilities via
perf events, yet on most Linux installs it's not ever being used. So
turning it off by default on those installs is an easy win. The holes
are reduced to root -> kernel (and that's not a meaningful boundary in
mainline right now - although as is the case here, Debian has a bunch of
securelevel patches for that).

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [kernel-hardening] [PATCH 2/2] security,perf: Allow further  restriction of perf_event_open Kees Cook <keescook@chromium.org> - 2016-06-17 00:30 +0200
  Re: [kernel-hardening] [PATCH 2/2] security,perf: Allow further  restriction of perf_event_open Peter Zijlstra <peterz@infradead.org> - 2016-06-17 09:00 +0200
    Re: [kernel-hardening] [PATCH 2/2] security,perf: Allow further  restriction of perf_event_open Daniel Micay <danielmicay@gmail.com> - 2016-06-17 18:20 +0200
      Re: [kernel-hardening] [PATCH 2/2] security,perf: Allow further  restriction of perf_event_open Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-06-17 22:10 +0200
        Re: [kernel-hardening] [PATCH 2/2] security,perf: Allow further  restriction of perf_event_open Daniel Micay <danielmicay@gmail.com> - 2016-06-18 03:00 +0200

csiph-web