Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2883478imm; Fri, 20 Jul 2018 06:38:02 -0700 (PDT) X-Google-Smtp-Source: AAOMgpecACT+ycGaPMtbrb6hbWbaBeNC1nKAr48Bjhpod9JLVblDhWPwfsysJvSrLdavzcn3Q1el X-Received: by 2002:a17:902:8601:: with SMTP id f1-v6mr2153872plo.196.1532093882596; Fri, 20 Jul 2018 06:38:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532093882; cv=none; d=google.com; s=arc-20160816; b=R9D7W2kg3xM6mbhvumwdNleTjzOoLDnKqGCEIA5poMdv0LKHTgjKU/YSww020SpmrI pfIGO4hHUP7+6gjqadtq6GdCkW2bA+dvagtIkGLPj9EO463fDMMK1Lf4VW1qIjDL/EuD 1iX+zgHB6Jrj+ixW3HnrZdv6GNplnu+paxVo3P1H+y1/MtllLlzoPE8r/ja9ltvLgI6y TCdJDUokhFyW2yXfdi7Xu19Zb8nxJLzTxuOFF4RZeM4nCUEvjgxAKYcQDQaYPeHmkyNr 2ITvnNfbd0tMOFq3E4GFAv1fU6XSkC/nPoCduEng0HGoWFj7v6NEtZYuoc+M0MudicQY 099g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:mime-version:user-agent :message-id:in-reply-to:date:references:cc:to:from :arc-authentication-results; bh=kiFqHzgYRmegGwaHKbCHaQbZ6/Z7su7O08D6LiXeRAY=; b=yEjIl8kVBt4xb1KmY3b1CrCzBzB0964XD0iovV+yvjNyFWOxHr6/Z4RjfHY8AfME/G fLb2s19wdqA2LounhfZrx3qpPnZnWZHwwwWL7xdioeWDrneBiDCaRvZbp/nzaGGA0PRK 6XMl52KMC52wGYV7fzVJn/zsDYla3oHDQDgSjaJdKcRa/SQK8nPf1bQ1teGUNZe+UFky nfsz7lq+WFz+S1/cp4PB8759h/H3uCbOtHAa3fRfYGUmv8wdZC0r/CkQ2Id6GAPyX8hS 4Xru3jZ12cPcr93hn5lkgj+swPbXo3/rHAbphR/EPhtUJoeWeqHXYZhCy0rqhBXHkE8R +oqA== 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 u8-v6si1663232plh.492.2018.07.20.06.37.47; Fri, 20 Jul 2018 06:38:02 -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 S1731673AbeGTOZf (ORCPT + 99 others); Fri, 20 Jul 2018 10:25:35 -0400 Received: from out01.mta.xmission.com ([166.70.13.231]:36962 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727693AbeGTOZf (ORCPT ); Fri, 20 Jul 2018 10:25:35 -0400 Received: from in02.mta.xmission.com ([166.70.13.52]) by out01.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1fgVar-0003U7-6u; Fri, 20 Jul 2018 07:37:13 -0600 Received: from [97.119.167.31] (helo=x220.xmission.com) by in02.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1fgVaq-0005gt-LB; Fri, 20 Jul 2018 07:37:13 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Salvatore Mesoraca Cc: Kernel Hardening , Laura Abbott , LKML , Masahiro Yamada , linux-doc@vger.kernel.org, Kees Cook References: <1531935483-30784-1-git-send-email-s.mesoraca16@gmail.com> Date: Fri, 20 Jul 2018 08:37:04 -0500 In-Reply-To: (Kees Cook's message of "Thu, 19 Jul 2018 22:15:15 -0700") Message-ID: <87effy9gfz.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=1fgVaq-0005gt-LB;;;mid=<87effy9gfz.fsf@xmission.com>;;;hst=in02.mta.xmission.com;;;ip=97.119.167.31;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1/hahftwkIP0ZjnYet3ZaYXea+PRQt0Z6I= X-SA-Exim-Connect-IP: 97.119.167.31 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa07.xmission.com X-Spam-Level: X-Spam-Status: No, score=-0.2 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,T_TM2_M_HEADER_IN_MSG autolearn=disabled version=3.4.1 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 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.4511] * -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: ;Salvatore Mesoraca X-Spam-Relay-Country: X-Spam-Timing: total 173 ms - load_scoreonly_sql: 0.03 (0.0%), signal_user_changed: 2.7 (1.6%), b_tie_ro: 1.88 (1.1%), parse: 0.70 (0.4%), extract_message_metadata: 10 (5.7%), get_uri_detail_list: 0.91 (0.5%), tests_pri_-1000: 6 (3.4%), tests_pri_-950: 1.15 (0.7%), tests_pri_-900: 0.97 (0.6%), tests_pri_-400: 17 (10.1%), check_bayes: 16 (9.4%), b_tokenize: 5.0 (2.9%), b_tok_get_all: 5 (3.1%), b_comp_prob: 1.94 (1.1%), b_tok_touch_all: 2.1 (1.2%), b_finish: 0.58 (0.3%), tests_pri_0: 126 (72.9%), check_dkim_signature: 0.46 (0.3%), check_dkim_adsp: 3.2 (1.8%), tests_pri_500: 5 (3.1%), rewrite_mail: 0.00 (0.0%) Subject: Re: [RFC] kconfig: add hardened defconfig helpers 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Kees Cook writes: >> +CONFIG_USER_NS=n >> +~~~~~~~~~~~~~~~~ >> + >> +**Negative side effects level:** Medium > > Unfortunately I think this is High or Extreme. USER_NS gets a lot of use. > >> +**- Protection type:** Attack surface reduction >> + >> +This allows containers to use user namespaces to provide different >> +user info for different servers. >> +User namespaces have been abused in the past for privilege >> +escalation. This is not a particularly good description. User namespaces do indeed increase the attack surface of programs that don't use them. User namespaces when used to build ``unprivileged containers'' remove or at least drastically reduce the need to run as root when setting up containers. Which is attack surface reduction. User namespaces make available tools that are commonly used to build sandboxes. Chrome for example uses users namespaces if they are available as part of setting up it's sandbox. User namespaces are not limited to containers. The bugs in the attack surface that user namespaces expose that have been used for privilege escalation have to the best of my knowledge closed. So while there is some danger in the increased attack surface we are looking at implementation defects rather than design defects. Eric