Received: by 10.223.164.197 with SMTP id h5csp505337wrb; Sat, 4 Nov 2017 16:56:09 -0700 (PDT) X-Google-Smtp-Source: ABhQp+SqWWgJx3AZg1Nx1FCS6twO7un27nWWDJ0UlRMtyO2K61gpEl1Qzhs6vP8VYqSwYcM55YeA X-Received: by 10.159.255.70 with SMTP id u6mr10782394pls.41.1509839769631; Sat, 04 Nov 2017 16:56:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509839769; cv=none; d=google.com; s=arc-20160816; b=mHIP1Qjn7hTcUjkzrqpfRN93XJ2GWAVJkzEGW7TAWO7nz79zXUHU2gHrFqMQ/SWQJu jH6ls5jw4LEDMdRyDgIADPPklh2DAuyYGBtaoUMsqsY8jFCF4dBlVh2hBWK1PGwWQ1Qu 0Dwmw9u8DkAhuMver+03w5smBXC1yQxJFMghMKtvBux+olRy3Pg5OE0YMs95upPOBgul Zx/5jwzagg8JHFDGS26yos+HITSRDlLDZMCW3zyoiBGPWlJ6RxufsgYt3QCVCvIvCsqn lCHT7hS4CAJnpmFEV5PF+Hny8rdFOqCV7Lt9P3khU2LssHV1E3igE47OL+sKtloThmPe gd8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=kPi0srRN5mdZBKcJokMMRwd3+ubfYHOxJQdejPZRU1U=; b=cIMUR2ZxXDGkd5PEUgKj5SwarLC2rEYRcKm1DwSiCH7Ll10P51/SxXIp6rvtYqyrVT GzP2QaPSis6mR5J5gpV7ZMwSjSSUbEIfbxt/A7IhT6AHnfHRfeC3wmNZpnIog8Drl05B PAB4lWnVzTUAfxY/1x14BZJxR/NGa4SG9o2sR+d7kEbFGtg7NQBTiI7r9A6Voh+G4qoT 0YxEgZKgVVZe7OCBBJa1eYNGP7PQPajtwM/h1OGfROl4+nlKpfyi5exfxgW60J4JopSg GuJ/CguqUheIHLAuINyLpug/gEtWO2fSrt4F0mjy12gBccgnG5NFgVN8u7ZI5wQN2JYO pvXQ== 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 o5si1447231plh.660.2017.11.04.16.55.27; Sat, 04 Nov 2017 16:56:09 -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 S1752394AbdKDXxt (ORCPT + 94 others); Sat, 4 Nov 2017 19:53:49 -0400 Received: from h2.hallyn.com ([78.46.35.8]:34914 "EHLO h2.hallyn.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751700AbdKDXxs (ORCPT ); Sat, 4 Nov 2017 19:53:48 -0400 Received: by h2.hallyn.com (Postfix, from userid 1001) id 900DD120481; Sat, 4 Nov 2017 18:53:46 -0500 (CDT) Date: Sat, 4 Nov 2017 18:53:46 -0500 From: "Serge E. Hallyn" To: Mahesh Bandewar Cc: LKML , Netdev , Kernel-hardening , Linux API , Kees Cook , Serge Hallyn , "Eric W . Biederman" , Eric Dumazet , David Miller , Mahesh Bandewar Subject: Re: [PATCH resend 2/2] userns: control capabilities of some user namespaces Message-ID: <20171104235346.GA17170@mail.hallyn.com> References: <20171103004436.40026-1-mahesh@bandewar.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171103004436.40026-1-mahesh@bandewar.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Mahesh Bandewar (mahesh@bandewar.net): > Init-user-ns is always uncontrolled and a process that has SYS_ADMIN > that belongs to uncontrolled user-ns can create another (child) user- > namespace that is uncontrolled. Any other process (that either does > not have SYS_ADMIN or belongs to a controlled user-ns) can only > create a user-ns that is controlled. That's a huge change though. It means that any system that previously used unprivileged containers will need new privileged code (which always risks more privilege leaks through the new code) to re-enable what was possible without privilege before. That's a regression. I'm very much interested in what you want to do, But it seems like it would be worth starting with some automated code analysis that shows exactly what code becomes accessible to unprivileged users with user namespaces which was accessible to unprivileged users before. Then we can reason about classifying that code and perhaps limiting access to some of it. From 1583003759650790753@xxx Fri Nov 03 00:47:08 +0000 2017 X-GM-THRID: 1583003759650790753 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread