Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3201400pxu; Sun, 11 Oct 2020 00:44:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPTFY7U+DRSU7L2j0i1wZ1R1s1Odn+9vPPEBEgOSREqnqFHwIjJ706wQxc6hIrJt8KQC0v X-Received: by 2002:aa7:c7d9:: with SMTP id o25mr8280354eds.318.1602402250663; Sun, 11 Oct 2020 00:44:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602402250; cv=none; d=google.com; s=arc-20160816; b=vyg3ZmBx+nkVFCZe7pv3OjvnnmyfCWFHfGYAupFmvZH25mCg1BKQN/lz8aV3464Q76 yU7DutP5nFaIDt5sifxydiHUGgGsshhCNEQPOKP16RwSAewqNN9bn5kwgPXKfpWau051 n8ekdjbAD4qir0gw4UlaGMszC7qiMKrGPVUHYzWZhUK7U0zZeGO3IAhc19NcZ4Qh9oA+ mHoam8B9SKDqrrBkt53dpLV7aw1ol1XB1h4wZ7xXjl2vB9BYC6TXNuHQZqnSz9hXFn64 cdEivu5J47FQkQQQL8LrD/niYpxwKFy7WsoxslzI48HBrDN/Y20i/yWXzKYKxKkEifQV UFFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=SP09lW1f7F9D7hEiDqC2+nTFwiJ4d8U+IXnfTiOP+hE=; b=vO0RcrIIL25D/5mLQl2dSBlHb47+hMMmkTp7TrgMFsSlV8+LhR5NVI30aUrHELxB5Z fYmumq2WJh+dWyvUu0sJXyx4qCrYK0icsRe1/ajmByafJQKd8VNZs9VhMcY4ON3ZYhos O3neGYb0DjzvQLAB4HoaVGhUPV5wG8lF1+nyUB9pfVjIE03RpNnMbT6EyKYnSstYo5aw S7tJQQnQIcCNppldShgrUsplQZB1eo2K9APA2K4wKEYpzb0Oz8Y7UK+L40q7VP4UXkZM I+pc7a66ppnjbo4T+eFVYd2yyn5qY+OBeuU0ltIAQCQCmq/6Kl+8okeBrI8U/AFuVBgO VTSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g9si9861148edr.404.2020.10.11.00.43.48; Sun, 11 Oct 2020 00:44:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726334AbgJJEeu (ORCPT + 99 others); Sat, 10 Oct 2020 00:34:50 -0400 Received: from mail.hallyn.com ([178.63.66.53]:48294 "EHLO mail.hallyn.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725844AbgJJEeG (ORCPT ); Sat, 10 Oct 2020 00:34:06 -0400 X-Greylist: delayed 473 seconds by postgrey-1.27 at vger.kernel.org; Sat, 10 Oct 2020 00:34:06 EDT Received: by mail.hallyn.com (Postfix, from userid 1001) id 9A31682C; Fri, 9 Oct 2020 23:26:06 -0500 (CDT) Date: Fri, 9 Oct 2020 23:26:06 -0500 From: "Serge E. Hallyn" To: Christian Brauner Cc: containers@lists.linux-foundation.org, Alexander Mihalicyn , Mrunal Patel , Wat Lim , Aleksa Sarai , Pavel Tikhomirov , Geoffrey Thomas , "Eric W. Biederman" , Joseph Christopher Sible , =?iso-8859-1?Q?Micka=EBl_Sala=FCn?= , Vivek Goyal , Giuseppe Scrivano , Andy Lutomirski , Stephane Graber , Kees Cook , Sargun Dhillon , Josh Triplett , linux-kernel@vger.kernel.org Subject: Re: LPC 2020 Hackroom Session: summary and next steps for isolated user namespaces Message-ID: <20201010042606.GA30062@mail.hallyn.com> References: <20200830143959.rhosiunyz5yqbr35@wittgenstein> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200830143959.rhosiunyz5yqbr35@wittgenstein> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 3. Find a way to allow setgroups() in a user namespace while keeping > in mind the case of groups used for negative access control. > This was suggested by Josh Triplett and Geoffrey Thomas. Their idea was to > investigate adding a prctl() to allow setgroups() to be called in a user > namespace at the cost of restricting paths to the most restrictive > permission. So if something is 0707 it needs to be treated as if it's 0000 > even though the caller is not in its owning group which is used for negative > access control (how these new semantics will interact with ACLs will also > need to be looked into). I should probably think this through more, but for this problem, would it not suffice to add a new prevgroups grouplist to the struct cred, maybe struct group_info *locked_groups, and every time an unprivileged task creates a new user namespace, add all its current groups to this list?