60bb29fcdf
The following denial caused a presubmit failure: 06-15 15:16:24.176 956 956 I auditd : type=1400 audit(0.0:4): avc: denied { read write } for comm="crash_dump64" path="/dev/pts/3" dev="devpts" ino=6 scontext=u:r:crash_dump:s0 tcontext=u:object_r:devpts:s0 tclass=chr_file permissive=0 Suppress these denials. They are not needed by crash_dump and are only caused by the default behavior of sharing FDs across exec. Test: build Change-Id: I183f7a54e6b807fdf46b04d67dd4b819d4f0e507
49 lines
1,003 B
Text
49 lines
1,003 B
Text
typeattribute crash_dump coredomain;
|
|
|
|
# Crash dump does not need to access devices passed across exec().
|
|
dontaudit crash_dump { devpts dev_type }:chr_file { read write };
|
|
|
|
allow crash_dump {
|
|
domain
|
|
-apexd
|
|
-bpfloader
|
|
-crash_dump
|
|
-init
|
|
-kernel
|
|
-keystore
|
|
-llkd
|
|
-logd
|
|
-ueventd
|
|
-vendor_init
|
|
-vold
|
|
}:process { ptrace signal sigchld sigstop sigkill };
|
|
userdebug_or_eng(`
|
|
allow crash_dump { apexd llkd logd vold }:process { ptrace signal sigchld sigstop sigkill };
|
|
')
|
|
|
|
###
|
|
### neverallow assertions
|
|
###
|
|
|
|
# ptrace neverallow assertions are spread throughout the other policy
|
|
# files, so we avoid adding redundant assertions here
|
|
|
|
neverallow crash_dump {
|
|
apexd
|
|
userdebug_or_eng(`-apexd')
|
|
bpfloader
|
|
init
|
|
kernel
|
|
keystore
|
|
llkd
|
|
userdebug_or_eng(`-llkd')
|
|
logd
|
|
userdebug_or_eng(`-logd')
|
|
ueventd
|
|
vendor_init
|
|
vold
|
|
userdebug_or_eng(`-vold')
|
|
}:process { signal sigstop sigkill };
|
|
|
|
neverallow crash_dump self:process ptrace;
|
|
neverallow crash_dump gpu_device:chr_file *;
|