Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1435720imm; Wed, 23 May 2018 16:23:53 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq6/NBVH+1xLRZ0NTX1k9gOpdzf8GstLQMnFLX5mnmdXF4PmSUWny+tJX/4hvHcqLk/skvk X-Received: by 2002:a65:6510:: with SMTP id x16-v6mr3883042pgv.204.1527117832954; Wed, 23 May 2018 16:23:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527117832; cv=none; d=google.com; s=arc-20160816; b=GjNXQraT8BsQEWo+8hwUDweMjhy5bgJxNFGTiU7852s/8b0GTetxDTcCA3Fwp1wSk/ mnnpDaT53exx+gH4BpIA4k89TIA51f7EXGRAWwVwuF9v8xaACc5m9WILk2yNfRk8NxZH /joVeuhRYFadsEEABLjFL6TxUU4EbRfmHyTkB78GQW9ZexFf+9Vn59fArVZOYAYXUnpe a0MXrcfmDzsSBnonrqWJ0HMnk+LKjdoUjFALzQWMHKYwzZbrjUcRH5WoS0Bt4C4IK2MB d1z1M0nARIZe9qw1ehq1qU9uawl+DZMGbnZLjMFpuY1+jr6Nv3pCIBGTGdnj0I98RC/d SIMw== 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:date:cc:to:from:arc-authentication-results; bh=jTzKvo3MIhcjWahI2ZGLaZWk1lD5YM1k1t/a5GRA8sk=; b=wgd58LGjHIgR+UKoGFkqabEn8IiumrmdKA5Gl1T9d629BlewQ5GJ0QMVqlMjuc9TFH NvWX+WNHfLpFjDs+B/Q7jlYQEAyZpB+xXUplPHCfJ7ycw1oSopel27E7ejTExEYDzsLy R+ulSu3j/LcSucaGCo3hChZtLzMBJnO77LUlutMQzOYUqZyv23232BqL9F4o2b3TWN+C CIzV9CGuI0j4XxBfOMmPEu8fBLFxMOXV3xZZtI4Df1c06/bT7r42hzoioz7MIusUD+nh O6cPihaO2DBgtHo/INunj82CFcApgKl3nHMv+2TlMP+IAh9OTEInjWvsqcR8ft0JcAMy FnZg== 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 c2-v6si19322721plr.454.2018.05.23.16.23.37; Wed, 23 May 2018 16:23:52 -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 S935060AbeEWXXJ (ORCPT + 99 others); Wed, 23 May 2018 19:23:09 -0400 Received: from out01.mta.xmission.com ([166.70.13.231]:47865 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934671AbeEWXXH (ORCPT ); Wed, 23 May 2018 19:23:07 -0400 Received: from in01.mta.xmission.com ([166.70.13.51]) by out01.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1fLd60-000360-TF; Wed, 23 May 2018 17:23:04 -0600 Received: from [97.119.174.25] (helo=x220.xmission.com) by in01.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1fLd5z-0005QO-VP; Wed, 23 May 2018 17:23:04 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Linux Containers Cc: , Seth Forshee , "Serge E. Hallyn" , Christian Brauner , Date: Wed, 23 May 2018 18:22:56 -0500 Message-ID: <87o9h6554f.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=1fLd5z-0005QO-VP;;;mid=<87o9h6554f.fsf@xmission.com>;;;hst=in01.mta.xmission.com;;;ip=97.119.174.25;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX18gA29VGk1RUOs/zesLWKoUnvF0aKxl7N8= X-SA-Exim-Connect-IP: 97.119.174.25 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on sa01.xmission.com X-Spam-Level: *** X-Spam-Status: No, score=3.5 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,TR_Symld_Words,XMNoVowels,XMSubLong autolearn=disabled version=3.4.0 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.7 XMSubLong Long Subject * 1.5 TR_Symld_Words too many words that have symbols inside * 1.5 XMNoVowels Alpha-numberic number with no vowels * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * -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: ***;Linux Containers X-Spam-Relay-Country: X-Spam-Timing: total 445 ms - load_scoreonly_sql: 0.06 (0.0%), signal_user_changed: 3.1 (0.7%), b_tie_ro: 2.1 (0.5%), parse: 1.20 (0.3%), extract_message_metadata: 5 (1.1%), get_uri_detail_list: 2.5 (0.6%), tests_pri_-1000: 5 (1.1%), tests_pri_-950: 2.2 (0.5%), tests_pri_-900: 1.62 (0.4%), tests_pri_-400: 29 (6.5%), check_bayes: 27 (6.1%), b_tokenize: 10 (2.3%), b_tok_get_all: 7 (1.5%), b_comp_prob: 4.3 (1.0%), b_tok_touch_all: 2.7 (0.6%), b_finish: 0.82 (0.2%), tests_pri_0: 370 (83.1%), check_dkim_signature: 0.80 (0.2%), check_dkim_adsp: 6 (1.4%), tests_pri_500: 6 (1.4%), rewrite_mail: 0.00 (0.0%) Subject: [REVIEW][PATCH 0/6] Wrapping up the vfs support for unprivileged mounts 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Very slowly the work has been progressing to ensure the vfs has the necessary support for mounting filesystems without privilege. This patchset contains one more core piece of that work, ensuring a few more operations that would write back an inode and confuse an exisiting filesystem are denied. The rest of the changes actually enable userns root to do things with filesystems that the userns root has mounted. Most of these have been waiting in the wings a long time, held back because I wanted the core of the patchset to be solid before I started allowing additional behavor. It is definitely time for these changes so the effect of s_user_ns becomes less theoretical. The change to allow mknod is new, but consistent with everything else and harmless as device nodes on filesystems mounted without privilege are ignored. Unless problems show up in the during review I plan to merge these changes. These changes are also available at: git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git userns-test Eric W. Biederman (5): vfs: Don't allow changing the link count of an inode with an invalid uid or gid vfs: Allow userns root to call mknod on owned filesystems. fs: Allow superblock owner to replace invalid owners of inodes fs: Allow superblock owner to access do_remount_sb() capabilities: Allow privileged user in s_user_ns to set security.* xattrs Seth Forshee (1): fs: Allow CAP_SYS_ADMIN in s_user_ns to freeze and thaw filesystems fs/attr.c | 36 ++++++++++++++++++++++++++++-------- fs/ioctl.c | 4 ++-- fs/namei.c | 16 ++++++++++++---- fs/namespace.c | 4 ++-- security/commoncap.c | 8 ++++++-- 5 files changed, 50 insertions(+), 18 deletions(-) Eric