Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3129971imm; Sun, 16 Sep 2018 10:26:25 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ0PE6R/eHKmKRiaGemVwU9x5CpZv8LU3PGakOWLE2sdIubR4NDN9xTBECUIIgCNkjI2txv X-Received: by 2002:a62:46c8:: with SMTP id o69-v6mr22562187pfi.21.1537118785862; Sun, 16 Sep 2018 10:26:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537118785; cv=none; d=google.com; s=arc-20160816; b=NaLx6rgVYPfcAwD+nTJHrjELcO3T0D/f2PzZH6S60mkr08obTm2FjD2GzC41AuE8g8 /fcFofyq0/B5NXDKkx+mmRqPBGZEUltuO+aCMDGOg0NYS+8VNOW5Gw7Y6MGedFdrw9iB 6CrkUwP2s7Jxy65guNZ42j4NdbLgYYrT5lfjZb+0DlMOrwNRug0oQ+2HvyLrTrMJvViG FBGHg0ngQ/29yqfjeGtb519O/JX7aehltJyoxZQg39J+B9m07GpYscNCzDUTntqVATB0 zyC3ZIKfNfDXAuFmD/N/tlrXleyqcNYEte7LgOOBKX1wycU9Gd3/BdO8RyRL6DkbtsO7 J43w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=gXXeJp858zQBIxvfGsMUig+5wkEY0vwOczoj7qU+dQw=; b=0ENeg2IyuZXBbPBd0SwVq57rrsggubUskI6JR4tSMDdhK1IFQo72NJCbJ1VAKOCiNh 7FNSuKFUrHJ/4jIr7DX3gWK6XrbfvOSI3v6qZr0moxNzsmY8mQrhAu2TrtylSau0P5sd mcUGl+VL7UjjGVd+4cq/NzsbfcAbw24OjJxfEg6miACKm+VdEJrgPtexQdoXdPB+F1mR MB8PTuALFyBfitKeJDin4u38076lmY5OzYtK7qZ4fQC0mdKoraf/z4AeDrdsrAmlo0dO B9HL/wMYD2660oYW+MR3e514ExA/3sMr5BIX3TUkl3DRVZMQBvmPPT/BbKa3pMWPf1d4 wvMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yahoo.com header.s=s2048 header.b=BY1G30u1; 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 1-v6si12622630ply.354.2018.09.16.10.25.57; Sun, 16 Sep 2018 10:26:25 -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=pass header.i=@yahoo.com header.s=s2048 header.b=BY1G30u1; 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 S1728320AbeIPWta (ORCPT + 99 others); Sun, 16 Sep 2018 18:49:30 -0400 Received: from sonic306-9.consmr.mail.bf2.yahoo.com ([74.6.132.48]:45982 "EHLO sonic306-9.consmr.mail.bf2.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727808AbeIPWt3 (ORCPT ); Sun, 16 Sep 2018 18:49:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1537118752; bh=gXXeJp858zQBIxvfGsMUig+5wkEY0vwOczoj7qU+dQw=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=BY1G30u1rnTIdFrfqZ4YUCAzIZokobnq5yMunFY6pjXfc8v6xsexMtnfr06YB95IdBtpxtMtWNC3xX49uW5EWrrR36smeWY1HvhFF1Wr4HVLqUv/ympB+BqvhQneiSvF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.eIOBHmaEAmsuu4VoRcMoT4 KztuZPLYgSblBknu1.3t4X5ugduSEa24T1qnO3fDo984FL7NlxgFh6DbODAvZEHsjbTYfLGRv2uZ VtmdaAXTlReh2W8mmcyDc72QZH2Y.s45KOrcmwK6YRu214hnVOeM7dxAQI7Uhm_Hr41ov1rfgQW4 I0ESakGmoJDZKq2IctL83tIIseV53N2CETP2iJyykJADbpk41QsqTN3q2NzM- Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.bf2.yahoo.com with HTTP; Sun, 16 Sep 2018 17:25:52 +0000 Received: from c-67-169-65-224.hsd1.ca.comcast.net (EHLO [192.168.0.102]) ([67.169.65.224]) by smtp419.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 068bd768ccf880d5778dcd9284be01aa; Sun, 16 Sep 2018 17:25:47 +0000 (UTC) Subject: Re: [PATCH v2 00/10] LSM: Module stacking in support of S.A.R.A and Landlock To: Salvatore Mesoraca , James Morris Cc: mic@digikod.net, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, selinux@tycho.nsa.gov, john.johansen@canonical.com, keescook@chromium.org, penguin-kernel@i-love.sakura.ne.jp, paul@paul-moore.com, sds@tycho.nsa.gov, linux-fsdevel@vger.kernel.org, adobriyan@gmail.com, casey.schaufler@intel.com References: From: Casey Schaufler Message-ID: <3cd46663-e566-5ffc-32a4-00a90cd1346e@schaufler-ca.com> Date: Sun, 16 Sep 2018 10:25:43 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/16/2018 9:54 AM, Salvatore Mesoraca wrote: > On Wed, 12 Sep 2018, James Morris wrote: >> Adding the SARA and LandLock authors for review & comment. >> >> Salvatore & Mickaƫl: does this patchset meet your needs for merging to >> mainline? > Since the last time I submitted the patch to the ML, it grew a bit: now it needs > inode's blob stacking (which is already included for Landlock) and > kern_ipc_perm's > blob stacking. > The last one isn't implemented in this patchset, but it isn't > absolutely necessary. > I can merge a version of SARA that doesn't need it and than update it > when possible. > I can provide the same level of protection without using kern_ipc_perm > blob, I'm using it > just to minimize some potential side effects. Adding kern_ipc_perm is easy. As it looks like there will need to be a few revisions I will add it to the next set. > >> On Tue, 11 Sep 2018, Casey Schaufler wrote: >> >>> LSM: Module stacking in support of S.A.R.A and Landlock >>> >>> v2: Reduce the patchset to what is required to support >>> the proposed S.A.R.A. and LandLock security modules >>> >>> The S.A.R.A. security module is intended to be used >>> in conjunction with other security modules. It requires >>> state to be maintained for the credential, which >>> in turn requires a mechanism for sharing the credential >>> security blob. The module also requires mechanism for >>> user space manipulation of the credential information, >>> hence an additional subdirectory in /proc/.../attr. >>> >>> The LandLock security module provides user configurable >>> policy in the secmark mechanism. It requires data in >>> the credential, file and inode security blobs. For this >>> to be used along side the existing "major" security >>> modules mechanism for sharing these blobs is provided. >>> >>> A side effect of providing sharing of the crendential >>> security blob is that the TOMOYO module can be used at >>> the same time as the other "major" modules. >>> >>> The mechanism for configuring which security modules are >>> enabled has to change when stacking in enabled. Any >>> module that uses just the security blobs that are shared >>> can be selected. Additionally, one other "major" module >>> can be selected. >>> >>> The security module stacking issues around networking and >>> IPC are not addressed here as they are beyond what is >>> required for TOMOYO, S.A.R.A and LandLock. >>> >>> git://github.com/cschaufler/lsm-stacking.git#stacking-4.19-rc2-saralock >>> >>> Signed-off-by: Casey Schaufler >>> --- >>> Documentation/admin-guide/LSM/index.rst | 23 ++- >>> fs/proc/base.c | 64 ++++++- >>> fs/proc/internal.h | 1 + >>> include/linux/lsm_hooks.h | 20 ++- >>> include/linux/security.h | 15 +- >>> kernel/cred.c | 13 -- >>> security/Kconfig | 92 ++++++++++ >>> security/apparmor/domain.c | 2 +- >>> security/apparmor/include/cred.h | 24 ++- >>> security/apparmor/include/file.h | 9 +- >>> security/apparmor/include/lib.h | 4 + >>> security/apparmor/lsm.c | 53 ++++-- >>> security/apparmor/task.c | 6 +- >>> security/security.c | 293 ++++++++++++++++++++++++++++++-- >>> security/selinux/hooks.c | 215 ++++++++--------------- >>> security/selinux/include/objsec.h | 37 +++- >>> security/selinux/selinuxfs.c | 5 +- >>> security/selinux/xfrm.c | 4 +- >>> security/smack/smack.h | 42 ++++- >>> security/smack/smack_access.c | 4 +- >>> security/smack/smack_lsm.c | 283 +++++++++++------------------- >>> security/smack/smackfs.c | 18 +- >>> security/tomoyo/common.h | 31 +++- >>> security/tomoyo/domain.c | 4 +- >>> security/tomoyo/securityfs_if.c | 15 +- >>> security/tomoyo/tomoyo.c | 57 +++++-- >>> 26 files changed, 899 insertions(+), 435 deletions(-) >>> >> -- >> James Morris >>