Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755266AbcDLAI1 (ORCPT ); Mon, 11 Apr 2016 20:08:27 -0400 Received: from mail-io0-f193.google.com ([209.85.223.193]:34528 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753015AbcDLAI0 (ORCPT ); Mon, 11 Apr 2016 20:08:26 -0400 MIME-Version: 1.0 In-Reply-To: <87ziszd7uv.fsf@x220.int.ebiederm.org> References: <878u0s3orx.fsf_-_@x220.int.ebiederm.org> <1459819769-30387-1-git-send-email-ebiederm@xmission.com> <87twjcorwg.fsf@x220.int.ebiederm.org> <20160409140909.42315e6d@lxorguk.ukuu.org.uk> <83FE8CD2-C0A2-4ADB-AEBD-8DD89AD4F88A@zytor.com> <87bn5ij0x1.fsf@x220.int.ebiederm.org> <78205895-E11D-417F-91DC-4BCA0B61A122@zytor.com> <87ziszd7uv.fsf@x220.int.ebiederm.org> Date: Mon, 11 Apr 2016 17:08:25 -0700 X-Google-Sender-Auth: -IHzZBBKC-qE_CPV-cnUvA1to7k Message-ID: Subject: Re: [PATCH 01/13] devpts: Teach /dev/ptmx to find the associated devpts via path lookup From: Linus Torvalds To: "Eric W. Biederman" Cc: Andy Lutomirski , security@debian.org, "security@kernel.org" , Al Viro , "security@ubuntu.com >> security" , Peter Hurley , Serge Hallyn , Willy Tarreau , Aurelien Jarno , One Thousand Gnomes , Jann Horn , Greg KH , Linux Kernel Mailing List , Jiri Slaby , Florian Weimer , "H. Peter Anvin" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1423 Lines: 36 On Mon, Apr 11, 2016 at 4:49 PM, Eric W. Biederman wrote: > > I replied earlier. Did you not see my reply? Are you talking about the one where you agreed that the scenario was made up and insane? The one where you said that you're worried about breaking out "extension" where ptmx is non-0666? That was never an extension. It was a simple situation of people (a) not knowing what the tty group should be in the kernel and (b) then thinking that using a permission model of "no permission" somehow made it saner. What it actually resulted in was that most distros just ignore it entirely, and just use /dev/ptmx. Yes, you *can* then chmod it in user space and use a symlink, but so what? Nobody who actually uses that node uses anythinig but 0666. Because that would break pretty much everything that uses pty's. So the whole "we need to worry about permission 0000" is complete and uttter garbage. We really don't. The situation doesn't come up, and it's not relevant. The standard part to access ptmx is /dev/ptmx, and no amount of wishing it were otherwise will make it any different. Seriously. Just look at the opengroup documentation. It talks about /dev/ptmx. The whole /dev/pts/ptmx thing was a mistake. WE SHOULD NOT EXTEND ON THAT MISTAKE. We should just FIX the mistake. Ignore /dev/pts/ptmx, because that node is non-standard SHIT. Really. Really really. Linus