From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Weimer Subject: Re: [RFC PATCH v1 0/5] Add support for O_MAYEXEC References: <20181212081712.32347-1-mic@digikod.net> <87lg4upkpv.fsf@oldenburg2.str.redhat.com> Date: Thu, 13 Dec 2018 06:13:39 +0100 In-Reply-To: (James Morris's message of "Thu, 13 Dec 2018 10:40:32 +1100 (AEDT)") Message-ID: <87ftv2ovp8.fsf@oldenburg2.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain To: James Morris Cc: =?utf-8?Q?Micka=C3=ABl_Sala=C3=BCn?= , linux-kernel@vger.kernel.org, Al Viro , Jonathan Corbet , Kees Cook , Matthew Garrett , Michael Kerrisk , =?utf-8?Q?Micka=C3=ABl_Sala=C3=BCn?= , Mimi Zohar , Philippe =?utf-8?Q?Tr=C3=A9buchet?= , Shuah Khan , Thibaut Sautereau , Vincent Strubel , Yves-Alexis Perez , kernel-hardening@lists.openwall.com, linux-api@vger.kernel.org, linux-security-module@vger.kernel.org, linux-fsdevel@vger.kernel.org List-ID: * James Morris: > On Wed, 12 Dec 2018, Florian Weimer wrote: > >> * James Morris: >> >> > If you're depending on the script interpreter to flag that the user may >> > execute code, this seems to be equivalent in security terms to depending >> > on the user. e.g. what if the user uses ptrace and clears O_MAYEXEC? >> >> The argument I've heard is this: Using ptrace (and adding the +x >> attribute) are auditable events. > > I guess you could also preload a modified libc which strips the flag. My understanding is that this new libc would have to come somewhere, and making it executable would be an auditable even as well. Thanks, Florian