Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181127111148.75746f02@lwn.net>
Date: Tue, 27 Nov 2018 11:11:48 -0700
From: Jonathan Corbet <corbet@....net>
To: Alexey Budankov <alexey.budankov@...ux.intel.com>
Cc: Thomas Gleixner <tglx@...utronix.de>, Kees Cook <keescook@...omium.org>,
 Jann Horn <jannh@...gle.com>, Ingo Molnar <mingo@...hat.com>, Peter
 Zijlstra <peterz@...radead.org>, Andi Kleen <ak@...ux.intel.com>, Alexander
 Shishkin <alexander.shishkin@...ux.intel.com>, Jiri Olsa
 <jolsa@...hat.com>, Arnaldo Carvalho de Melo <acme@...nel.org>, Mark
 Rutland <mark.rutland@....com>, Tvrtko Ursulin <tursulin@...ulin.net>,
 linux-kernel <linux-kernel@...r.kernel.org>,
 "kernel-hardening@...ts.openwall.com"
 <kernel-hardening@...ts.openwall.com>, "linux-doc@...r.kernel.org"
 <linux-doc@...r.kernel.org>
Subject: Re: [PATCH v4 1/2] Documentation/admin-guide: introduce
 perf-security.rst file

On Tue, 27 Nov 2018 11:15:37 +0300
Alexey Budankov <alexey.budankov@...ux.intel.com> wrote:

> +To perform security checks, the Linux implementation splits processes into two
> +categories [6]_ : a) privileged processes (whose effective user ID is 0, referred
> +to as superuser or root), and b) unprivileged processes (whose effective UID is
> +nonzero). Privileged processes bypass all kernel security permission checks so
> +perf_events performance monitoring is fully available to privileged processes
> +without access, scope and resource restrictions.
> +
> +Unprivileged processes are subject to a full security permission check based on
> +the process's credentials [5]_ (usually: effective UID, effective GID, and
> +supplementary group list).
> +
> +Linux divides the privileges traditionally associated with superuser into
> +distinct units, known as capabilities [6]_ , which can be independently enabled
> +and disabled on per-thread basis for processes and files of unprivileged users.
> +
> +Unprivileged processes with enabled CAP_SYS_ADMIN capability are treated as
> +privileged processes with respect to perf_events performance monitoring and
> +bypass *scope* permissions checks in the kernel.
> +
> +Unprivileged processes using perf_events system call API is also subject for
> +PTRACE_MODE_READ_REALCREDS ptrace access mode check [7]_ , whose outcome
> +determines whether monitoring is permitted. So unprivileged processes provided
> +with CAP_SYS_PTRACE capability are effectively permitted to pass the check.

It's good to have more information here.  I could certainly quibble
further with things - a process with CAP_SYS_ADMIN is not "unprivileged"!
- but I don't want to stand in the way of this any further.  I *would*
still like to see an ack from the perf world, though.

With regard to Kees's comment on merging the two patches; I would probably
add the new document to index.rst in the same patch, but it doesn't matter
that much.  Not worth redoing the patch just for that.

jon

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.