[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241205.fien4aet3Jae@digikod.net>
Date: Thu, 5 Dec 2024 11:53:26 +0100
From: Mickaël Salaün <mic@...ikod.net>
To: Stefan Berger <stefanb@...ux.ibm.com>
Cc: Mimi Zohar <zohar@...ux.ibm.com>, linux-integrity@...r.kernel.org,
roberto.sassu@...wei.com, linux-security-module@...r.kernel.org,
linux-kernel@...r.kernel.org, Jeff Xu <jeffxu@...omium.org>, Kees Cook <kees@...nel.org>,
Paul Moore <paul@...l-moore.com>, audit@...r.kernel.org
Subject: Re: [PATCH v2] ima: instantiate the bprm_creds_for_exec() hook
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/
Powered by blists - more mailing lists