From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S940104AbdD3Ess (ORCPT ); Sun, 30 Apr 2017 00:48:48 -0400 Received: from out03.mta.xmission.com ([166.70.13.233]:34053 "EHLO out03.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S940062AbdD3Esh (ORCPT ); Sun, 30 Apr 2017 00:48:37 -0400 From: ebiederm@xmission.com (Eric W. Biederman) To: "Serge E. Hallyn" Cc: Linux Containers , agruenba@redhat.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, oleg@redhat.com, paul@paul-moore.com, viro@zeniv.linux.org.uk, avagin@openvz.org, linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org, mtk.manpages@gmail.com, akpm@linux-foundation.org, luto@amacapital.net, gorcunov@openvz.org, mingo@kernel.org, keescook@chromium.org, Kirill Tkhai References: <149329634856.21195.14196911999722279118.stgit@localhost.localdomain> <87mvb16fv7.fsf@xmission.com> <12a73543-79ea-4bac-7e96-6ab237534af2@virtuozzo.com> <877f254yx0.fsf@xmission.com> <8737crt4dz.fsf@xmission.com> <87vapnrp7f.fsf_-_@xmission.com> <20170429205325.GB1119@mail.hallyn.com> <87a86yseej.fsf@xmission.com> Date: Sat, 29 Apr 2017 23:42:17 -0500 In-Reply-To: <87a86yseej.fsf@xmission.com> (Eric W. Biederman's message of "Sat, 29 Apr 2017 23:33:24 -0500") Message-ID: <8737cqsdzq.fsf@xmission.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1d4gmb-0006LH-DA;;;mid=<8737cqsdzq.fsf@xmission.com>;;;hst=in01.mta.xmission.com;;;ip=67.3.233.227;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1+tjNJZPvIdnfX4wRevqtxSWYIEbWn53hc= X-SA-Exim-Connect-IP: 67.3.233.227 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.7 XMSubLong Long Subject * 0.0 TVD_RCVD_IP Message was received from an IP address * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.4999] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa07 1397; Body=1 Fuz1=1 Fuz2=1] X-Spam-DCC: XMission; sa07 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;"Serge E. Hallyn" X-Spam-Relay-Country: X-Spam-Timing: total 5681 ms - load_scoreonly_sql: 0.04 (0.0%), signal_user_changed: 2.9 (0.1%), b_tie_ro: 1.89 (0.0%), parse: 0.98 (0.0%), extract_message_metadata: 14 (0.2%), get_uri_detail_list: 1.07 (0.0%), tests_pri_-1000: 7 (0.1%), tests_pri_-950: 1.17 (0.0%), tests_pri_-900: 1.01 (0.0%), tests_pri_-400: 18 (0.3%), check_bayes: 17 (0.3%), b_tokenize: 6 (0.1%), b_tok_get_all: 5 (0.1%), b_comp_prob: 1.55 (0.0%), b_tok_touch_all: 2.4 (0.0%), b_finish: 0.63 (0.0%), tests_pri_0: 163 (2.9%), check_dkim_signature: 0.47 (0.0%), check_dkim_adsp: 2.9 (0.1%), tests_pri_500: 5470 (96.3%), poll_dns_idle: 5463 (96.2%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH] userns,pidns: Verify the userns for new pid namespaces X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ebiederm@xmission.com (Eric W. Biederman) writes: > "Serge E. Hallyn" writes: > >> Quoting Eric W. Biederman (ebiederm@xmission.com): >>> >>> It is pointless and confusing to allow a pid namespace hierarchy and >>> the user namespace hierarchy to get out of sync. The owner of a child >>> pid namespace should be the owner of the parent pid namespace or >>> a descendant of the owner of the parent pid namespace. >>> >>> Otherwise it is possible to construct scenarios where it is legal to >>> do something in a parent pid namespace but in a child pid namespace. >> >> Hi, >> >> did you mean 'but not in a child...' above? > > Actually I believe I meant: > >>> Otherwise it is possible to construct scenarios where it is not legal >>> to do something in a parent pid namespace but it is legal a child pid >>> namespace. > > I definitely need to fix that wording thank you. Looking at some more I mean: Otherwise it is possible to construct scenarios where a process has a capability in a over a parent pid namespace but does not have the capability over a child pid namespace. Which confusingly makes permission checks non-transitive. Eric