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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00E95C54EE9 for ; Wed, 7 Sep 2022 17:23:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229656AbiIGRXl (ORCPT ); Wed, 7 Sep 2022 13:23:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229582AbiIGRXk (ORCPT ); Wed, 7 Sep 2022 13:23:40 -0400 Received: from smtp-relay-canonical-1.canonical.com (smtp-relay-canonical-1.canonical.com [185.125.188.121]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 640A4B0B2F; Wed, 7 Sep 2022 10:23:39 -0700 (PDT) Received: from [192.168.192.83] (unknown [50.126.114.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id DC0E33F1D5; Wed, 7 Sep 2022 17:23:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1662571417; bh=Drsg09FXSwuquW2KA6ZZVoOFL/4wi6EDyR6M1i6FBco=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Bc8a2cBz67R4G75yW4uIKynqxSS1qrjR7Du/a9OZAJPBgrYvbAA4lcolPz4BDtDQH FTfUrOLav0NHdHQXfcFLL2ZqOTahIIwgwA6aD0f85PlwHaYzuzA87tmxHe+gbpGFV2 8b9y1dZUhBDQwyvRPAlMtYtb3JlOXBKDS/in3a0mvj3hQO6vFxTAfV+i7LEp94MjXO n8NhnXGgj17A0gk5S32dXNbgbZyBgYZWZ//2qbH4D12heLZ6InhBnJ8cdf70k5x/7j F30iX3FQUqOUsBKPF8QObKbCSFZLD+zUZwddNT00tIh60uE8a0XN8NHW4jNsFKIo+L QpYvB06dx3xfQ== Message-ID: <65d21148-6a6d-4c4c-aa39-fafc1740ce24@canonical.com> Date: Wed, 7 Sep 2022 10:23:33 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: LSM stacking in next for 6.1? Content-Language: en-US To: Casey Schaufler , Paul Moore Cc: LSM List , James Morris , linux-audit@redhat.com, Mimi Zohar , keescook@chromium.org, SElinux list References: <791e13b5-bebd-12fc-53de-e9a86df23836.ref@schaufler-ca.com> <791e13b5-bebd-12fc-53de-e9a86df23836@schaufler-ca.com> <269014c6-5ce6-3322-5208-004cb1b40792@canonical.com> <1958a0d3-c4fb-0661-b516-93f8955cdb95@schaufler-ca.com> From: John Johansen Organization: Canonical In-Reply-To: <1958a0d3-c4fb-0661-b516-93f8955cdb95@schaufler-ca.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org On 9/7/22 09:41, Casey Schaufler wrote: > On 9/7/2022 7:41 AM, Paul Moore wrote: >> On Tue, Sep 6, 2022 at 8:10 PM John Johansen >> wrote: >>> On 9/6/22 16:24, Paul Moore wrote: >>>> On Fri, Sep 2, 2022 at 7:14 PM Casey Schaufler wrote: >>>>> On 9/2/2022 2:30 PM, Paul Moore wrote: >>>>>> On Tue, Aug 2, 2022 at 8:56 PM Paul Moore wrote: >>>>>>> On Tue, Aug 2, 2022 at 8:01 PM Casey Schaufler wrote: >> .. >> >>>> If you are running AppArmor on the host system and SELinux in a >>>> container you are likely going to have some *very* bizarre behavior as >>>> the SELinux policy you load in the container will apply to the entire >>>> system, including processes which started *before* the SELinux policy >>>> was loaded. While I understand the point you are trying to make, I >>>> don't believe the example you chose is going to work without a lot of >>>> other changes. >>> correct but the reverse does work ... >> Sure, that doesn't surprise me, but that isn't the example Casey brought up. > > I said that I'm not sure how they go about doing Android on Ubuntu. > I brought it up because I've seen it. > LSM stacking for that use case is necessary but insufficient. At a minimum SELinux would need bounding, and realistically some other gymnastics. I don't hold out hope of it happening soon if ever. I have told the anbox people such. At the momement anbox disables SELinux when run in a container https://github.com/anbox/platform_system_core/commit/71907fc5e7833866be6ae3c120c602974edf8322 there has been work on using a VM instead so that they can have SELinux but I am not current on how/when that is used. Where Canonical is interested in LSM stacking is running snaps with apparmor confinement on top of SELinux distros. I know snaps aren't popular but it is a much more realistic and attainable use case for LSM stacking. 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 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1058AC38145 for ; Wed, 7 Sep 2022 17:42:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662572578; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=KAJajdV4cVwxpeigYqPzOB6sVfkHf+PWO3WMolr/OjE=; b=cYeyKKTGf3LTXW91mNnnTUHVvKZKmmLuvq2ALMrkU6tHqV+Li6OJI077efZZ+0Y/25uCHk 34LKty57R3pFBTr62N8xs9evzyAa7O8Wlr8fhZVla51VJLpGj0Lw8T/SKy8+G0Y0FVpGM9 1Cpb/eUt0So+j+4F9/yRtioyZkelQx4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-266-VPYiTol9PCWIJvt4Lt-2QA-1; Wed, 07 Sep 2022 13:42:55 -0400 X-MC-Unique: VPYiTol9PCWIJvt4Lt-2QA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8A8C4101AA45; Wed, 7 Sep 2022 17:42:45 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3D10D40B40CB; Wed, 7 Sep 2022 17:42:43 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 07F901946A5C; Wed, 7 Sep 2022 17:42:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 4707C1946A40 for ; Wed, 7 Sep 2022 17:23:41 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 118EE2166B29; Wed, 7 Sep 2022 17:23:41 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0DC0F2166B26 for ; Wed, 7 Sep 2022 17:23:41 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E7C67101A56C for ; Wed, 7 Sep 2022 17:23:40 +0000 (UTC) Received: from smtp-relay-canonical-1.canonical.com (smtp-relay-canonical-1.canonical.com [185.125.188.121]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-620-ULehqW_aO52ATzZYCb9oQQ-1; Wed, 07 Sep 2022 13:23:39 -0400 X-MC-Unique: ULehqW_aO52ATzZYCb9oQQ-1 Received: from [192.168.192.83] (unknown [50.126.114.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id DC0E33F1D5; Wed, 7 Sep 2022 17:23:35 +0000 (UTC) Message-ID: <65d21148-6a6d-4c4c-aa39-fafc1740ce24@canonical.com> Date: Wed, 7 Sep 2022 10:23:33 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: LSM stacking in next for 6.1? To: Casey Schaufler , Paul Moore References: <791e13b5-bebd-12fc-53de-e9a86df23836.ref@schaufler-ca.com> <791e13b5-bebd-12fc-53de-e9a86df23836@schaufler-ca.com> <269014c6-5ce6-3322-5208-004cb1b40792@canonical.com> <1958a0d3-c4fb-0661-b516-93f8955cdb95@schaufler-ca.com> From: John Johansen Organization: Canonical In-Reply-To: <1958a0d3-c4fb-0661-b516-93f8955cdb95@schaufler-ca.com> X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Mailman-Approved-At: Wed, 07 Sep 2022 17:42:39 +0000 X-BeenThere: linux-audit@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Audit Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: SElinux list , James Morris , Mimi Zohar , LSM List , linux-audit@redhat.com Errors-To: linux-audit-bounces@redhat.com Sender: "Linux-audit" X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" On 9/7/22 09:41, Casey Schaufler wrote: > On 9/7/2022 7:41 AM, Paul Moore wrote: >> On Tue, Sep 6, 2022 at 8:10 PM John Johansen >> wrote: >>> On 9/6/22 16:24, Paul Moore wrote: >>>> On Fri, Sep 2, 2022 at 7:14 PM Casey Schaufler wrote: >>>>> On 9/2/2022 2:30 PM, Paul Moore wrote: >>>>>> On Tue, Aug 2, 2022 at 8:56 PM Paul Moore wrote: >>>>>>> On Tue, Aug 2, 2022 at 8:01 PM Casey Schaufler wrote: >> .. >> >>>> If you are running AppArmor on the host system and SELinux in a >>>> container you are likely going to have some *very* bizarre behavior as >>>> the SELinux policy you load in the container will apply to the entire >>>> system, including processes which started *before* the SELinux policy >>>> was loaded. While I understand the point you are trying to make, I >>>> don't believe the example you chose is going to work without a lot of >>>> other changes. >>> correct but the reverse does work ... >> Sure, that doesn't surprise me, but that isn't the example Casey brought up. > > I said that I'm not sure how they go about doing Android on Ubuntu. > I brought it up because I've seen it. > LSM stacking for that use case is necessary but insufficient. At a minimum SELinux would need bounding, and realistically some other gymnastics. I don't hold out hope of it happening soon if ever. I have told the anbox people such. At the momement anbox disables SELinux when run in a container https://github.com/anbox/platform_system_core/commit/71907fc5e7833866be6ae3c120c602974edf8322 there has been work on using a VM instead so that they can have SELinux but I am not current on how/when that is used. Where Canonical is interested in LSM stacking is running snaps with apparmor confinement on top of SELinux distros. I know snaps aren't popular but it is a much more realistic and attainable use case for LSM stacking. -- Linux-audit mailing list Linux-audit@redhat.com https://listman.redhat.com/mailman/listinfo/linux-audit