Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7661441ybi; Thu, 1 Aug 2019 11:39:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqySPfO8d8LgmMjpkjrAtQQsz56SiMlHq5FeMmO3JNYpjPv/ZyRR2ivM677hCXjq0Uc3+0Bp X-Received: by 2002:aa7:8502:: with SMTP id v2mr53774466pfn.98.1564684777503; Thu, 01 Aug 2019 11:39:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564684777; cv=none; d=google.com; s=arc-20160816; b=KxtxNcT58HUdZScKMzz7kXiidSo52/Nm7Je/DdkwjdJkxhyqQ7Rdz4p8KNcBjTMCgz FNAI9A59eNiCWT38+RD+xpsL/ERBL72BnesisHXOPfHnYfcqLGrbEk9i4mesy8Xo3MSP 4GB08sf5G5ln7MIYtMSBauWS0YIZ4pcDK8gH8wxSNkPyIgrjgCBr4lPdtiL+2gMyj/5U QwvdgUvRCi/D9lPCjReCPxFmCBAC2wGiTa/ZXPow99UcazbXhvxAYKzjBxbJqGjaaS7O GIczJ5alrih/MVfGIEGKwu9D1Sb4+XAAQthvgMqLOXR/97W7T1Jh6S6VsWO++AHreaIr tqCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=/wQ1T27awT3hqgJbloxgvOfdBCqajpO4xm94w+4G9Do=; b=hmhvrpxk5DquG32SK4H8rA5Id04UWxjVk/7VLJLQbwW7nXG3fBvKqoj5HXPyjj+krp lVi5dxJr8vts4tKGH4PFLEp7XXIv7NqiV4M0A8cd+4a8pukAeO5OVsTkCDCPKYc460TR M77FnfF/tfEUS4yvZ0y9t/TxWVnW35SKEH+3VDh/FtzSARne14u2nm/v6gKBjUpLJFTd eX5aamx9jGy8m1xk7ULl2vFzweOcOtPzF331nCystWSofsa+oeOUD6faxhqV6DNE+YF7 hGn1lvnSbUyV2uii2HZhtO7kZk5+pQRpTSErxv1vBlbkaRR03OOqBeLzBBHLmgwXVOY5 bGBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=w0gH11WS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g191si35991154pgc.331.2019.08.01.11.39.21; Thu, 01 Aug 2019 11:39:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=w0gH11WS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387807AbfHARt3 (ORCPT + 99 others); Thu, 1 Aug 2019 13:49:29 -0400 Received: from merlin.infradead.org ([205.233.59.134]:53746 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727899AbfHARt3 (ORCPT ); Thu, 1 Aug 2019 13:49:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=/wQ1T27awT3hqgJbloxgvOfdBCqajpO4xm94w+4G9Do=; b=w0gH11WScMc6U6c0/193f4lVGY pJ5Va3+tj/TSEWluBZbB3EsZdE+5fi40Hd7sR4n8NRx+T69RBSZmHZ/UoJHMHoQqhP0bN7L7xwpnd PnyuEOEWkSHWMDK4bwLVQOrsAZuYdJkbpUohRpAB/vTiDgEeNENBjcpfppf159WsUPFbRzRBYdiS2 B4yBu2ZX/XwmYyMam1kq+dPc+qgHtzng5hOraEFbZeQWxzCZ5ytD4CBej0CrS8EFW10k3lit3r5ul 1VLKt68FO3Nz279TNa/NMYzQtnkvCu2SBByGuhcqnupvhyqUPFTBrEug8bQuR/lE/4Arfluds3QCk VKAOrv0w==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=[192.168.1.17]) by merlin.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1htFCR-0000Yn-NH; Thu, 01 Aug 2019 17:49:11 +0000 Subject: Re: [PATCH bpf-next v10 10/10] landlock: Add user and kernel documentation for Landlock 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 , Stephen Smalley , Tejun Heo , Tetsuo Handa , Thomas Graf , Tycho Andersen , Will Drewry , kernel-hardening@lists.openwall.com, linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-security-module@vger.kernel.org, netdev@vger.kernel.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> From: Randy Dunlap Message-ID: <08c94f99-68e0-4866-3eba-28fa71347fca@infradead.org> Date: Thu, 1 Aug 2019 10:49:05 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <2ced8fc8-79a6-b0fb-70fe-6716fae92aa7@ssi.gouv.fr> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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