blob: 5c317cf8e0d405f4d1209cf421a6f5bbc32e7d07 [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.
Elliott Hughes83f08aa2025-02-06 17:14:58 -050014setgid32(gid_t) lp32
15setgid(gid_t) lp64
16setuid32(uid_t) lp32
17setuid(uid_t) lp64
18setregid32(gid_t, gid_t) lp32
19setregid(gid_t, gid_t) lp64
20setreuid32(uid_t, uid_t) lp32
21setreuid(uid_t, uid_t) lp64
22setresgid32(gid_t, gid_t, gid_t) lp32
23setresgid(gid_t, gid_t, gid_t) lp64
Martijn Coenene17fce12019-01-21 14:29:35 +010024# setresuid is explicitly allowed, see above.
Elliott Hughes83f08aa2025-02-06 17:14:58 -050025setfsgid32(gid_t) lp32
26setfsgid(gid_t) lp64
27setfsuid32(uid_t) lp32
28setfsuid(uid_t) lp64
29setgroups32(int, const gid_t*) lp32
30setgroups(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.
Elliott Hughes83f08aa2025-02-06 17:14:58 -050033adjtimex(struct timex*) all
34clock_adjtime(clockid_t, struct timex*) all
35clock_settime(clockid_t, const struct timespec*) all
36settimeofday(const struct timeval*, const struct timezone*) all
Victor Hsieh2f23ced2018-01-17 16:59:12 -080037
Elliott Hughes83f08aa2025-02-06 17:14:58 -050038acct(const char* filepath) all
39syslog(int, char*, int) all
40chroot(const char*) all
Victor Hsieh2f23ced2018-01-17 16:59:12 -080041
Elliott Hughes83f08aa2025-02-06 17:14:58 -050042init_module(void*, unsigned long, const char*) all
43delete_module(const char*, unsigned int) all
44mount(const char*, const char*, const char*, unsigned long, const void*) all
45umount2(const char*, int) all
46swapon(const char*, int) all
47swapoff(const char*) all
48setdomainname(const char*, size_t) all
49sethostname(const char*, size_t) all
50reboot(int, int, int, void*) all