From mboxrd@z Thu Jan 1 00:00:00 1970 From: ebiederm@xmission.com (Eric W. Biederman) Subject: Re: [PATCH v6 5/6] binfmt_*: scope path resolution of interpreters Date: Tue, 07 May 2019 19:38:58 -0500 Message-ID: <87o94d6aql.fsf@xmission.com> References: <20190506165439.9155-1-cyphar@cyphar.com> <20190506165439.9155-6-cyphar@cyphar.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: (Jann Horn's message of "Mon, 6 May 2019 20:37:37 +0200") Sender: linux-kernel-owner@vger.kernel.org To: Jann Horn Cc: Aleksa Sarai , Andy Lutomirski , Al Viro , Jeff Layton , "J. Bruce Fields" , Arnd Bergmann , David Howells , Andrew Morton , Alexei Starovoitov , Kees Cook , Christian Brauner , Tycho Andersen , David Drysdale , Chanho Min , Oleg Nesterov , Aleksa Sarai , Linus Torvalds , containers@lists.linux-foundation.org, linux-fsdevel , Linux API List-Id: linux-api@vger.kernel.org Jann Horn writes: > > In my opinion, CVE-2019-5736 points out two different problems: > > The big problem: The __ptrace_may_access() logic has a special-case > short-circuit for "introspection" that you can't opt out of; Once upon a time in a galaxy far far away I fixed a bug where we missing ptrace_may_access checks on various proc files and systems using selinux stopped working. At the time selinux did not allow ptrace like access to yourself. The "introspection" special case was the quick and simple work-around. There is nothing fundamental in having the "introspection" special case except that various lsms have probably grown to depend upon it being there. I expect without difficulty we could move the check down into the various lsms. Which would get that check out of the core kernel code. Then the special case would the lsms challenge to keep or remove. Eric