From: Jasjiv Singh <jasjivsingh@linux.microsoft.com>
To: wufan@kernel.org, paul@paul-moore.com, jmorris@namei.org,
serge@hallyn.com, mic@digikod.net
Cc: linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org,
jasjivsingh_microsoft <jasjivsingh@linux.microsoft.com>
Subject: [RFC PATCH v1 0/1] ipe: added script enforcement with BPRM check
Date: Tue, 29 Apr 2025 14:22:49 -0700 [thread overview]
Message-ID: <1745961770-7188-1-git-send-email-jasjivsingh@linux.microsoft.com> (raw)
From: jasjivsingh_microsoft <jasjivsingh@linux.microsoft.com>
Currently, IPE only enforces the policy operations for direct
file execution (e.g. ./script.sh). However, indirect file execution
(e.g. sh script.sh) needs to be enforced by IPE based on the rules.
Overview
--------
This patch introduces the `ipe_bprm_creds_for_exec` LSM hook. This hook
specifically targets the `AT_EXECVE_CHECK` scenario [1], allowing IPE to
evaluate the `EXECUTE` operation policy for the script file during the
check phase itself.
[1] https://lore.kernel.org/linux-security-module/20241212174223.389435-1-mic@digikod.net/
Example
--------
ipe_op=EXECUTE ipe_hook=BPRM_CHECK enforcing=1 pid=18571 comm="inc"
path="/tmp/script/hello.inc" dev="tmpfs" ino=24 rule="DEFAULT action=DENY"
the log message when the IPE policy denies the indirect script execution
via the 'inc' test interpreter.
The IPE test suite has been updated to include script enforcement tests:
https://github.com/microsoft/ipe/tree/test-suite
jasjivsingh_microsoft (1):
ipe: add script enforcement with BPRM check
security/ipe/hooks.c | 23 +++++++++++++++++++++++
security/ipe/hooks.h | 2 ++
security/ipe/ipe.c | 1 +
3 files changed, 26 insertions(+)
--
2.34.1
next reply other threads:[~2025-04-29 21:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-29 21:22 Jasjiv Singh [this message]
2025-04-29 21:22 ` [RFC PATCH v1 1/1] ipe: add " Jasjiv Singh
2025-04-30 23:29 ` Fan Wu
2025-04-30 23:24 ` [RFC PATCH v1 0/1] ipe: added " Fan Wu
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=1745961770-7188-1-git-send-email-jasjivsingh@linux.microsoft.com \
--to=jasjivsingh@linux.microsoft.com \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=mic@digikod.net \
--cc=paul@paul-moore.com \
--cc=serge@hallyn.com \
--cc=wufan@kernel.org \
/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
all inboxes | Powered by JetHome®