Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp177939imj; Fri, 8 Feb 2019 17:41:34 -0800 (PST) X-Google-Smtp-Source: AHgI3IbTd3eGiritvSu6haK4j9gUL655AIXa+VXiABCx9CVUJDGJOq8PfzrMdZWJalpFGJf2mG8/ X-Received: by 2002:a63:b105:: with SMTP id r5mr23458219pgf.442.1549676493959; Fri, 08 Feb 2019 17:41:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549676493; cv=none; d=google.com; s=arc-20160816; b=auNXoNLSLJkAubVP2helbyq84rVuMfoLu4Qx+wliAyneWxmMdFTbXYYAr7UAJp2XAd kHJggYA7lSlYPTl/n4rCBJN02mJOgcfP396MYjQolpTZwPJoBZOaNJW390uFGxJaNE3k XcAxSSCSz1qpx8vShlYhVgZLHqIZUGq4uH+rEYvczm3Ab3e4xOE6JZc15nJkNO8MDptX DyyLYIn/aS+dMD8O6I92NwYyjMFZS8RZjF7H7Frd4ZKz8mQoHuE4vTDTZ77gGpXGI+r1 F/XeROvC45jgwPErsArooahaouC4MwrAYo9iMLJe9dsL/MoWQL4LJV69rF04rnkO/im2 k9Ug== 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:references:cc:to:from:subject; bh=n/emI4EWKrrrGmAgGQtPbA6rP4Y/Xiq8DVpGeZXk5zI=; b=aI3gdCButQhOB+MPbWnWltiYomR8tlF0gvZki2b+kd5XmCJAJXF9pw4kwG7quhTitR 9XBabACF7FB2YfLKg/kpouz4hX0LxeuO9iB31OhggQCIeURS6uGsnfX8J/f3fJh9d7TV VnxSbXG1gdZOUg27ro+cEEJgMFY8yagkJ46S2yXbpsLnQfTsig2udKSTEvcN3m7YSGiN 9A7LMJ8zTtWbny+z1qjvG/Y/TieMJHLlvoXXuv4NuJpbpelPHMKlV4kbEIfKbXfxT42c k176FZgD7sJb7CMSj4Fh2UHeDmE2jWf9BVWNL2+bWYGPdlPzLosThf0a42DW4jxhPD/D oAWQ== 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 v5si3695750pgh.510.2019.02.08.17.41.15; Fri, 08 Feb 2019 17:41:33 -0800 (PST) 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 S1726821AbfBIBlM (ORCPT + 99 others); Fri, 8 Feb 2019 20:41:12 -0500 Received: from www262.sakura.ne.jp ([202.181.97.72]:28770 "EHLO www262.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726522AbfBIBlM (ORCPT ); Fri, 8 Feb 2019 20:41:12 -0500 Received: from fsav101.sakura.ne.jp (fsav101.sakura.ne.jp [27.133.134.228]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id x191eIqT072452; Sat, 9 Feb 2019 10:40:18 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav101.sakura.ne.jp (F-Secure/fsigk_smtp/530/fsav101.sakura.ne.jp); Sat, 09 Feb 2019 10:40:17 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/530/fsav101.sakura.ne.jp) Received: from [192.168.1.8] (softbank126126163036.bbtec.net [126.126.163.36]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id x191eHjT072448 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NO); Sat, 9 Feb 2019 10:40:17 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Subject: Re: [PATCH] LSM: Allow syzbot to ignore security= parameter. From: Tetsuo Handa To: Casey Schaufler , Kees Cook Cc: Dmitry Vyukov , Paul Moore , Stephen Smalley , syzbot , tyhicks@canonical.com, John Johansen , James Morris , LKML , linux-security-module@vger.kernel.org, Serge Hallyn , syzkaller-bugs , Jeffrey Vander Stoep , SELinux , Russell Coker , Laurent Bigonville , syzkaller , Andrew Morton References: <8f48e1d0-c109-f8a9-ea94-9659b16cae49@i-love.sakura.ne.jp> <0d23d1a5-d4af-debf-6b5f-aaaf698daaa8@schaufler-ca.com> <201902070230.x172UUG6002087@www262.sakura.ne.jp> <6def6199-0235-7c37-974c-baf731725606@schaufler-ca.com> <54c0ae39-f35c-bdcd-a217-8e62ef14e41b@i-love.sakura.ne.jp> <54f15845-f256-f503-98ce-64a1b88a5f9f@schaufler-ca.com> <3a775445-c161-f104-ebf6-5fa1c9e9dac8@i-love.sakura.ne.jp> Message-ID: <0dd46edc-d3ee-75ca-5e50-fee70bd83ddb@i-love.sakura.ne.jp> Date: Sat, 9 Feb 2019 10:40:17 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <3a775445-c161-f104-ebf6-5fa1c9e9dac8@i-love.sakura.ne.jp> Content-Type: text/plain; charset=iso-2022-jp Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/02/09 9:28, Tetsuo Handa wrote: > On 2019/02/09 1:23, Casey Schaufler wrote: >> On 2/8/2019 2:52 AM, Tetsuo Handa wrote: >>> To help administrators easily understand what LSM modules are possibly enabled by default (which >>> have to be fetched from e.g. /boot/config-`uname -r`) >> >> $ cat /sys/kernel/security/lsm >> > > /sys/kernel/security/lsm is list of "actually" enabled modules, isn't it? > What I want is "possibly" enabled modules. Ubuntu would chose from either > > (a) explicitly add security=apparmor to kernel command line > > or > > (b) explicitly remove tomoyo from CONFIG_LSM at kernel config > > in order not to enable TOMOYO for those who want to enable only one of > SELinux/Smack/AppArmor. And for those who want to enable TOMOYO, I think > that (b) (in other words, add > > lsm="modules listed in CONFIG_LSM" + ",tomoyo" > > ) will retain compatibility when it becomes possible to enable more than > one of SELinux/Smack/AppArmor at the same time. > > If we can know "possibly" enabled modules from dmesg, users don't need to > look at e.g. /boot/config-`uname -r`. It is not essential, but it's handy. > Well, thinking again, specifying lsm="modules listed in /sys/kernel/security/lsm" + ",tomoyo" makes sense, for there is no need to care about disabled modules when enabling TOMOYO. Therefore, + pr_info("Security Framework initializing: %s\n", order); - pr_info("Security Framework initializing\n"); won't be needed. On 2019/02/09 6:33, Kees Cook wrote: > On Thu, Feb 7, 2019 at 8:24 AM Casey Schaufler wrote: >> I added Kees to the CC list. Kees, what to you think about >> ignoring security= if lsm= is specified? I'm ambivalent. > > This was one of many earlier suggestions, and the consensus seemed to > be "don't mix security= and lsm=". Why would anyone use both? > Then, can we add this change? + if (chosen_lsm_order) { + if (chosen_major_lsm) { + pr_info("security= is ignored because of lsm=\n"); + chosen_major_lsm = NULL; + } + }