Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2311983ybe; Sat, 7 Sep 2019 13:02:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqwp718ZNK0+Av4cfLgX/Z78CQpJu7HWdDdXa6lnpoEE2jiVFe6j5kW/I9mKHmz8NoLAvlYo X-Received: by 2002:a17:90a:3d03:: with SMTP id h3mr17005653pjc.49.1567886529188; Sat, 07 Sep 2019 13:02:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567886529; cv=none; d=google.com; s=arc-20160816; b=WFU+UPPm+iJecsFnYn6XSd2RpZ1jSxQN0uEaRB+OfxXh7IKTmPJhU2fWC3G2ZxN44S M/cNNWyqCc4GklLPpKupQMlarcWmvtyxLH2W4yNQyJ6ZmWo7KUdQGLme1Uvn/XZhKEmH lDBKTzjwacUTCIFsvr+mFuCTWIg2Th7My7DrqGBOOSNIN4zpAdfa+3vxetDCdn4epYKu OgzkjlyqE9uBM7EU3yqNp97KqSPgTXl0gp4J/B1IutVfCZL46udL4UU/XluxxtBaM1jU vc99aoTOxRj7srBRtVcljSKFhXINyXIu2qRB/bvtyLEf6DfKWh9H3NsnXqmaNcrw0JWH 4hHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from; bh=mLZcRkU1zoHuKgxY5+pILssCEmO5m48dhNJ3A7G0Yhc=; b=YVkF/rW27+820TOg7CsUU44DTxCPvIPMa+oNSAu7GXx90X0zNb/lf/7S0KY3Pg8Bvq GL2kGPs8vWn2kiyFd6u/+hO+cCd7H6egr2nUAz/j+LkMV5L1wBSV4usXiqlrAsx139pk mNLWD8q87AEJY3+LlsksCMtLKQn7BAHVzPOW5H/237qXartqaxO7aaJ41bah9xuGeJoz LiLKiIkEn+tY5LTd8JZ9Rn6vAmNePYquWv4SPMaEkelSTEqdWJlnxzHDy2gDNW2RN0mH 1b7++Hl+YdTxIyLgTSiaYHqzkDin+f3EryTqEUOg4AVUODfOqY9X7FOzw9eKOCrcylux Mmlw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p21si8046744plq.254.2019.09.07.13.01.53; Sat, 07 Sep 2019 13:02:09 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403970AbfIFS5K (ORCPT + 99 others); Fri, 6 Sep 2019 14:57:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51980 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387716AbfIFS5K (ORCPT ); Fri, 6 Sep 2019 14:57:10 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DFBDD10C0942; Fri, 6 Sep 2019 18:57:09 +0000 (UTC) Received: from oldenburg2.str.redhat.com (ovpn-116-27.ams2.redhat.com [10.36.116.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4CA925C1D8; Fri, 6 Sep 2019 18:57:02 +0000 (UTC) From: Florian Weimer To: Steve Grubb Cc: =?utf-8?Q?Micka=C3=ABl_Sala=C3=BCn?= , linux-kernel@vger.kernel.org, Aleksa Sarai , Alexei Starovoitov , Al Viro , Andy Lutomirski , Christian Heimes , Daniel Borkmann , Eric Chiang , James Morris , Jan Kara , Jann Horn , Jonathan Corbet , Kees Cook , Matthew Garrett , Matthew Wilcox , Michael Kerrisk , =?utf-8?Q?Micka=C3=ABl_Sala=C3=BCn?= , Mimi Zohar , Philippe =?utf-8?Q?Tr=C3=A9buchet?= , Scott Shell , Sean Christopherson , Shuah Khan , Song Liu , Steve Dower , 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 Subject: Re: [PATCH v2 0/5] Add support for O_MAYEXEC References: <20190906152455.22757-1-mic@digikod.net> <2989749.1YmIBkDdQn@x2> Date: Fri, 06 Sep 2019 20:57:00 +0200 In-Reply-To: <2989749.1YmIBkDdQn@x2> (Steve Grubb's message of "Fri, 06 Sep 2019 14:50:02 -0400") Message-ID: <87mufhckxv.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.66]); Fri, 06 Sep 2019 18:57:10 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Steve Grubb: > Now with LD_AUDIT > $ LD_AUDIT=/home/sgrubb/test/openflags/strip-flags.so.0 strace ./test 2>&1 | grep passwd > openat(3, "passwd", O_RDONLY) = 4 > > No O_CLOEXEC flag. I think you need to explain in detail why you consider this a problem. With LD_PRELOAD and LD_AUDIT, you can already do anything, including scanning other loaded objects for a system call instruction and jumping to that (in case a security module in the kernel performs a PC check to confer additional privileges). Thanks, Florian