Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp5033401imw; Tue, 19 Jul 2022 19:20:08 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v6shAc1p8k3Z8Hwx8kCJfl7/StpN0X1ffTZk3mHpd364X8zCKP07cAQ0vzdl2fbNw4uUfI X-Received: by 2002:a17:90b:4a83:b0:1ef:de4c:65f0 with SMTP id lp3-20020a17090b4a8300b001efde4c65f0mr2691400pjb.149.1658283607987; Tue, 19 Jul 2022 19:20:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658283607; cv=none; d=google.com; s=arc-20160816; b=fZz0762Qklm0aBwNTOXQsQRZTlev8B2lEwOU3K5YZuUD4ZsPlFciJVAnstcby1/Bmd a2QzRio/1EK9rvRjCej2BWZ8P1CWomRpRqBTbrHxJof3Qdh+7Aa+zjN/OXqRvFO8mlQm iLDlE80F++kOSRyCKGSXVLBCvor1unwd84lDxAzqhxsB8k0KMCaz8tt++3x+DtarsGRn bt3VxJnG+QTgK7D20e5peqcG3bZhIcS9bpcq3NE2nKUV2Adc7n15xa8TPyTPMlBG5rWD 3aAJNOtddoyv4+WTGzyMb5DMpfb0A3GBOBjibbVUueP1+p25mVjLSwUtAzpsCbRlYwKl igqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=tQp/N6Uk+UKd7eDu5UmzGuGhmF0Y+ibaoFPpIegLF+Y=; b=N7kRwpby1su1ccGQN+lam9Csn2Ftn2gKX3q3qNSV9DktFU5l4xgyA+UOb8l1UR/0cT jGgpWbh9PwgCOiH8mCrmIlXiLH91s7qjaSXwePgTsLC13scde3rsTfFwCLhM+TR/BvYs NNHMMBiWLqLgLoCY3lsOFjSxjKkcVFkb7TmQUkHUTrhPEdSvL2XWyxbWmvG4NNYJeAAS fdzX8BkFYsMMs2NJtxyprDXSE1n0zD8fBUnnLcMIgO7h6VETt8RI5UcV0br9/xHgaW+Q IFbKnJcnJO9D+VHfWoa55F2upMh6wjIG+NL66GXXK9yosVYpFW2fvIAxv8olUt4ha7Lm 0ClQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore-com.20210112.gappssmtp.com header.s=20210112 header.b="by6T/E8V"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j12-20020a170903024c00b0015848a89d82si23682341plh.107.2022.07.19.19.19.52; Tue, 19 Jul 2022 19:20:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@paul-moore-com.20210112.gappssmtp.com header.s=20210112 header.b="by6T/E8V"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241490AbiGTBlW (ORCPT + 99 others); Tue, 19 Jul 2022 21:41:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241750AbiGTBlE (ORCPT ); Tue, 19 Jul 2022 21:41:04 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FAFD7AC2A for ; Tue, 19 Jul 2022 18:32:44 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id id17so2854622wmb.1 for ; Tue, 19 Jul 2022 18:32:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=tQp/N6Uk+UKd7eDu5UmzGuGhmF0Y+ibaoFPpIegLF+Y=; b=by6T/E8VkX8oFtD8dnsR64IT7UFDcrTPCAIRCgOPa/LJUI8JOCFbfiz7J364/bCOeH rd2SkAx8XnmkmyymE0WIWkYVOzMHAWDtTOM7/pu4iS/Fe00JFXhg564o71FrfrqpBCLX kNQx4x/jPUrpwvMLbAB7FQyDSSJU5xbxfQ3JJ8oycJgKPUTeAw2TRAoGo85orXqi0A8u Xs58+Hntk7L9VAArrtF/7CD3yaGAuk+/qXl0aNv10D0zU/SEvOHRpjy0Q2PZ1bdEhEgl 88w2QZanxV32ADu69Bwbh0ecfaxCfSbzFZyoWEIAXF445J3pol4ru5Qh5EMeLZvIwOIM TLcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=tQp/N6Uk+UKd7eDu5UmzGuGhmF0Y+ibaoFPpIegLF+Y=; b=ejK9DIr4bZIn5lajA8xK4SSVGJj/6qI5NjXW5R/q5SQSFafWk7L+uFNX4SJtGLfBRO XU2lBLp65pPLWmtPes0tGSVWQWdUuscXm9MWUtbD9zFZ32hvOMpUIE/S2OyVDwVm71P8 USpxXxSEdRwxcldpWvewDmNcIIxdKawtdP2ei2CV2zfAS0GocLlcBScz5JasGTZattem XkKo6nty9FHc7Sd8KMAusCPCleOWJ2cmhebe4mDEFdxSF8x66xwj88D09Mnjx6cTN/33 /9aEkbUv5vktA1WyveQzWxxQ5yShnI7jG3TBdxwfb66rxhyXC8jgarKnzKt5v8w4Nv4I OWcw== X-Gm-Message-State: AJIora+bmM/AOXNjc8IB5Y829HY6zIuMgHYVmCEZFv0K+3K+ZILFh+UA 99XgEuY89P1NleezPMTy1+i5U39Ft6wXAkRk9qx7 X-Received: by 2002:a7b:ce8f:0:b0:3a2:ff2d:915f with SMTP id q15-20020a7bce8f000000b003a2ff2d915fmr1512608wmj.165.1658280762556; Tue, 19 Jul 2022 18:32:42 -0700 (PDT) MIME-Version: 1.0 References: <20220707223228.1940249-1-fred@cloudflare.com> <3dbd5b30-f869-b284-1383-309ca6994557@cloudflare.com> <84fbd508-65da-1930-9ed3-f53f16679043@schaufler-ca.com> In-Reply-To: <84fbd508-65da-1930-9ed3-f53f16679043@schaufler-ca.com> From: Paul Moore Date: Tue, 19 Jul 2022 21:32:31 -0400 Message-ID: Subject: Re: [PATCH v2 0/4] Introduce security_create_user_ns() To: Casey Schaufler Cc: Frederick Lawler , =?UTF-8?Q?Christian_G=C3=B6ttsche?= , KP Singh , revest@chromium.org, jackmanb@chromium.org, Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , James Morris , "Serge E. Hallyn" , Stephen Smalley , Eric Paris , shuah@kernel.org, Christian Brauner , "Eric W. Biederman" , bpf@vger.kernel.org, linux-security-module@vger.kernel.org, SElinux list , linux-kselftest@vger.kernel.org, Linux kernel mailing list , netdev@vger.kernel.org, kernel-team@cloudflare.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 8, 2022 at 12:11 PM Casey Schaufler wr= ote: > On 7/8/2022 7:01 AM, Frederick Lawler wrote: > > On 7/8/22 7:10 AM, Christian G=C3=B6ttsche wrote: > >> ,On Fri, 8 Jul 2022 at 00:32, Frederick Lawler > >> wrote: ... > >> Also I think the naming scheme is _. > > > > That's a good call out. I was originally hoping to keep the > > security_*() match with the hook name matched with the caller function > > to keep things all aligned. If no one objects to renaming the hook, I > > can rename the hook for v3. No objection from me. [Sorry for the delay, the last week or two has been pretty busy.] > >> III. > >> > >> Maybe even attach a security context to namespaces so they can be > >> further governed? > > That would likely add confusion to the existing security module namespace > efforts. SELinux, Smack and AppArmor have all developed namespace models. I'm not sure I fully understand what Casey is saying here as SELinux does not yet have an established namespace model to the best of my understanding, but perhaps we are talking about different concepts for the word "namespace"? From a SELinux perspective, if we are going to control access to a namespace beyond simple creation, we would need to assign the namespace a label (inherited from the creating process). Although that would need some discussion among the SELinux folks as this would mean treating a userns as a proper system entity from a policy perspective which is ... interesting. > That, or it could replace the various independent efforts with a single, > unified security module namespace effort. We've talked about this before and I just don't see how that could ever work, the LSM implementations are just too different to do namespacing at the LSM layer. If a LSM is going to namespace themselves, they need the ability to define what that means without having to worry about what other LSMs want to do. -- paul-moore.com