From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 960CAC83003 for ; Wed, 29 Apr 2020 10:11:56 +0000 (UTC) Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.kernel.org (Postfix) with SMTP id F186B2074A for ; Wed, 29 Apr 2020 10:11:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F186B2074A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=deneb.enyo.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernel-hardening-return-18680-kernel-hardening=archiver.kernel.org@lists.openwall.com Received: (qmail 29750 invoked by uid 550); 29 Apr 2020 10:11:48 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Received: (qmail 3541 invoked from network); 28 Apr 2020 21:22:26 -0000 From: Florian Weimer To: Jann Horn Cc: =?iso-8859-1?Q?Micka=EBl_Sala=FCn?= , kernel list , Aleksa Sarai , Alexei Starovoitov , Al Viro , Andy Lutomirski , Christian Heimes , Daniel Borkmann , Deven Bowers , Eric Chiang , James Morris , Jan Kara , Jonathan Corbet , Kees Cook , Matthew Garrett , Matthew Wilcox , Michael Kerrisk , =?iso-8859-1?Q?Micka=EBl_Sala?= =?iso-8859-1?Q?=FCn?= , Mimi Zohar , Philippe =?iso-8859-1?Q?Tr=E9buchet?= , Scott Shell , Sean Christopherson , Shuah Khan , Steve Dower , Steve Grubb , Thibaut Sautereau , Vincent Strubel , Kernel Hardening , Linux API , linux-security-module , linux-fsdevel Subject: Re: [PATCH v3 0/5] Add support for RESOLVE_MAYEXEC References: <20200428175129.634352-1-mic@digikod.net> Date: Tue, 28 Apr 2020 23:20:20 +0200 In-Reply-To: (Jann Horn's message of "Tue, 28 Apr 2020 21:21:48 +0200") Message-ID: <87blnb48a3.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain * Jann Horn: > Just as a comment: You'd probably also have to use RESOLVE_MAYEXEC in > the dynamic linker. Absolutely. In typical configurations, the kernel does not enforce that executable mappings must be backed by files which are executable. It's most obvious with using an explicit loader invocation to run executables on noexec mounts. RESOLVE_MAYEXEC is much more useful than trying to reimplement the kernel permission checks (or what some believe they should be) in userspace.