From mboxrd@z Thu Jan 1 00:00:00 1970 From: Randy Dunlap Subject: Re: [PATCH bpf-next v10 10/10] landlock: Add user and kernel documentation for Landlock Date: Thu, 1 Aug 2019 10:49:05 -0700 Message-ID: <08c94f99-68e0-4866-3eba-28fa71347fca@infradead.org> References: <20190721213116.23476-1-mic@digikod.net> <20190721213116.23476-11-mic@digikod.net> <88e90c22-1b78-c2f2-8823-fa776265361c@infradead.org> <2ced8fc8-79a6-b0fb-70fe-6716fae92aa7@ssi.gouv.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <2ced8fc8-79a6-b0fb-70fe-6716fae92aa7@ssi.gouv.fr> Content-Language: en-US Sender: netdev-owner@vger.kernel.org To: =?UTF-8?Q?Micka=c3=abl_Sala=c3=bcn?= , =?UTF-8?Q?Micka=c3=abl_Sala=c3=bcn?= , linux-kernel@vger.kernel.org Cc: Alexander Viro , Alexei Starovoitov , Andrew Morton , Andy Lutomirski , Arnaldo Carvalho de Melo , Casey Schaufler , Daniel Borkmann , David Drysdale , "David S . Miller" , "Eric W . Biederman" , James Morris , Jann Horn , John Johansen , Jonathan Corbet , Kees Cook , Michael Kerrisk , Paul Moore , Sargun Dhillon , "Serge E . Hallyn" Shuah Khan List-Id: linux-api@vger.kernel.org On 8/1/19 10:03 AM, Mickaël Salaün wrote: >>> +Ptrace restrictions >>> +------------------- >>> + >>> +A landlocked process has less privileges than a non-landlocked process and must >>> +then be subject to additional restrictions when manipulating another process. >>> +To be allowed to use :manpage:`ptrace(2)` and related syscalls on a target >>> +process, a landlocked process must have a subset of the target process programs. >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> Maybe that last statement is correct, but it seems to me that it is missing something. > What about this: > > To be allowed to trace a process (using :manpage:`ptrace(2)`), a > landlocked tracer process must only be constrained by a subset (possibly > empty) of the Landlock programs which are also applied to the tracee. > This ensure that the tracer has less or the same constraints than the ensures > tracee, hence protecting against privilege escalation. Yes, better. Thanks. -- ~Randy