Skip to content

Commit 8553d64

Browse files
dianpopaluminitavoicu
authored andcommitted
CI: add mprotect to the whitelist syscalls
Upon exec, a mprotect call is triggered. Since this syscall is not whitelisted the CI would fail with "Bad System Call". This is needed only in the CI. Signed-off-by: Diana Popa <[email protected]>
1 parent 9ab7e06 commit 8553d64

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

tests/integration_tests/security/demo_seccomp/src/bin/demo_malicious.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0
33
fn main() {
44
unsafe {
5-
// In this example, the malicious component is outputing to standard input.
5+
// In this example, the malicious component is outputting to standard input.
66
libc::syscall(libc::SYS_write, libc::STDIN_FILENO, "Hello, world!\n", 14);
77
}
88
}

tests/integration_tests/security/demo_seccomp/src/bin/seccomp_rules/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ pub fn jailer_required_rules() -> Vec<SyscallRuleSet> {
1818
allow_syscall(libc::SYS_rt_sigaction),
1919
allow_syscall(libc::SYS_execve),
2020
allow_syscall(libc::SYS_mmap),
21+
allow_syscall(libc::SYS_mprotect),
2122
#[cfg(target_arch = "x86_64")]
2223
allow_syscall(libc::SYS_arch_prctl),
2324
allow_syscall(libc::SYS_set_tid_address),

0 commit comments

Comments
 (0)