Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751393AbdGRHCQ (ORCPT ); Tue, 18 Jul 2017 03:02:16 -0400 Received: from namei.org ([65.99.196.166]:39498 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751026AbdGRHCP (ORCPT ); Tue, 18 Jul 2017 03:02:15 -0400 Date: Tue, 18 Jul 2017 17:01:36 +1000 (AEST) From: James Morris To: Stefan Berger cc: "Theodore Ts'o" , "Eric W. Biederman" , "Serge E. Hallyn" , containers@lists.linux-foundation.org, lkp@01.org, linux-kernel@vger.kernel.org, zohar@linux.vnet.ibm.com, tycho@docker.com, James.Bottomley@HansenPartnership.com, vgoyal@redhat.com, christian.brauner@mailbox.org, amir73il@gmail.com, linux-security-module@vger.kernel.org, casey@schaufler-ca.com Subject: Re: [PATCH v2] xattr: Enable security.capability in user namespaces In-Reply-To: <29fdda5e-ed4a-bcda-e3cc-c06ab87973ce@linux.vnet.ibm.com> Message-ID: References: <1499785511-17192-1-git-send-email-stefanb@linux.vnet.ibm.com> <1499785511-17192-2-git-send-email-stefanb@linux.vnet.ibm.com> <87mv89iy7q.fsf@xmission.com> <20170712170346.GA17974@mail.hallyn.com> <877ezdgsey.fsf@xmission.com> <74664cc8-bc3e-75d6-5892-f8934404349f@linux.vnet.ibm.com> <20170713011554.xwmrgkzfwnibvgcu@thunk.org> <87y3rscz9j.fsf@xmission.com> <20170713164012.brj2flnkaaks2oci@thunk.org> <29fdda5e-ed4a-bcda-e3cc-c06ab87973ce@linux.vnet.ibm.com> User-Agent: Alpine 2.20 (LRH 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 550 Lines: 16 On Thu, 13 Jul 2017, Stefan Berger wrote: > A file shared by 2 containers, one mapping root to uid=1000, the other mapping > root to uid=2000, will show these two xattrs on the host (init_user_ns) once > these containers set xattrs on that file. I may be missing something here, but what happens when say the uid=2000 container and associated user is deleted from the system, then another is created with the same uid? Won't this mean that you have unexpected capabilities turning up in the new container? -- James Morris