linux/security/ipe
Yanzhu Huang 67678189e4 ipe: Add AT_EXECVE_CHECK support for script enforcement
This patch adds a new ipe_bprm_creds_for_exec() hook that integrates
with the AT_EXECVE_CHECK mechanism. To enable script enforcement,
interpreters need to incorporate the AT_EXECVE_CHECK flag when
calling execveat() on script files before execution.

When a userspace interpreter calls execveat() with the AT_EXECVE_CHECK
flag, this hook triggers IPE policy evaluation on the script file. The
hook only triggers IPE when bprm->is_check is true, ensuring it's
being called from an AT_EXECVE_CHECK context. It then builds an
evaluation context for an IPE_OP_EXEC operation and invokes IPE policy.
The kernel returns the policy decision to the interpreter, which can
then decide whether to proceed with script execution.

This extends IPE enforcement to indirectly executed scripts, permitting
trusted scripts to execute while denying untrusted ones.

Signed-off-by: Yanzhu Huang <yanzhuhuang@linux.microsoft.com>
Signed-off-by: Fan Wu <wufan@kernel.org>
2025-12-02 19:37:01 -08:00
..
.gitignore scripts: add boot policy generation program 2024-08-20 14:03:39 -04:00
audit.c ipe: Add AT_EXECVE_CHECK support for script enforcement 2025-12-02 19:37:01 -08:00
audit.h ipe: add permissive toggle 2024-08-20 14:02:27 -04:00
digest.c ipe: add support for dm-verity as a trust provider 2024-08-20 14:02:45 -04:00
digest.h ipe: add support for dm-verity as a trust provider 2024-08-20 14:02:45 -04:00
eval.c ipe: enable support for fs-verity as a trust provider 2024-08-20 14:03:35 -04:00
eval.h ipe: enable support for fs-verity as a trust provider 2024-08-20 14:03:35 -04:00
fs.c ipe: don't bother with removal of files in directory we'll be removing 2025-06-17 18:10:53 -04:00
fs.h ipe: add userspace interface 2024-08-20 14:02:15 -04:00
hooks.c ipe: Add AT_EXECVE_CHECK support for script enforcement 2025-12-02 19:37:01 -08:00
hooks.h ipe: Add AT_EXECVE_CHECK support for script enforcement 2025-12-02 19:37:01 -08:00
ipe.c ipe: Add AT_EXECVE_CHECK support for script enforcement 2025-12-02 19:37:01 -08:00
ipe.h ipe: enable support for fs-verity as a trust provider 2024-08-20 14:03:35 -04:00
Kconfig ipe: use SHA-256 library API instead of crypto_shash API 2025-07-28 18:54:18 -07:00
Makefile ipe: kunit test for parser 2024-08-20 14:03:43 -04:00
policy.c ipe: add errno field to IPE policy load auditing 2025-05-27 18:08:51 -07:00
policy.h ipe: enable support for fs-verity as a trust provider 2024-08-20 14:03:35 -04:00
policy_fs.c ipe: don't bother with removal of files in directory we'll be removing 2025-06-17 18:10:53 -04:00
policy_parser.c ipe: enable support for fs-verity as a trust provider 2024-08-20 14:03:35 -04:00
policy_parser.h ipe: add policy parser 2024-08-20 14:01:00 -04:00
policy_tests.c ipe: Add missing terminator to list of unit tests 2024-09-23 15:53:37 -04:00