Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp965273imm; Fri, 28 Sep 2018 09:35:55 -0700 (PDT) X-Google-Smtp-Source: ACcGV637SOczT7DV8g0LroEq7G99o6eNEjpbh1wvXpFb/GRy+9k8sQu7bHVwE7yWRuy4bgvJPEjq X-Received: by 2002:a17:902:784a:: with SMTP id e10-v6mr17116774pln.197.1538152555156; Fri, 28 Sep 2018 09:35:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538152555; cv=none; d=google.com; s=arc-20160816; b=WcGxKB1AShU3OIX1NRZLugDr/OaHK4/1MrLVEhc+AjTMVbTbKRwf67f9KrpW6tcvue Av5oWFRKq3iVV5X3Bkzr3A48FrL/n+iMxeT7BqI/5uWwCPS2/UfhBKIn5evHqsjBpeFp 975u/XqCnecBuGAKL/ivP7J3kilisqpq4kvYK72mzHsq41Ye00tlHbtbonx/n6WaIbtC tujS9Sg5o34cwKER8NpBZQSnmFygFwRUwH+TJx6XxIOieuJHNwfGozbBFJQ08TCIy4Sz ynHR5vP+qYDH3MYMYtmWeNTr7EM5meRWSMXM58UTOqG9Bcu6/YfwXE3oW8AU/kkCxtG5 7RKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=VChuJjIlhUSn1T2wCymBroUrqwwRZula4EtLjopPhj4=; b=KBHI15W6nO05BmpRCwRgU+76RLonk/P67pRqk0vOvDPKlRxdnpiEvIA7IYJaLVOpMA ZT2huxNXq5sfhToAt/s9Z5eZWpj0Deh883wb29ranDy977a7iyMKsquj29qAvA8Cx0/w ok25TfWtiGsupTNbYUwfwOhtcueSbJgmZMCyueDrfC/16Ihi74oGlgqyHr6pTkEgHFhW v19K1zXQ+VzCWn2p8VjvP4jadfVhsJ//oA0GBM43ELjebKCuKNMNICEeRtRmw1T4C9bW KtJfsHn3TbkQfn/ixJBWgqXyxoLI+WTxIbMgc5PC1wvT3VBYsLgb8jX9X7sz7/cuPGoe 4tMg== 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 e3-v6si3152905pga.369.2018.09.28.09.35.40; Fri, 28 Sep 2018 09:35:55 -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; 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 S1728920AbeI1W6b (ORCPT + 99 others); Fri, 28 Sep 2018 18:58:31 -0400 Received: from namei.org ([65.99.196.166]:34010 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726971AbeI1W6b (ORCPT ); Fri, 28 Sep 2018 18:58:31 -0400 Received: from localhost (localhost [127.0.0.1]) by namei.org (8.14.4/8.14.4) with ESMTP id w8SGXKjQ016354; Fri, 28 Sep 2018 16:33:20 GMT Date: Sat, 29 Sep 2018 02:33:20 +1000 (AEST) From: James Morris To: Jann Horn cc: Casey Schaufler , Casey Schaufler , kristen@linux.intel.com, Kernel Hardening , deneen.t.dock@intel.com, kernel list , Dave Hansen , linux-security-module , selinux@tycho.nsa.gov, Arjan van de Ven Subject: Re: [PATCH v5 5/5] sidechannel: Linux Security Module for sidechannel In-Reply-To: Message-ID: References: <20180926203446.2004-1-casey.schaufler@intel.com> <20180926203446.2004-6-casey.schaufler@intel.com> <025d4742-5947-545e-f603-502a0c5ee03f@schaufler-ca.com> <99FC4B6EFCEFD44486C35F4C281DC67321463CE3@ORSMSX107.amr.corp.intel.com> User-Agent: Alpine 2.21 (LRH 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 28 Sep 2018, Jann Horn wrote: > > so with this hard-coded logic, you are saying this case is > > 'safe' in a sidechannel context. > > > > Which hints at the deeper issue that containers are a userland > > abstraction. Protection of containers needs to be defined by userland > > policy. > > Or just compare mount namespaces additionally/instead. I think that > containers will always use those, because AFAIK nobody uses chroot() > for containers, given that the kernel makes absolutely no security > guarantees about chroot(). We can't define this in the kernel. It has no concept of containers. People utilize some combination of namespaces and cgroups and call them containers, but we can't make assumptions from the kernel on what any of this means from a security point of view, and hard-code kernel policy based on those assumptions. This is violating the principal of separating mechanism and policy, and also imposing semantics across the kernel/user boundary. The latter creates an ABI which we can then never break. -- James Morris