crash_dump: disallow ptrace of TCB components

Remove permissions and add neverallow assertion.

(cherry picked from commit f1554f1588)

Bug: 110107376
Test: kill -6 <components excluded from ptrace>
Change-Id: I2dc872f5c02749fbaf8ca6bc7e3e38404151442c
This commit is contained in:
Jeff Vander Stoep 2018-06-13 22:10:37 -07:00 committed by Nick Kralevich
parent ed16534eb5
commit 08aa715966
2 changed files with 25 additions and 8 deletions

View File

@ -1 +1,26 @@
typeattribute crash_dump coredomain;
allow crash_dump {
domain
-bpfloader
-crash_dump
-init
-kernel
-keystore
-logd
-ueventd
-vendor_init
-vold
}:process { ptrace signal sigchld sigstop sigkill };
neverallow crash_dump {
bpfloader
init
kernel
keystore
logd
userdebug_or_eng(`-logd')
ueventd
vendor_init
vold
}:process { ptrace signal sigstop sigkill };

View File

@ -1,14 +1,6 @@
type crash_dump, domain;
type crash_dump_exec, exec_type, file_type;
allow crash_dump {
domain
-init
-crash_dump
-keystore
-logd
}:process { ptrace signal sigchld sigstop sigkill };
# crash_dump might inherit CAP_SYS_PTRACE from a privileged process,
# which will result in an audit log even when it's allowed to trace.
dontaudit crash_dump self:global_capability_class_set { sys_ptrace };