All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mickaël Salaün" <mic@digikod.net>
To: Stefan Berger <stefanb@linux.ibm.com>
Cc: Mimi Zohar <zohar@linux.ibm.com>,
	linux-integrity@vger.kernel.org,  roberto.sassu@huawei.com,
	linux-security-module@vger.kernel.org,
	 linux-kernel@vger.kernel.org, Jeff Xu <jeffxu@chromium.org>,
	Kees Cook <kees@kernel.org>,  Paul Moore <paul@paul-moore.com>,
	audit@vger.kernel.org
Subject: Re: [PATCH v2] ima: instantiate the bprm_creds_for_exec() hook
Date: Thu, 5 Dec 2024 11:53:26 +0100	[thread overview]
Message-ID: <20241205.fien4aet3Jae@digikod.net> (raw)
In-Reply-To: <c1c61f20-a4ee-437f-840b-2433345e74b6@linux.ibm.com>

On Wed, Dec 04, 2024 at 02:01:02PM -0500, Stefan Berger wrote:
> 
> 
> On 12/3/24 6:34 PM, Mimi Zohar wrote:
> > Like direct file execution (e.g. ./script.sh), indirect file exection
> 
> typo: execution
> 
> > (e.g. sh script.sh) needs to be measured and appraised.  Instantiate
> 
> If I understand the underlying patches correctly then 'sh script.sh' would
> be evaluated with execveat(AT_CHECK) but this requires the execute flag to
> be set. To maintain backwards compatibility  sh cannot assume that script.sh
> has the execute flag set since it doesn't need today:
> 
> $ echo 'echo hi' > foo.sh
> $ sh foo.sh
> hi
> 
> the same is true for python:
> 
> $ echo 'print("hi")' > foo.py
> $ python foo.py
> hi
> 
> I am not sure which interpreters are going to be able to take advantage of
> this or whether they will behave differently if the x bit is set versus when
> it is not set...?

This is a valid concern handled with two new securebits.  See the
related patch series and documentation:
https://lore.kernel.org/all/20241112191858.162021-3-mic@digikod.net/

  reply	other threads:[~2024-12-05 10:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-03 23:34 [PATCH v2] ima: instantiate the bprm_creds_for_exec() hook Mimi Zohar
2024-12-04 10:15 ` Mickaël Salaün
2024-12-04 14:57   ` Mimi Zohar
2024-12-04 17:47     ` Mickaël Salaün
2024-12-04 19:01 ` Stefan Berger
2024-12-05 10:53   ` Mickaël Salaün [this message]
2024-12-05 15:44 ` Stefan Berger
  -- strict thread matches above, loose matches on Subject: below --
2024-12-04 19:25 Mimi Zohar
2024-12-04 19:27 ` Mimi Zohar
2024-12-06  0:30 ` Paul Moore
2024-12-06  3:10   ` Mimi Zohar
2024-12-10 16:34     ` Mickaël Salaün
2024-12-10 16:47       ` Mimi Zohar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241205.fien4aet3Jae@digikod.net \
    --to=mic@digikod.net \
    --cc=audit@vger.kernel.org \
    --cc=jeffxu@chromium.org \
    --cc=kees@kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=paul@paul-moore.com \
    --cc=roberto.sassu@huawei.com \
    --cc=stefanb@linux.ibm.com \
    --cc=zohar@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.