From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754506AbcA0Kk0 (ORCPT ); Wed, 27 Jan 2016 05:40:26 -0500 Received: from out03.mta.xmission.com ([166.70.13.233]:41548 "EHLO out03.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752449AbcA0KkU (ORCPT ); Wed, 27 Jan 2016 05:40:20 -0500 From: ebiederm@xmission.com (Eric W. Biederman) To: Kees Cook Cc: Serge Hallyn , "kernel-hardening\@lists.openwall.com" , Andy Lutomirski , Andrew Morton , Al Viro , Richard Weinberger , Robert =?utf-8?B?xZp3acSZY2tp?= , Dmitry Vyukov , David Howells , Kostya Serebryany , Alexander Potapenko , Eric Dumazet , Sasha Levin , "linux-doc\@vger.kernel.org" , "linux-kernel\@vger.kernel.org" References: <1453502345-30416-1-git-send-email-keescook@chromium.org> <8737tp0zhr.fsf@x220.int.ebiederm.org> <87bn89sbc2.fsf@x220.int.ebiederm.org> <87zivtj5tv.fsf@x220.int.ebiederm.org> <20160126171523.GA13715@ubuntumail> Date: Wed, 27 Jan 2016 04:27:19 -0600 In-Reply-To: (Kees Cook's message of "Tue, 26 Jan 2016 15:13:29 -0800") Message-ID: <874mdzgvw8.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-AID: U2FsdGVkX18AXM+cppEvpuf92L0sIS0Pt949RnnhBYQ= X-SA-Exim-Connect-IP: 97.121.81.63 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.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.4954] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa06 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_02 5+ unique symbols in subject * 0.0 T_TooManySym_01 4+ unique symbols in subject X-Spam-DCC: XMission; sa06 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: **;Kees Cook X-Spam-Relay-Country: X-Spam-Timing: total 943 ms - load_scoreonly_sql: 0.10 (0.0%), signal_user_changed: 4.9 (0.5%), b_tie_ro: 3.2 (0.3%), parse: 1.36 (0.1%), extract_message_metadata: 20 (2.1%), get_uri_detail_list: 2.0 (0.2%), tests_pri_-1000: 8 (0.9%), tests_pri_-950: 1.30 (0.1%), tests_pri_-900: 1.09 (0.1%), tests_pri_-400: 28 (3.0%), check_bayes: 27 (2.8%), b_tokenize: 7 (0.7%), b_tok_get_all: 10 (1.1%), b_comp_prob: 2.9 (0.3%), b_tok_touch_all: 4.1 (0.4%), b_finish: 0.77 (0.1%), tests_pri_0: 731 (77.6%), check_dkim_signature: 0.60 (0.1%), check_dkim_adsp: 111 (11.8%), tests_pri_500: 143 (15.1%), poll_dns_idle: 126 (13.4%), rewrite_mail: 0.00 (0.0%) Subject: Re: [kernel-hardening] Re: [PATCH 0/2] sysctl: allow CLONE_NEWUSER to be disabled X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Wed, 24 Sep 2014 11:00:52 -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 Kees Cook writes: > On Tue, Jan 26, 2016 at 9:15 AM, Serge Hallyn wrote: >> Quoting Josh Boyer (jwboyer@fedoraproject.org): >>> What you're saying is true for the "oh crap" case of a new userns >>> related CVE being found. However, there is the case where sysadmins >>> know for a fact that a set of machines should not allow user >>> namespaces to be enabled. Currently they have 2 choices, 1) use their >> >> Hi - can you give a specific example of this? (Where users really should >> not be able to use them - not where they might not need them) I think >> it'll help the discussion tremendously. Because so far the only good >> arguments I've seen have been about actual bugs in the user namespaces, >> which would not warrant a designed-in permanent disable switch. If >> there are good use cases where such a disable switch will always be >> needed (and compiling out can't satisfy) that'd be helpful. > > My example is a machine in a colo rack serving web pages. A site gets > attacked, and www-data uses user namespaces to continue their attack > to gain root privileges. > > The admin of such a machine could have disabled userns months earlier > and limited the scope of the attack. Of course for the paranoid there is already a mechanism to do this. /sbin/chroot. No new user namespaces are allowed to be created inside of a chroot. Eric