2018-01-18 01:59:12 +01:00
|
|
|
# This file is used to populate seccomp's whitelist policy in combination with SYSCALLS.TXT.
|
|
|
|
# Note that the resultant policy is applied only to zygote spawned processes.
|
|
|
|
#
|
|
|
|
# The final seccomp whitelist is SYSCALLS.TXT - SECCOMP_BLACKLIST.TXT + SECCOMP_WHITELIST.TXT
|
|
|
|
# Any entry in the blacklist must be in the syscalls file and not be in the whitelist file
|
|
|
|
#
|
|
|
|
# This file is processed by a python script named genseccomp.py.
|
|
|
|
|
2018-03-29 01:30:20 +02:00
|
|
|
# Note: Some privileged syscalls are still needed in app process after fork before uid change,
|
2019-01-21 14:29:35 +01:00
|
|
|
# including capset and setresuid. This is because the seccomp filter must be installed while
|
|
|
|
# the process still has CAP_SYS_ADMIN; changing the uid would remove that capability.
|
2018-03-29 01:30:20 +02:00
|
|
|
|
2018-01-18 01:59:12 +01:00
|
|
|
# syscalls to modify IDs
|
2020-02-13 23:21:55 +01:00
|
|
|
int setgid:setgid32(gid_t) lp32
|
|
|
|
int setgid:setgid(gid_t) lp64
|
|
|
|
int setuid:setuid32(uid_t) lp32
|
|
|
|
int setuid:setuid(uid_t) lp64
|
|
|
|
int setregid:setregid32(gid_t, gid_t) lp32
|
|
|
|
int setregid:setregid(gid_t, gid_t) lp64
|
|
|
|
int setreuid:setreuid32(uid_t, uid_t) lp32
|
|
|
|
int setreuid:setreuid(uid_t, uid_t) lp64
|
|
|
|
int setresgid:setresgid32(gid_t, gid_t, gid_t) lp32
|
|
|
|
int setresgid:setresgid(gid_t, gid_t, gid_t) lp64
|
2019-01-21 14:29:35 +01:00
|
|
|
# setresuid is explicitly allowed, see above.
|
2018-01-18 01:59:12 +01:00
|
|
|
int setfsgid(gid_t) all
|
|
|
|
int setfsuid(uid_t) all
|
2020-02-13 23:21:55 +01:00
|
|
|
int setgroups:setgroups32(int, const gid_t*) lp32
|
|
|
|
int setgroups:setgroups(int, const gid_t*) lp64
|
2018-01-18 01:59:12 +01:00
|
|
|
|
|
|
|
# syscalls to modify times
|
|
|
|
int adjtimex(struct timex*) all
|
|
|
|
int clock_adjtime(clockid_t, struct timex*) all
|
|
|
|
int clock_settime(clockid_t, const struct timespec*) all
|
|
|
|
int settimeofday(const struct timeval*, const struct timezone*) all
|
|
|
|
|
|
|
|
int acct(const char* filepath) all
|
|
|
|
int klogctl:syslog(int, char*, int) all
|
|
|
|
int chroot(const char*) all
|
|
|
|
|
|
|
|
# syscalls to change machine various configurations
|
|
|
|
int init_module(void*, unsigned long, const char*) all
|
|
|
|
int delete_module(const char*, unsigned int) all
|
|
|
|
int mount(const char*, const char*, const char*, unsigned long, const void*) all
|
|
|
|
int umount2(const char*, int) all
|
|
|
|
int swapon(const char*, int) all
|
|
|
|
int swapoff(const char*) all
|
|
|
|
int setdomainname(const char*, size_t) all
|
|
|
|
int sethostname(const char*, size_t) all
|
|
|
|
int __reboot:reboot(int, int, int, void*) all
|