Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4568760imm; Mon, 17 Sep 2018 16:48:34 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbHCsnJRNSeV0IjQXM8PdE5gCaH46oU/Ve707h9h1n4gI+JPlmYymo0plxNpZLQx4xl/ilv X-Received: by 2002:a62:1a8f:: with SMTP id a137-v6mr28134731pfa.190.1537228114703; Mon, 17 Sep 2018 16:48:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537228114; cv=none; d=google.com; s=arc-20160816; b=BCziQBOIfg+ZAkkHL/PwnIi8zZYgmE8rzoKf9ZeLp/KXDy6iTJC0hyEl8sCCnHTLlW iE1hRbi4IJyjgPrLPj3ppBzZvQc5HPaK6f8V6rlBaNIH1JdjhXMoMkPir76WJfFK40GT q1rnbujZY6LGcZPi1Mcf4O/7oP8KmKZ4pk4cetroFQa6ZIPR18fEfPa4WioivU2L/0iv QGtfFo1f3G4n49rW90JiPZ3u4S3zqXtRQHDj3LYURggRYTCE1eaqMiv+zG8AX+HvvxOU +Rd4keXnhMaQ8ZpXRc81Pdox6ML3IAviJV0ZUsNg93jLxza35BGltaV1z3+WccRRUNLI J4KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject; bh=h0q5ycTVDVTb4K3quE0hWFt7QPM94HcSDqaneIAXq5k=; b=hX6KN/ZAv1X7/eLEunSkR+Swp7aHUlPnmEue35wJZu+Sg7N4X+TqQ0Tjl5QXwJK2xD oFLQIElOyepcsCVvDR3t4usHs+geB+jzqzhtQUFkT1o4ai0JIo0lVkdBobmYZ3h7q7d7 X7e/u7w3IEttF9DrDhvc14j7SxY/0ClBNS0z7ElPHXipqcWLgWirj8ZSc//vZ9YsUF9K xQoxvfzXGP/t7CLP2YoCpRQdbJbceTjRieHBv1+Ikl89/C5uyPOI6oqQuSfi3vxKbpsH nBDmplUIgVE1C8DY6QeiVMQdRorcQna57qhIK5X+TjJ1c67IDGd2zgePKD2k1oUSNKqB dDXQ== ARC-Authentication-Results: i=1; mx.google.com; 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 r6-v6si15537769pgp.591.2018.09.17.16.48.18; Mon, 17 Sep 2018 16:48:34 -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; 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 S1727722AbeIRFRx (ORCPT + 99 others); Tue, 18 Sep 2018 01:17:53 -0400 Received: from smtp-sh.infomaniak.ch ([128.65.195.4]:59874 "EHLO smtp-sh.infomaniak.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725849AbeIRFRx (ORCPT ); Tue, 18 Sep 2018 01:17:53 -0400 Received: from smtp7.infomaniak.ch (smtp7.infomaniak.ch [83.166.132.30]) by smtp-sh.infomaniak.ch (8.14.5/8.14.5) with ESMTP id w8HNlAap016240 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 18 Sep 2018 01:47:10 +0200 Received: from ns3096276.ip-94-23-54.eu (ns3096276.ip-94-23-54.eu [94.23.54.103]) (authenticated bits=0) by smtp7.infomaniak.ch (8.14.5/8.14.5) with ESMTP id w8HNl9Vg098442 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Tue, 18 Sep 2018 01:47:09 +0200 Subject: Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering To: Casey Schaufler , Kees Cook Cc: John Johansen , James Morris , Tetsuo Handa , Paul Moore , Stephen Smalley , "Schaufler, Casey" , LSM , LKLM References: <20180916003059.1046-1-keescook@chromium.org> <20180916003059.1046-17-keescook@chromium.org> <84e1a5a8-8997-829f-cf09-1d29895a3f99@schaufler-ca.com> <35b0af5b-e37e-e192-73b5-0d0b37d9e37f@schaufler-ca.com> <8f0bd39b-29a6-325d-4558-d9f484249c22@schaufler-ca.com> <53377892-695f-6336-8574-54c7aa0a4201@schaufler-ca.com> <7ecfffc3-d2a4-3ff7-4bf5-db3029d73c59@canonical.com> <3a90fe88-d74a-2c2c-c949-cabcaad2e1da@schaufler-ca.com> From: =?UTF-8?Q?Micka=c3=abl_Sala=c3=bcn?= Openpgp: preference=signencrypt Autocrypt: addr=mic@digikod.net; prefer-encrypt=mutual; keydata= xsFNBFNUOTgBEAC5HCwtCH/iikbZRDkXUSZa078Fz8H/21oNdzi13NM0ZdeR9KVq28ZCBAud law2P+HhaPFuZLqzRiy+iNOumPgrUyNphLhxWby/JgD7hvhYs5HJgdX0VTwzGqprmAeDKbnS G0Q2zxmnkb1/ENRTfrOIBm5LwyRhWIw5hg+HKh88g6qztDHdVSGqgWGLhj7RqDgHCgC4kAve /tWwfnpmMMndi5V+wg5EanyiffjAq6GHwzWbal+u3lkV8zNo15VZ+6mOY3X6dfYFVeX8hAP4 u6OxzK4dQhDMVnJux5jum8RXtkSASiQpvx80npFbToIMgziWoWPV+Ag3Ti9JsactNzygozjL G0j8nc4dtfdkFoflEqtFIz2ZVWlmvcjbxTbvFpK2TwbVSiXe3Iyn4FIatk8tPsyY+mwKLzsc RNXaOXXB3kza0JmmnOyLCZuCTkds8FHvEG3nMIvyzXiobFM5F2b5Xo5x0fSo2ycIXXWgNJFn X1QXiPEM+emIRH0q2mHNAdvDki/Ns+qmkI4MQjWNGLGzlzb2GJBb5jXmkxEhk0/hUXVK3WYu /jGRQAbyX3XASArcw4RNFW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To: <3a90fe88-d74a-2c2c-c949-cabcaad2e1da@schaufler-ca.com> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="MQD5brET8fBkYBEGoHor5EemXZ3fVhHK8" X-Antivirus: Dr.Web (R) for Unix mail servers drweb plugin ver.6.0.2.8 X-Antivirus-Code: 0x100000 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --MQD5brET8fBkYBEGoHor5EemXZ3fVhHK8 Content-Type: multipart/mixed; boundary="fbmmtKBkvr9TISfPg738SCAuxgPlVPKMb"; protected-headers="v1" From: =?UTF-8?Q?Micka=c3=abl_Sala=c3=bcn?= To: Casey Schaufler , Kees Cook Cc: John Johansen , James Morris , Tetsuo Handa , Paul Moore , Stephen Smalley , "Schaufler, Casey" , LSM , LKLM Message-ID: <968ac661-ad5d-c6e2-1587-971b6dceaaea@digikod.net> Subject: Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering References: <20180916003059.1046-1-keescook@chromium.org> <20180916003059.1046-17-keescook@chromium.org> <84e1a5a8-8997-829f-cf09-1d29895a3f99@schaufler-ca.com> <35b0af5b-e37e-e192-73b5-0d0b37d9e37f@schaufler-ca.com> <8f0bd39b-29a6-325d-4558-d9f484249c22@schaufler-ca.com> <53377892-695f-6336-8574-54c7aa0a4201@schaufler-ca.com> <7ecfffc3-d2a4-3ff7-4bf5-db3029d73c59@canonical.com> <3a90fe88-d74a-2c2c-c949-cabcaad2e1da@schaufler-ca.com> In-Reply-To: <3a90fe88-d74a-2c2c-c949-cabcaad2e1da@schaufler-ca.com> --fbmmtKBkvr9TISfPg738SCAuxgPlVPKMb Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 9/18/18 01:30, Casey Schaufler wrote: > On 9/17/2018 4:20 PM, Kees Cook wrote: >> On Mon, Sep 17, 2018 at 4:10 PM, Micka=C3=ABl Sala=C3=BCn wrote: >>> Landlock, because it target unprivileged users, should only be called= >>> after all other major (access-control) LSMs. The admin or distro must= >>> not be able to change that order in any way. This constraint doesn't >>> apply to current LSMs, though. >=20 > What harm would it cause for Landlock to get called before SELinux? > I certainly see why it seems like it ought to get called after, but > would it really make a difference? If an unprivileged process is able to infer some properties of a file being requested (thanks to one of its eBPF program doing checks on this process accesses), whereas this file access would be denied by a privileged LSM, then there is a side channel attack allowing this process to indirectly get information otherwise inaccessible. In other words, an unprivileged process should not be allowed to sneak itself (via an eBPF program) before SELinux for instance. SELinux should be able to block such information gathering the same way it can block a fstat(2) requested by a process. --fbmmtKBkvr9TISfPg738SCAuxgPlVPKMb-- --MQD5brET8fBkYBEGoHor5EemXZ3fVhHK8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEUysCyY8er9Axt7hqIt7+33O9apUFAlugPPQACgkQIt7+33O9 apW/xwf5AeglZ2k3GwtczcaJhg5xurIyke5PHV9hegMuAQNupTmunAUI3LTppbTK WnPR4i32JUZ3qHhpSDJe9Ul9AaCbG8xtECnw0aGOTL8wJu4IJOzl/xcktDzK1KC4 7VNW6QVdhT4glvP49AwrgExUmr1MXSIHVPSqQH0vaCieEVu3mTws+onHPwx/uqwJ msEtQSBTy1QP0B8IIQFpiJ2pQChhCz+axIcAcPLBLkeoBLfqL0SPilj2MwkgeqMT kTjGZOg4C6npnVkYF91nvos51eDY8sBbD9ygTQkLhTBZEOv9cah+sKKVsPLQvOXO kFIvsnSX0EuYeQ2I2Bfs0RZ6GySZUw== =AcNp -----END PGP SIGNATURE----- --MQD5brET8fBkYBEGoHor5EemXZ3fVhHK8--