blob: b9ecc02474421db8b49a6b8577198d27dcc5141a [file] [log] [blame]
Victor Hsiehdbb86702020-06-15 09:29:07 -07001# This file is used to populate seccomp's allowlist policy in combination with SYSCALLS.TXT.
Victor Hsieh2f23ced2018-01-17 16:59:12 -08002# Note that the resultant policy is applied only to zygote spawned processes.
3#
Victor Hsiehdbb86702020-06-15 09:29:07 -07004# The final seccomp allowlist is SYSCALLS.TXT - SECCOMP_BLOCKLIST.TXT + SECCOMP_ALLOWLIST.TXT
5# Any entry in the blocklist must be in the syscalls file and not be in the allowlist file
Victor Hsieh2f23ced2018-01-17 16:59:12 -08006#
Victor Hsieh2f23ced2018-01-17 16:59:12 -08007# This file is processed by a python script named genseccomp.py.
8
Elliott Hughesd55def82024-07-01 21:46:47 +00009# Syscalls to modify IDs.
10# Note: Some privileged syscalls are still needed in app_process after fork but
11# before uid change, including capset and setresuid. This is because the seccomp
12# filter must be installed while the process still has CAP_SYS_ADMIN; changing
13# the uid would remove that capability.
14int setgid32(gid_t) lp32
15int setgid(gid_t) lp64
16int setuid32(uid_t) lp32
17int setuid(uid_t) lp64
18int setregid32(gid_t, gid_t) lp32
19int setregid(gid_t, gid_t) lp64
20int setreuid32(uid_t, uid_t) lp32
21int setreuid(uid_t, uid_t) lp64
22int setresgid32(gid_t, gid_t, gid_t) lp32
23int setresgid(gid_t, gid_t, gid_t) lp64
Martijn Coenene17fce12019-01-21 14:29:35 +010024# setresuid is explicitly allowed, see above.
Elliott Hughesd55def82024-07-01 21:46:47 +000025int setfsgid32(gid_t) lp32
26int setfsgid(gid_t) lp64
27int setfsuid32(uid_t) lp32
28int setfsuid(uid_t) lp64
29int setgroups32(int, const gid_t*) lp32
30int setgroups(int, const gid_t*) lp64
Victor Hsieh2f23ced2018-01-17 16:59:12 -080031
Elliott Hughesd55def82024-07-01 21:46:47 +000032# Syscalls to modify times.
Victor Hsieh2f23ced2018-01-17 16:59:12 -080033int adjtimex(struct timex*) all
34int clock_adjtime(clockid_t, struct timex*) all
35int clock_settime(clockid_t, const struct timespec*) all
36int settimeofday(const struct timeval*, const struct timezone*) all
37
38int acct(const char* filepath) all
Elliott Hughesd55def82024-07-01 21:46:47 +000039int syslog(int, char*, int) all
Victor Hsieh2f23ced2018-01-17 16:59:12 -080040int chroot(const char*) all
41
Victor Hsieh2f23ced2018-01-17 16:59:12 -080042int init_module(void*, unsigned long, const char*) all
43int delete_module(const char*, unsigned int) all
44int mount(const char*, const char*, const char*, unsigned long, const void*) all
45int umount2(const char*, int) all
46int swapon(const char*, int) all
47int swapoff(const char*) all
48int setdomainname(const char*, size_t) all
49int sethostname(const char*, size_t) all
Elliott Hughesd55def82024-07-01 21:46:47 +000050int reboot(int, int, int, void*) all