From b083cc815376a8ccfba6535b4d59a396b77601d4 Mon Sep 17 00:00:00 2001 From: Mickaël Salaün Date: Thu, 12 Dec 2024 18:42:18 +0100 Subject: selftests/exec: Add 32 tests for AT_EXECVE_CHECK and exec securebits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Test that checks performed by execveat(..., AT_EXECVE_CHECK) are consistent with noexec mount points and file execute permissions. Test that SECBIT_EXEC_RESTRICT_FILE and SECBIT_EXEC_DENY_INTERACTIVE are inherited by child processes and that they can be pinned with the appropriate SECBIT_EXEC_RESTRICT_FILE_LOCKED and SECBIT_EXEC_DENY_INTERACTIVE_LOCKED bits. Cc: Al Viro Cc: Christian Brauner Cc: Kees Cook Cc: Paul Moore Cc: Serge Hallyn Signed-off-by: Mickaël Salaün Link: https://lore.kernel.org/r/20241212174223.389435-4-mic@digikod.net Signed-off-by: Kees Cook --- tools/testing/selftests/exec/false.c | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 tools/testing/selftests/exec/false.c (limited to 'tools/testing/selftests/exec/false.c') diff --git a/tools/testing/selftests/exec/false.c b/tools/testing/selftests/exec/false.c new file mode 100644 index 000000000000..104383ec3a79 --- /dev/null +++ b/tools/testing/selftests/exec/false.c @@ -0,0 +1,5 @@ +// SPDX-License-Identifier: GPL-2.0 +int main(void) +{ + return 1; +} -- cgit v1.2.3