Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2941519imm; Thu, 24 May 2018 19:32:31 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqY0zStI+ANQZgL1kz6vX3n41nXmpQWV2cW2EgqsksRCPlb12uYnV5pYo6rM8qA1cMeIQHR X-Received: by 2002:a63:84c6:: with SMTP id k189-v6mr452137pgd.49.1527215551506; Thu, 24 May 2018 19:32:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527215551; cv=none; d=google.com; s=arc-20160816; b=ydDhILDYeyjQNAqUXDDQrv0QI6ssYGSZOSZ1i8M1m0yJUTyXgp9tBMvoqaqf9qA25v b8G6VOC20LCMWtzI+PIR3qhdB0LYrOTq8s3pKoriaCsNbGawR9Rb9U2pwKa9g/+Eg0I5 O7D1sIyQhlpeL/h+0yLE7FLmkUnx6pH7H87zSzqUT7C8ejRkdyoFDNiGdacP98LxortX 0RuPmTku0zeXJ5XnDEOy4oLFfyEQ7cWObbTVZMDxAdN1hFxJZZydTOm4bIRzjO5vZ8NV 1NadKaRvhg0/xQMi3scU2lLrUwp2zoJlzNcifpFoEsmxZrMGRy52n9+81biYTkD+w1N+ I9OQ== 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=cR43S3KeMlP98cgEttuYlsJseT1Yay8yV0evgzJn+Vc=; b=gMw0ru7oeGNYKvVDfUZsj65Pbr/D0z0iP+aeVp3BQvK+m+14ArOr9rbgeec0/Sy+gv HSAAjlI1tG4SkG/oO5SnRLprs6ucmt3Pl8q9cYXxwLitMHH5nu/7YOBotbo0YLB6FTJ/ ube2DgCcKhMFfx1dMPw2XNvYmLLZUyEclOX5q5Mh6Zh6Ybng5vOQbPfDQJ4RB8TtPi5g enTDiIgPAKvXj9+H6dtF/fKk59RBtAmbiKIEsLni1aDLSFRdnksReuUFqem5tuA+k3P3 iF+Zmu23g8TLJhENIiMt9BTZl5y/5hOafUiIGpv7rvBByxKy7NBYSGNu6bgJHyYMUMLA 6SEg== 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 c13-v6si16586314pgq.616.2018.05.24.19.32.17; Thu, 24 May 2018 19:32:31 -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 S1161122AbeEXQ4D (ORCPT + 99 others); Thu, 24 May 2018 12:56:03 -0400 Received: from out01.mta.xmission.com ([166.70.13.231]:51781 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1033992AbeEXQz4 (ORCPT ); Thu, 24 May 2018 12:55:56 -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 1fLtWs-0002jh-Vf; Thu, 24 May 2018 10:55:55 -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 1fLtWs-0000lv-1Y; Thu, 24 May 2018 10:55:54 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Seth Forshee Cc: Linux Containers , linux-fsdevel@vger.kernel.org, "Serge E. Hallyn" , Christian Brauner , linux-kernel@vger.kernel.org References: <87o9h6554f.fsf@xmission.com> <20180523232538.4880-2-ebiederm@xmission.com> <20180524135517.GQ3401@ubuntu-xps13> Date: Thu, 24 May 2018 11:55:45 -0500 In-Reply-To: <20180524135517.GQ3401@ubuntu-xps13> (Seth Forshee's message of "Thu, 24 May 2018 08:55:17 -0500") Message-ID: <87y3g92dta.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=1fLtWs-0000lv-1Y;;;mid=<87y3g92dta.fsf@xmission.com>;;;hst=in01.mta.xmission.com;;;ip=97.119.174.25;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1+iqItHExj9W5lbrmwUHmXACpD/0iD1yM0= 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 sa02.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,T_TM2_M_HEADER_IN_MSG,T_TooManySym_01, XMNoVowels,XMSubLong autolearn=disabled version=3.4.0 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 1.5 TR_Symld_Words too many words that have symbols inside * 0.7 XMSubLong Long Subject * 1.5 XMNoVowels Alpha-numberic number with no vowels * 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.5000] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa02 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_01 4+ unique symbols in subject X-Spam-DCC: XMission; sa02 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ***;Seth Forshee X-Spam-Relay-Country: X-Spam-Timing: total 469 ms - load_scoreonly_sql: 3.6 (0.8%), signal_user_changed: 6 (1.3%), b_tie_ro: 3.4 (0.7%), parse: 2.1 (0.4%), extract_message_metadata: 34 (7.3%), get_uri_detail_list: 2.2 (0.5%), tests_pri_-1000: 17 (3.6%), tests_pri_-950: 2.8 (0.6%), tests_pri_-900: 1.96 (0.4%), tests_pri_-400: 29 (6.2%), check_bayes: 27 (5.7%), b_tokenize: 10 (2.0%), b_tok_get_all: 7 (1.6%), b_comp_prob: 4.1 (0.9%), b_tok_touch_all: 2.3 (0.5%), b_finish: 0.88 (0.2%), tests_pri_0: 342 (72.9%), check_dkim_signature: 1.13 (0.2%), check_dkim_adsp: 6 (1.3%), tests_pri_500: 21 (4.5%), rewrite_mail: 0.00 (0.0%) Subject: Re: [REVIEW][PATCH 2/6] vfs: Allow userns root to call mknod on owned filesystems. 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 Seth Forshee writes: > On Wed, May 23, 2018 at 06:25:34PM -0500, Eric W. Biederman wrote: >> These filesystems already always set SB_I_NODEV so mknod will not be >> useful for gaining control of any devices no matter their permissions. >> This will allow overlayfs and applications to fakeroot to use device >> nodes to represent things on disk. >> >> Signed-off-by: "Eric W. Biederman" > > For a normal filesystem this does seem safe enough. > > However, I'd also like to see us allow unprivileged mounting for > overlayfs, and there we need to worry about whether this would allow a > mknod in an underlying filesystem which should not be allowed. That > mknod will be subject to this same check in the underlying filesystem > using the credentials of the user that mounted the overaly fs, which > should be sufficient to ensure that the mknod is permitted. Sufficient to ensure the mknod is not permitted on the underlying filesystem. I believe you mean. > Thus this looks okay to me. > > Acked-by: Seth Forshee Eric