From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753518AbcGYPbE (ORCPT ); Mon, 25 Jul 2016 11:31:04 -0400 Received: from out02.mta.xmission.com ([166.70.13.232]:51648 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752476AbcGYPaz (ORCPT ); Mon, 25 Jul 2016 11:30:55 -0400 From: ebiederm@xmission.com (Eric W. Biederman) To: "Serge E. Hallyn" Cc: "Michael Kerrisk \(man-pages\)" , Serge Hallyn , Andrew Vagin , Linux API , Linux Containers , LKML , Alexander Viro , "criu\@openvz.org" , linux-fsdevel , James Bottomley , Andrey Vagin References: <1468520419-28220-1-git-send-email-avagin@openvz.org> <20160721210650.GA10989@outlook.office365.com> <1515f5f2-5a49-fcab-61f4-8b627d3ba3e2@gmail.com> <87lh0pg8jx.fsf@x220.int.ebiederm.org> <44ca0e41-dc92-45b1-2a6c-c41a048a072d@gmail.com> <20160725145445.GA19879@mail.hallyn.com> Date: Mon, 25 Jul 2016 10:17:15 -0500 In-Reply-To: <20160725145445.GA19879@mail.hallyn.com> (Serge E. Hallyn's message of "Mon, 25 Jul 2016 09:54:45 -0500") Message-ID: <87y44pd9xg.fsf@x220.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1bRhpm-0003fF-Ay;;;mid=<87y44pd9xg.fsf@x220.int.ebiederm.org>;;;hst=in02.mta.xmission.com;;;ip=67.3.204.119;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1+nybzbyKvXF8K2jf9QPg2mkp3U6R7cJ8g= X-SA-Exim-Connect-IP: 67.3.204.119 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.0 TVD_RCVD_IP Message was received from an IP address * 1.5 XMNoVowels Alpha-numberic number with no vowels * 0.7 XMSubLong Long Subject * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * -0.5 BAYES_05 BODY: Bayes spam probability is 1 to 5% * [score: 0.0276] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa01 1397; Body=1 Fuz1=1 Fuz2=1] X-Spam-DCC: XMission; sa01 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;"Serge E. Hallyn" X-Spam-Relay-Country: X-Spam-Timing: total 549 ms - load_scoreonly_sql: 0.06 (0.0%), signal_user_changed: 4.0 (0.7%), b_tie_ro: 2.8 (0.5%), parse: 1.27 (0.2%), extract_message_metadata: 25 (4.5%), get_uri_detail_list: 1.97 (0.4%), tests_pri_-1000: 9 (1.6%), tests_pri_-950: 1.98 (0.4%), tests_pri_-900: 1.61 (0.3%), tests_pri_-400: 31 (5.6%), check_bayes: 29 (5.3%), b_tokenize: 11 (2.0%), b_tok_get_all: 8 (1.4%), b_comp_prob: 3.6 (0.7%), b_tok_touch_all: 2.9 (0.5%), b_finish: 0.84 (0.2%), tests_pri_0: 463 (84.4%), check_dkim_signature: 0.83 (0.2%), check_dkim_adsp: 4.9 (0.9%), tests_pri_500: 7 (1.3%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH 0/5 RFC] Add an interface to discover relationships between 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 in02.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "Serge E. Hallyn" writes: > Quoting Michael Kerrisk (man-pages) (mtk.manpages@gmail.com): >> Hi Eric, >> >> On 07/25/2016 03:18 PM, Eric W. Biederman wrote: >> >"Michael Kerrisk (man-pages)" writes: >> > >> >>Hi Andrey, >> >> >> >>On 07/22/2016 08:25 PM, Andrey Vagin wrote: >> >>Perhaps add "and the caller does not have CAP_SYS_ADMIN" in the initial >> >>user namespace"? >> > >> >Having looked at that bit of code I don't think capabilities really >> >have a role to play. >> >> Yes, I caught up with that now. I await to see how this plays out >> in the next patch version. > > Thanks - that had caught my eye but I hadn't had time to look into the > justification for this. Hiding this kind of thing indeed seems wrong to > me, unless there is a really good justification for it, i.e. a way > to use that info in an exploit. To avoid breaking checkpoint/restart we need to limit information to the namespaces the caller is a member of for the user and pid namespaces. This roughly duplicates the parentage checks in ns_capable. Conceptually this is the same as limiting .. in a chroot environment. Eric