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 X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 986D0C433DF for ; Sat, 10 Oct 2020 04:35:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 58A1A21D46 for ; Sat, 10 Oct 2020 04:35:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726486AbgJJEfO (ORCPT ); Sat, 10 Oct 2020 00:35:14 -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?