Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4583679ybe; Mon, 9 Sep 2019 11:17:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqyq2RT7DtIpmu44m0zZnUwgfFCLW/VwXuWqA5uRtutlc5nlUU/lhscnbcKbXYdrrO0StJSE X-Received: by 2002:a50:cf8b:: with SMTP id h11mr19042611edk.236.1568053056177; Mon, 09 Sep 2019 11:17:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568053056; cv=none; d=google.com; s=arc-20160816; b=LUBGThon+CJhC6EcY5YVAAYag4VYoQ5Ser/apOnOvaQAf7O+rlq0nz8tPdG8CmJymE vQsJC8H/r5OOGZVo6x8mGzsOrn5ZnU8FNC/ZRa148QjDwgnHuxsSQHDaJxR15KWnAlhb BdNy0swfU1zGSWpETcJ6c5utgCl56lYR9QvoNQw+eGmBCna2X6K/8nIu3a0QJLxma7LL nc+igmWDcKUGzzBH15IPpza/093YysqYledumKor0SQeqFrIqTvBrGsVibKEM7wLlz6t lPyl+Q7hBx48A7RCCEYxVAUNGQ9CR+8y+7dqkPXRfzDm9OzM/l0EzFLQvBK6sG+q07ak VpFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-id:mime-version:user-agent :references:message-id:in-reply-to:subject:cc:to:from:date; bh=+HQYDBk5RAfnf/VRME39qCgTm+C0k7KL5tjKlY6a978=; b=BsFj0QXZAT2IzuEFnfYPyHlzKdPXPfMQMoeo/ssLo+4op0zB3bviSdRhvSWj2ByRbt Qi5m8R/Ei25hYgyMqHflk6iOPtkwb/H8v4aAwHNSNGuSaM7xLEcUK1euZ5gPIq/j6u1Y xgr/0lH6uS8uA/cTBXluJV7ESstyruVQzIml5M0EzNJV8erMA8Yvv1Q7DPgxvyRcBAbG laLnab3vecWkdj/m1kEdcx3oyDVQN4OyvKLS4Yhtk26PYq6VtguZ9OCXmVbDvDtedNsz bGgIwNBnXwy9VejWDsEyn7NFNQTqfmrfD6fFvsJOe4tPYRXGB3xhtMbMqmn0E9xKlgC+ +Q3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t11si7792290ejr.381.2019.09.09.11.17.12; Mon, 09 Sep 2019 11:17:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731792AbfIIAR6 (ORCPT + 99 others); Sun, 8 Sep 2019 20:17:58 -0400 Received: from namei.org ([65.99.196.166]:43320 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731443AbfIIAR6 (ORCPT ); Sun, 8 Sep 2019 20:17:58 -0400 Received: from localhost (localhost [127.0.0.1]) by namei.org (8.14.4/8.14.4) with ESMTP id x890GNJt027077; Mon, 9 Sep 2019 00:16:24 GMT Date: Sun, 8 Sep 2019 17:16:23 -0700 (PDT) From: James Morris To: =?ISO-8859-15?Q?Micka=EBl_Sala=FCn?= cc: linux-kernel@vger.kernel.org, Aleksa Sarai , Alexei Starovoitov , Al Viro , Andy Lutomirski , Christian Heimes , Daniel Borkmann , Eric Chiang , Florian Weimer , Jan Kara , Jann Horn , Jonathan Corbet , Kees Cook , Matthew Garrett , Matthew Wilcox , Michael Kerrisk , =?ISO-8859-15?Q?Micka=EBl_Sala=FCn?= , Mimi Zohar , =?ISO-8859-15?Q?Philippe_Tr=E9buchet?= , Scott Shell , Sean Christopherson , Shuah Khan , Song Liu , Steve Dower , Steve Grubb , 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, Mimi Zohar Subject: Re: [PATCH v2 0/5] Add support for O_MAYEXEC In-Reply-To: <20190906152455.22757-1-mic@digikod.net> Message-ID: References: <20190906152455.22757-1-mic@digikod.net> User-Agent: Alpine 2.21 (LRH 202 2017-01-01) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="1665246916-1947903910-1567986261=:20426" Content-ID: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1665246916-1947903910-1567986261=:20426 Content-Type: text/plain; CHARSET=ISO-8859-15 Content-Transfer-Encoding: 8BIT Content-ID: On Fri, 6 Sep 2019, Micka?l Sala?n wrote: > Furthermore, the security policy can also be delegated to an LSM, either > a MAC system or an integrity system. For instance, the new kernel > MAY_OPENEXEC flag closes a major IMA measurement/appraisal interpreter > integrity gap by bringing the ability to check the use of scripts [2]. To clarify, scripts are already covered by IMA if they're executed directly, and the gap is when invoking a script as a parameter to the interpreter (and for any sourced files). In that case only the interpreter is measured/appraised, unless there's a rule also covering the script file(s). See: https://en.opensuse.org/SDB:Ima_evm#script-behaviour In theory you could probably also close the gap by modifying the interpreters to check for the execute bit on any file opened for interpretation (as earlier suggested by Steve Grubb), and then you could have IMA measure/appraise all files with +x. I suspect this could get messy in terms of unwanted files being included, and the MAY_OPENEXEC flag has cleaner semantics. -- James Morris --1665246916-1947903910-1567986261=:20426--