linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roberto Sassu <roberto.sassu@huawei.com>
To: Lev Olshvang <levonshe@gmail.com>,
	"linux-integrity@vger.kernel.org"
	<linux-integrity@vger.kernel.org>, Mimi Zohar <zohar@us.ibm.com>
Cc: Silviu Vlasceanu <Silviu.Vlasceanu@huawei.com>
Subject: RE: [PATCH] integrity ima_policy : Select files by suffix
Date: Mon, 30 Mar 2020 16:45:45 +0000	[thread overview]
Message-ID: <1244b6bcc384413581da33c9b92743b8@huawei.com> (raw)
In-Reply-To: <20200330122434.GB28214@kl>

> -----Original Message-----
> From: linux-integrity-owner@vger.kernel.org [mailto:linux-integrity-
> owner@vger.kernel.org] On Behalf Of Lev Olshvang
> Sent: Monday, March 30, 2020 2:28 PM
> To: linux-integrity@vger.kernel.org; Mimi Zohar <zohar@us.ibm.com>
> Subject: [PATCH] integrity ima_policy : Select files by suffix
> 
> From: Lev Olshvang <levonshe@gmail.com>
> Date: Fri, 27 Mar 2020 20:50:01 +0300
> Reply-To:
> Subject: [PATCH] integrity ima_policy : Select files by suffix
> 
> IMA policy rule allows to select files based on uid, gid, fsuid. etc.
> One tremendously useful selector(IMHO) is the file suffix.
> 
> I think of systemd service files, configurution files, etc.
> 
> But the real goal of the patch is the ability to validate shell scripts.
> Shell provides too many different ways to run the script:
> input redirrection, pipe, command line parameters.

Given that file name is not protected, I would suggest to look instead at
the execution permission of the file. This information is protected by EVM.

In a second time, we could consider to enforce the policy in the interpreters
that every script must be executable, as suggested here:

https://lkml.org/lkml/2019/4/15/825

Roberto

HUAWEI TECHNOLOGIES Duesseldorf GmbH, HRB 56063
Managing Director: Li Peng, Li Jian, Shi Yanli

  reply	other threads:[~2020-03-30 16:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-30 12:27 [PATCH] integrity ima_policy : Select files by suffix Lev Olshvang
2020-03-30 16:45 ` Roberto Sassu [this message]
2020-03-30 17:21   ` Lev R. Oshvang .
2020-03-30 18:05     ` Mimi Zohar
2020-03-30 20:01       ` Lev R. Oshvang .

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=1244b6bcc384413581da33c9b92743b8@huawei.com \
    --to=roberto.sassu@huawei.com \
    --cc=Silviu.Vlasceanu@huawei.com \
    --cc=levonshe@gmail.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=zohar@us.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).