Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755427AbcDLABu (ORCPT ); Mon, 11 Apr 2016 20:01:50 -0400 Received: from mail-io0-f193.google.com ([209.85.223.193]:35878 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753237AbcDLABt (ORCPT ); Mon, 11 Apr 2016 20:01:49 -0400 MIME-Version: 1.0 In-Reply-To: <877fg3emy7.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> <877fg3emy7.fsf@x220.int.ebiederm.org> Date: Mon, 11 Apr 2016 17:01:47 -0700 X-Google-Sender-Auth: Jld4mm5romyeysFkgy_gznQiE00 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: "H. Peter Anvin" , 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 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: 1395 Lines: 31 On Mon, Apr 11, 2016 at 4:37 PM, Eric W. Biederman wrote: > > My practical concern if we worked through the implementation details > would be how would it interact with people who bind mount /dev/pts/ptmx > on top of /dev/ptmx. We might get some strange new errors. Yes, please don't let's play "clever" games. The semantics should be fairly straightforward. I still don't understand why people think that you shouldn't be able to access a 'pts' subsystem that is accessible to others. If you can bind-mount the pts directory somewhere, then you can damn well already see that pts mount, claiming that somehow it should be sacred ground and you shouldn't be able to access it with a ptmx node outside of it is just insane. So people have been bringing that up as an issue, but nobody has ever actually been able to articulate why anybody should ever care. Now people are just making up random odd semantics. Nobody has ever explained why the _simple_ "ptmx binds to the pts directory next to it" is actually problem. Even for a bind mount, you have to be able to open the point you're mounting, so we know that the "attacker" already had access to the pts subdirectory. If somebody wants to keep the pts mount private, they should damn well keep it _private_. I don't understand peoples "oh, you can access it but you can't access it".excuses. Linus