platform_bionic/libc/seccomp
Martijn Coenen d269d9b9e9 Add support for seccomp filter that limits setresuid/setresgid.
Add a new function that installs a seccomp filter that checks
all setresuid/setresgid syscalls to fall within the passed in
uid/gid range. It allows all other syscalls through. Therefore,
this filter is meant to be used in addition to one of the
regular whitelist syscall filters. (If multiple seccomp filters
are installed a in process, all filters are run, and the most
restrictive result is used).

Since the regular app and app_zygote seccomp filters block all
other calls to change uid/gid (setuid, setgid, setgroups,
setreuid, setregid, setfsuid), combining these filters prevents
the process from using any other uid/gid than the one passed as
arguments to the new function.

Bug: 111434506
Test: atest CtsSeccompHostTestCases
Change-Id: If330efdafbedd8e7d38ca81896a4dbb0bc49f431
2019-01-19 09:09:30 +01:00
..
include Add support for seccomp filter that limits setresuid/setresgid. 2019-01-19 09:09:30 +01:00
gen_syscall_nrs.cpp seccomp: Generate the policy files at compile time 2018-08-06 11:10:25 -07:00
gen_syscall_nrs_x86.cpp seccomp: Generate the policy files at compile time 2018-08-06 11:10:25 -07:00
gen_syscall_nrs_x86_64.cpp seccomp: Generate the policy files at compile time 2018-08-06 11:10:25 -07:00
seccomp_bpfs.h Create APP_ZYGOTE seccomp policy. 2019-01-19 09:09:30 +01:00
seccomp_policy.cpp Add support for seccomp filter that limits setresuid/setresgid. 2019-01-19 09:09:30 +01:00