Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp255698ima; Fri, 1 Feb 2019 02:52:15 -0800 (PST) X-Google-Smtp-Source: ALg8bN6apkgGYx70cF/1lV4wshhZfbEq1+dH/8/s7e1aWMRmFc5/OEZej0QCBgpyxeJCWdDOC/as X-Received: by 2002:a17:902:4025:: with SMTP id b34mr39435722pld.181.1549018335443; Fri, 01 Feb 2019 02:52:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549018335; cv=none; d=google.com; s=arc-20160816; b=pGUG9cjXvHBCOv9Q5ib+9NRhp79Feuv8wkpQph7sDI9SlVvl8va3MIfIAoUEg9y2Zg b+VMj6as4Tt+QlLSiPNsSxi+xDC9qfc5o9qT+1FTLD++1frexs8K01ufMF1LCWXCwNSt a0ik+3IfR288xB8fmoqcTA+U0ycNWr8OhyFqUlB+6oo5oqn1BW7hWKXQh8U5Mgdaos08 eks1WZHDfhog9JMCuxKK08O3zfxpOWIDhqwC6t63hWxF/i3zztf2otOGenPr1yY+5XNJ lU/HLkHaiApIW/fqfuIdPnkxH/BfzlgpV56bZwXpCevRN/tOk+ZAUhHV2G3+a7g4gmzC E+BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=2PNRpVTdLN6Dx5TfJoc6n0FURs2N2rTCUidq84xQ/wM=; b=wguHMwYpk/1wXVgjGJcoB26nbGntZJRqbRpOQrk/VuRxvKbg/P4XF7Q2Ec7EKqGeDP 8S7O9sXTz8buJ+0XLaZl5HCOf04rxuK/SPeshx4wCCYk19TRtIbIi+RjaWGJCJ9A+6X+ XQkjahXIghmuitvcMxZOaHzgjSFr0RJH86FaPTRlRaLEW1bR/9vJP80kb3qXI31Z/+fN WdDyxN1tS/zOVCvFw/LXMxNcy1w4RazkIUtTE4IW05dYBAMaVLtn/t1Mbek321AsCHVF e3xnEKHX+YsV1sox/3twowPR3P4YkUgW3S4LeUMh74b9RdXV2uJrNtvKe+d9P/Z5xll9 wpYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=KTfnPHX2; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p10si6889639pgi.549.2019.02.01.02.51.59; Fri, 01 Feb 2019 02:52:15 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=KTfnPHX2; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729891AbfBAKvD (ORCPT + 99 others); Fri, 1 Feb 2019 05:51:03 -0500 Received: from mail-io1-f65.google.com ([209.85.166.65]:44047 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729881AbfBAKvD (ORCPT ); Fri, 1 Feb 2019 05:51:03 -0500 Received: by mail-io1-f65.google.com with SMTP id r200so5282209iod.11 for ; Fri, 01 Feb 2019 02:51:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2PNRpVTdLN6Dx5TfJoc6n0FURs2N2rTCUidq84xQ/wM=; b=KTfnPHX2cKdJ63GqToTDSDq8IWNYGtthHRSjYOB7VZHMpTXCSGBn4hoo4K0M7KUdoU TISmGaloUqUWjxsZZW40v+eyZB0ZpXdEiiHPz9JD6FzmdDhP115sQVtaZenjbouViZwN zpC6wAK9/x0ksSni39JSfw5bgQ8FjfvlD+KWdAc56lLchMggiSJSLoHOyhVr8XBtWBA+ OyzGRHPtk/qzgL3fIH0fp+IwCb5xNFM3ehtwY+2w1RfFODQs6yy7WDsJ8L+2fpd0zNei 1iGpkn83aBJs1xDuDAh76HJhbPSM48p12ChZ/inLdOPK5pr+cnFGlsQSrJ5lexWjZ/j3 3BuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2PNRpVTdLN6Dx5TfJoc6n0FURs2N2rTCUidq84xQ/wM=; b=FRaV+ltj68xovOlZ8g/+tUJZDvr/Uq8Vc/Em7Ehs32RoKgnexS8KioLGNEZVMjqv/8 dHtt7Bx/JMW5lV+BSRvsk5Cr9jp93SWOVeOYZV4F9ON9QhA7VJ8fL/UUnfpXGUO7zITi GeZU+rx1tfq976sqh4WSht1sHAP0Vke7cAa7EmdbQt5Ta7d5/ackyY+IaoLfsW3JXMuT StGkhMdLjl/61A+1wmkEALPe03wdWZOJgPmJ/mFXEelVGsHZOk5NnWH0ntT3stBp3ZeD AqaK6cJVPWkuDWjcjxLou/9NoPBYINuaOqRL2VJ3YDc7OuNwbQZhTufdMT0n/lxtlrvt A80g== X-Gm-Message-State: AHQUAuZJSoqnPVjIMQOHZF+WXUNK85PF7l416bc22O/PMMgSvP2fyPcR dkJMuksjK9qNjOf7qMDJJOE3tGvy38GFFqTAGkoltw== X-Received: by 2002:a5d:8491:: with SMTP id t17mr7898787iom.11.1549018261894; Fri, 01 Feb 2019 02:51:01 -0800 (PST) MIME-Version: 1.0 References: <000000000000c178e305749daba4@google.com> <4b37e892-4d79-aefb-92ab-7753b89b8963@tycho.nsa.gov> <1ea19628-3bbe-2073-d623-824337c15ed6@tycho.nsa.gov> <6c9112a2-33f3-0c29-c944-1d129a0026e7@tycho.nsa.gov> <05340d28-36c2-267e-d54e-416fddfba211@i-love.sakura.ne.jp> <71e3652b-b222-0c3f-8b48-5980ddcaeb93@i-love.sakura.ne.jp> In-Reply-To: <71e3652b-b222-0c3f-8b48-5980ddcaeb93@i-love.sakura.ne.jp> From: Dmitry Vyukov Date: Fri, 1 Feb 2019 11:50:50 +0100 Message-ID: Subject: Re: WARNING in apparmor_secid_to_secctx To: Tetsuo Handa Cc: Casey Schaufler , 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 1, 2019 at 11:44 AM Tetsuo Handa wrote: > > On 2019/02/01 19:09, Dmitry Vyukov wrote: > > Thanks for the explanations. > > > > Here is the change that I've come up with: > > https://github.com/google/syzkaller/commit/aa53be276dc84aa8b3825b3416542447ff82b41a > > You are not going to apply this updated config to upstream kernels now, are you? > Removing CONFIG_DEFAULT_SECURITY="apparmor" from configs used by upstream kernels > will cause failing to enable AppArmor (unless security=apparmor is specified). We do use security=apparmor, see: https://github.com/google/syzkaller/blob/master/dashboard/config/upstream-apparmor.cmdline https://github.com/google/syzkaller/blob/master/dashboard/config/upstream-selinux.cmdline https://github.com/google/syzkaller/blob/master/dashboard/config/upstream-smack.cmdline > I guess you can apply this updated config to linux-next kernels given that > you replace > > CONFIG_LSM="yama,loadpin,safesetid,integrity,selinux,smack,tomoyo,apparmor" > > with > > CONFIG_LSM="yama,loadpin,safesetid,integrity,apparmor,selinux,smack,tomoyo" > > so that AppArmor is enabled instead of SELinux. > > > > > I've disabled CONFIG_SECURITY_TOMOYO_OMIT_USERSPACE_LOADER (it > > actually looked like omitting a user-space loader that I don't have is > > the right thing to do, but okay, it indeed does not with =y). > > > > For now I just enabled TOMOYO and SAFESETID. > > I see the problem with making both linux-next and upstream work. If we > > use a single config and lsm= cmdline argument, then on upstream all > > kernels will use the same module (they won't understand lsm=). But if > > we add security= then it will take precedence over lsm= on linux-next, > > so we won't get stacked modules. > > Right. > > > > > Let's go with (c) because I don't want an additional long-term maintenance cost. > > OK. > > > If I understand it correctly later we will need to replace: > > security=selinux > > security=smack > > security=apparmor > > > > with: > > lsm=yama,safesetid,integrity,selinux,tomoyo > > lsm=yama,safesetid,integrity,smack,tomoyo > > lsm=yama,safesetid,integrity,tomoyo,apparmor > > Yes. Thank you.