From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.3 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, FREEMAIL_REPLYTO_END_DIGIT,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7E9C7C43441 for ; Fri, 12 Oct 2018 11:31:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3E7E22086A for ; Fri, 12 Oct 2018 11:31:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=protonmail.ch header.i=@protonmail.ch header.b="gh9nXKK1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3E7E22086A Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=protonmail.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-security-module-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728144AbeJLTDU (ORCPT ); Fri, 12 Oct 2018 15:03:20 -0400 Received: from mail-40135.protonmail.ch ([185.70.40.135]:23986 "EHLO mail-40135.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727853AbeJLTDU (ORCPT ); Fri, 12 Oct 2018 15:03:20 -0400 Date: Fri, 12 Oct 2018 11:31:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.ch; s=default; t=1539343877; bh=dk0fdUuD56CSSkiam030Dq9JBhG7YiXUUMwGIy064Bo=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References: Feedback-ID:From; b=gh9nXKK1yq/3x4+Egg67WPIMVZUMgyX25z9W4Ch7+RrsUVcS5DBsXCLBlqfwh3GlK 7vq4vxsuaZ04SmCnm1e7sYqFlXfzxMYzs/5hbLIqkAXrOClG9QCcg9aXsM/Od9hmdv F28OFEFYt7jZVGeBuOyAZZwQiPgTZb9HNPlqI4/Y= To: John Johansen From: Jordan Glover Cc: Kees Cook , James Morris , Casey Schaufler , Stephen Smalley , Paul Moore , Tetsuo Handa , Mimi Zohar , Randy Dunlap , LSM , "open list:DOCUMENTATION" , linux-arch , LKML Reply-To: Jordan Glover Subject: Re: [PATCH security-next v5 00/30] LSM: Explict ordering Message-ID: <_CkJnKYmEZ4ZF0JtsSYuahAd9sgnX9OtcstjXaeqb8wn5uxfimc6S4jomly7If9VqnOXqXwaiCbJ9ttS6NiqE7n6cQUlwLvfO53paLmacvU=@protonmail.ch> In-Reply-To: <38dde301-d77e-35fd-88d4-5cdc5b570ee8@canonical.com> References: <20181011001846.30964-1-keescook@chromium.org> <32stV62RmME8Dj5jKB8Z03zPe_Et72kMo71D8SpgSOHUo6SaROc8DomMWdk5jDGpyqVd8T63NIIK2NdDw95clpF8Uj47Wca2FBFItXDRh7E=@protonmail.ch> <38dde301-d77e-35fd-88d4-5cdc5b570ee8@canonical.com> Feedback-ID: QEdvdaLhFJaqnofhWA-dldGwsuoeDdDw7vz0UPs8r8sanA3bIt8zJdf4aDqYKSy4gJuZ0WvFYJtvq21y6ge_uQ==:Ext:ProtonMail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: Sent with ProtonMail Secure Email. =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original Me= ssage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 On Friday, October 12, 2018 3:19 AM, John Johansen wrote: > > It isn't perfect but it manages consistency across distros as best as > can be achieved atm. > > Its just a fact that some LSMs are not going to be built into some > kernels. The only way to deal with that is direct people to build > their own kernels. > > The other major problem is that the current LSM stacking patches do > not deal with "extreme" stacking. So doing > > lsm=3D+apparmor > > (I am going to stick with the + syntax atm to avoid confusion between > adding and setting) > > assuming apparmor is builtin will not necessarily get you apparmor if > another major lsm is enabled. Yes your specific proposal would as it > specifies it overrides the current major, except that ordering > important so if say landlock registers before apparmor, you may still > not get apparmor. > I think this will be solved with LSM_ORDER_LAST or something like that Kees proposed. > You proposal does not provide a means to ensure you have only a > specific set of LSMs enabled. As an LSM not explicitly listed in lsm=3D > lsm=3D! may still be enabled. So the user is going to have to be aware > of the initial LSMs list if they are trying to guarentee a specific > security arrangement. > What about special marker like "!!" which will mean "this string is explicit? lsm=3D!!,apparmor will enable apparmor and disable everything else. lsm=3D!!,!apparmor or lsm=3D!! will set the string empty and disable everything. "!!" in "CONFIG_LSM" will take precedence over "!!" in "lsm=3D" which will make "lsm=3D" totally ignored. This way distro could lock specific lsm set which isn't possible with current approach. CONFIG_LSM=3D!!,yama,loadpin,integrity,apparmor > This violates one of the hard asks, and I will tell you that this will > just mean there is going to be some distro patching to make sure it > exists. > I think I can quess who will make those patches :) > The current explicit list is more consistent, and it is amenable to > being extended with + or ! as selective add/remove so we are not > locked into only supporting an explicit list. > Jordan