-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnsjail.cfg
59 lines (53 loc) · 1.03 KB
/
nsjail.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: 'nsjail default profile for HOJ'
# naive mount uses bind mount to have access to /
mount {
src: '/'
dst: '/'
is_bind: true
}
# uncomment to enable debug mode
# log_level: DEBUG
# employ our own time limiter
time_limit: 0
cgroup_mem_parent: 'sandbox'
# need at least ~256KiB even for an empty main()
cgroup_mem_max: 262144
# disable CLONE_NEWIPC, CLONE_NEWNS to prevent overhead (~40ms)
# when reaping children, and yield more stable time measurements
clone_newipc: false
# this still has some issue :(
# clone_newns: false
# set allowed system calls
seccomp_string:
'ALLOW {'
' write,'
' execve,'
' brk,'
' access,'
' mmap,'
' open,'
' openat,'
' newfstat,'
' close,'
' read,'
' mprotect,'
' arch_prctl,'
' munmap,'
' getuid,'
' getgid,'
' getpid,'
' rt_sigaction,'
' geteuid,'
' getppid,'
' getcwd,'
' getegid,'
' ioctl,'
' fcntl,'
' newstat,'
' clone,'
' wait4,'
' rt_sigreturn,'
' exit_group,'
' lseek,'
' fadvise64'
'} DEFAULT KILL'