Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933060AbcDSS5E (ORCPT ); Tue, 19 Apr 2016 14:57:04 -0400 Received: from out01.mta.xmission.com ([166.70.13.231]:44881 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932392AbcDSS5B (ORCPT ); Tue, 19 Apr 2016 14:57:01 -0400 From: ebiederm@xmission.com (Eric W. Biederman) To: Jann Horn Cc: Linus Torvalds , "H. Peter Anvin" , Andy Lutomirski , security@debian.org, security@kernel.org, Al Viro , security@ubuntu.com, Peter Hurley , Serge Hallyn , Willy Tarreau , Aurelien Jarno , One Thousand Gnomes , Greg KH , Linux Kernel Mailing List , Jiri Slaby , Florian Weimer References: <877ffyzy1j.fsf_-_@x220.int.ebiederm.org> <1460734532-20134-1-git-send-email-ebiederm@xmission.com> <1460734532-20134-4-git-send-email-ebiederm@xmission.com> <20160415220334.GC26549@pc.thejh.net> Date: Tue, 19 Apr 2016 13:46:17 -0500 In-Reply-To: <20160415220334.GC26549@pc.thejh.net> (Jann Horn's message of "Sat, 16 Apr 2016 00:03:34 +0200") Message-ID: <878u09mo7a.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: U2FsdGVkX1+QwOmNYHtg7OyDC20KiICJ6xe9zYW+PjY= X-SA-Exim-Connect-IP: 97.119.105.151 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.5000] * -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: **;Jann Horn X-Spam-Relay-Country: X-Spam-Timing: total 1243 ms - load_scoreonly_sql: 0.04 (0.0%), signal_user_changed: 3.9 (0.3%), b_tie_ro: 2.9 (0.2%), parse: 0.97 (0.1%), extract_message_metadata: 16 (1.3%), get_uri_detail_list: 1.03 (0.1%), tests_pri_-1000: 5 (0.4%), tests_pri_-950: 1.25 (0.1%), tests_pri_-900: 1.05 (0.1%), tests_pri_-400: 21 (1.7%), check_bayes: 20 (1.6%), b_tokenize: 5 (0.4%), b_tok_get_all: 6 (0.5%), b_comp_prob: 2.2 (0.2%), b_tok_touch_all: 3.2 (0.3%), b_finish: 0.76 (0.1%), tests_pri_0: 1185 (95.4%), check_dkim_signature: 0.47 (0.0%), check_dkim_adsp: 2.9 (0.2%), tests_pri_500: 4.8 (0.4%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH 04/16] devpts: Teach /dev/ptmx to automount the appropriate devpts via path lookup 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 Content-Length: 643 Lines: 18 Jann Horn writes: > On Fri, Apr 15, 2016 at 10:35:20AM -0500, Eric W. Biederman wrote: >> +static inline bool is_dev_ptmx(struct inode *inode) >> +{ >> + return inode->i_rdev == MKDEV(TTYAUX_MAJOR, PTMX_MINOR); >> +} > > I'm not sure whether it matters, but I think a FUSE filesystem > should be able to create a fake device that passes this check. > fuse_init_inode() calls init_special_inode() with a user-supplied > rdev for character devices. Is that a problem? It isn't a problem with fuse, and I don't think it is a real problem in general, but yes it would be good if that code had honored nodev mount options. Eric