diff --git a/public/domain_deprecated.te b/public/domain_deprecated.te index 4d1f2d0e321274ee0074ad5f38d2ff204084aaa5..e5feb9aab64ea28cad1e8cc4a544e7d6cfeeccd3 100644 --- a/public/domain_deprecated.te +++ b/public/domain_deprecated.te @@ -159,7 +159,6 @@ allow domain_deprecated proc_meminfo:file r_file_perms; userdebug_or_eng(` auditallow { domain_deprecated - -dumpstate -fsck -fsck_untrusted -rild @@ -170,7 +169,6 @@ auditallow { } proc:file r_file_perms; auditallow { domain_deprecated - -dumpstate -fsck -fsck_untrusted -rild @@ -179,7 +177,6 @@ auditallow { } proc:lnk_file { open ioctl lock }; # getattr read granted in domain auditallow { domain_deprecated - -dumpstate -fingerprintd -healthd -netd @@ -223,7 +220,6 @@ auditallow { auditallow { domain_deprecated -appdomain - -dumpstate -fingerprintd -healthd -inputflinger @@ -238,7 +234,6 @@ auditallow { auditallow { domain_deprecated -appdomain - -dumpstate -fingerprintd -healthd -inputflinger diff --git a/public/dumpstate.te b/public/dumpstate.te index d8801ea3d4e3c2034a8edd48367542dd13cbd125..39bd85fa7f592e7af327474d236e43d9c6737c07 100644 --- a/public/dumpstate.te +++ b/public/dumpstate.te @@ -1,5 +1,5 @@ # dumpstate -type dumpstate, domain, domain_deprecated, mlstrustedsubject; +type dumpstate, domain, mlstrustedsubject; type dumpstate_exec, exec_type, file_type; net_domain(dumpstate) @@ -28,6 +28,9 @@ allow dumpstate self:capability { allow dumpstate system_file:file execute_no_trans; allow dumpstate toolbox_exec:file rx_file_perms; +# hidl searches for files in /system/lib(64)/hw/ +allow dumpstate system_file:dir r_dir_perms; + # Create and write into /data/anr/ allow dumpstate self:capability { dac_override chown fowner fsetid }; allow dumpstate anr_data_file:dir rw_dir_perms; @@ -81,10 +84,19 @@ allow dumpstate sysfs_usb:file w_file_perms; # Other random bits of data we want to collect allow dumpstate qtaguid_proc:file r_file_perms; allow dumpstate debugfs:file r_file_perms; -# df for /storage/emulated needs search -allow dumpstate { block_device storage_file tmpfs }:dir { search getattr }; + +# df for +allow dumpstate { + block_device + cache_file + rootfs + selinuxfs + storage_file + tmpfs +}:dir { search getattr }; allow dumpstate fuse_device:chr_file getattr; allow dumpstate { dm_device cache_block_device }:blk_file getattr; +allow dumpstate { cache_file rootfs }:lnk_file { getattr read }; # Read /dev/cpuctl and /dev/cpuset r_dir_file(dumpstate, cgroup) @@ -136,7 +148,8 @@ read_logd(dumpstate) control_logd(dumpstate) read_runtime_log_tags(dumpstate) -# Read /proc and /proc/net +# Read files in /proc +allow dumpstate proc_meminfo:file r_file_perms; allow dumpstate proc_net:file r_file_perms; r_dir_file(dumpstate, proc) @@ -198,6 +211,9 @@ add_service(dumpstate, dumpstate_service) # use /dev/ion for screen capture allow dumpstate ion_device:chr_file r_file_perms; +# read default labeled files in /sys +r_dir_file(dumpstate, sysfs) + ### ### neverallow rules ###