Skip to content

Commit d7ba853

Browse files
Yanzhu Huangjxwufan
authored andcommitted
ipe: Update documentation for script enforcement
This patch adds explanation of script enforcement mechanism in admin guide documentation. Describes how IPE supports integrity enforcement for indirectly executed scripts through the AT_EXECVE_CHECK flag, and how this differs from kernel enforcement for compiled executables. Signed-off-by: Yanzhu Huang <yanzhuhuang@linux.microsoft.com> Signed-off-by: Fan Wu <wufan@kernel.org>
1 parent 6767818 commit d7ba853

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

  • Documentation/admin-guide/LSM

Documentation/admin-guide/LSM/ipe.rst

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,20 @@ languages when these scripts are invoked by passing these program files
9595
to the interpreter. This is because the way interpreters execute these
9696
files; the scripts themselves are not evaluated as executable code
9797
through one of IPE's hooks, but they are merely text files that are read
98-
(as opposed to compiled executables) [#interpreters]_.
98+
(as opposed to compiled executables). However, with the introduction of the
99+
``AT_EXECVE_CHECK`` flag (:doc:`AT_EXECVE_CHECK </userspace-api/check_exec>`),
100+
interpreters can use it to signal the kernel that a script file will be executed,
101+
and request the kernel to perform LSM security checks on it.
102+
103+
IPE's EXECUTE operation enforcement differs between compiled executables and
104+
interpreted scripts: For compiled executables, enforcement is triggered
105+
automatically by the kernel during ``execve()``, ``execveat()``, ``mmap()``
106+
and ``mprotect()`` syscalls when loading executable content. For interpreted
107+
scripts, enforcement requires explicit interpreter integration using
108+
``execveat()`` with ``AT_EXECVE_CHECK`` flag. Unlike exec syscalls that IPE
109+
intercepts during the execution process, this mechanism needs the interpreter
110+
to take the initiative, and existing interpreters won't be automatically
111+
supported unless the signal call is added.
99112

100113
Threat Model
101114
------------
@@ -806,8 +819,6 @@ A:
806819

807820
.. [#digest_cache_lsm] https://lore.kernel.org/lkml/20240415142436.2545003-1-roberto.sassu@huaweicloud.com/
808821
809-
.. [#interpreters] There is `some interest in solving this issue <https://lore.kernel.org/lkml/20220321161557.495388-1-mic@digikod.net/>`_.
810-
811822
.. [#devdoc] Please see :doc:`the design docs </security/ipe>` for more on
812823
this topic.
813824

0 commit comments

Comments
 (0)