From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755123AbcDKU0o (ORCPT ); Mon, 11 Apr 2016 16:26:44 -0400 Received: from [198.137.202.10] ([198.137.202.10]:47228 "EHLO mail.zytor.com" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1752104AbcDKU0n (ORCPT ); Mon, 11 Apr 2016 16:26:43 -0400 User-Agent: K-9 Mail for Android In-Reply-To: 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> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: [PATCH 01/13] devpts: Teach /dev/ptmx to find the associated devpts via path lookup From: "H. Peter Anvin" Date: Mon, 11 Apr 2016 13:16:42 -0700 To: Andy Lutomirski , Linus Torvalds CC: security@debian.org, "security@kernel.org" , Al Viro , "security@ubuntu.com >> security" , Peter Hurley , "Eric W. Biederman" , Serge Hallyn , Willy Tarreau , Aurelien Jarno , One Thousand Gnomes , Jann Horn , Greg KH , Linux Kernel Mailing List , Jiri Slaby , Florian Weimer Message-ID: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On April 11, 2016 1:12:22 PM PDT, Andy Lutomirski wrote: >On Sat, Apr 9, 2016 at 6:27 PM, Linus Torvalds > wrote: >> >> On Apr 9, 2016 5:45 PM, "Andy Lutomirski" >wrote: >>> >>> >>> What we *do* want to do, though, is to prevent the following: >> >> I don't see the point. Why do you bring up this insane scenario that >nobody >> can possibly care about? >> >> So you actually have any reason to believe somebody does that? >> >> I already asked about that earlier, and the silence was deafening. > >I have no idea, but I'm generally uncomfortable with magical things >that bypass normal security policy. > >That being said, here's an idea for fixing this, at least in the long >run. Add a new devpts mount option "no_ptmx_redirect" that turns off >this behavior for the super in question. That is, opening /dev/ptmx >if "pts/ptmx" points to something with no_ptmx_redirect set will fail. >Distros shipping new kernels could be encouraged to (finally!) make >/dev/ptmx a symlink and set this option. > >We just might be able to get away with spelling that option >"newinstance". What about the idea of making the bind mount automatic? -- Sent from my Android device with K-9 Mail. Please excuse brevity and formatting.