Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752273AbcDOWDf (ORCPT ); Fri, 15 Apr 2016 18:03:35 -0400 Received: from thejh.net ([37.221.195.125]:42282 "EHLO thejh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750862AbcDOWDe (ORCPT ); Fri, 15 Apr 2016 18:03:34 -0400 Date: Sat, 16 Apr 2016 00:03:34 +0200 From: Jann Horn To: "Eric W. Biederman" 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 Subject: Re: [PATCH 04/16] devpts: Teach /dev/ptmx to automount the appropriate devpts via path lookup Message-ID: <20160415220334.GC26549@pc.thejh.net> 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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JWEK1jqKZ6MHAcjA" Content-Disposition: inline In-Reply-To: <1460734532-20134-4-git-send-email-ebiederm@xmission.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1488 Lines: 39 --JWEK1jqKZ6MHAcjA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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? --JWEK1jqKZ6MHAcjA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXEWU1AAoJED4KNFJOeCOodAcP/RLvA0b/ZdPXnLUzm3b6lLSK yK7fTEBMEldjNS32o/iAyAKFBKAfXWIn6wnrBACDjgNMkeZTJ7Ns1uSY5As3ZxbD yRZSC4HVFZnn1QUQmOXkEqaQxU3+vbhoHkWnH+K8NRG80qq6A6rAjRGVcdQF9ZH6 DYU5YhAL7asA62y8tvf6EjBRoXwbgFfDZnF+PTkU0xH3E2XsYy6JkyvA+xm7s+W5 hx+abStFL08EKCafG0DDSCtl93RhzyKNB6Gu0wE4WkjL4sNXlmk/zi/SMunJP8nT Ys/i8usy2kvcIzMAvJCFqmxSHcXMU9/w5A713qTqRpF4JqQceVk/vmO/C24LIwD/ pt/1idLiczIQD/0WbqT7If0ENa+yEZdb8dh5zdHJgTM0r0R1iLw/UxYoidGntJZo SUu2UdiehuUAPO8YmUt217sXtj60dzx9sZY+8xWX6zmYXRPI8mKIMtywh983u9iw 9HFtAxePYCoohkqZEB3Z5qw0+/7qvmflUhgs53trjf6nAWqcQ8OPoXZdphrvWJ0K grZbZcpFeVvh6f7T9TBzjLLSeykt/084Cf+ZmkBiyfKO0QqtDIED29LWw4iLRylH uQEMGljga1OjcACiqKThm45tUKMdAeKT+TliL53ZbdaDpTogGcoo59ibdwfa7d8S 50o0A5FslqHRtlnDCtcp =0sk3 -----END PGP SIGNATURE----- --JWEK1jqKZ6MHAcjA--