diff --git a/private/app.te b/private/app.te index b79f447f11e80619df53b9655468b2f39d0ed5ef..d86d95f33ccd6074bb7ee7c7ca41d4390f685003 100644 --- a/private/app.te +++ b/private/app.te @@ -541,3 +541,12 @@ neverallow { -bluetooth -system_app } bluetooth_prop:file create_file_perms; + +# Apps cannot access proc_uid_time_in_state +neverallow appdomain proc_uid_time_in_state:file *; + +# Apps cannot access proc_uid_concurrent_active_time +neverallow appdomain proc_uid_concurrent_active_time:file *; + +# Apps cannot access proc_uid_concurrent_policy_time +neverallow appdomain proc_uid_concurrent_policy_time:file *; diff --git a/private/app_neverallows.te b/private/app_neverallows.te index 53638f7df2aec1934a5a5044ab199398af09a159..c4cbfd859586c0843b7a587084b2379f1c50614f 100644 --- a/private/app_neverallows.te +++ b/private/app_neverallows.te @@ -127,9 +127,6 @@ neverallow all_untrusted_apps { # Avoid all access to kernel configuration neverallow all_untrusted_apps config_gz:file { no_rw_file_perms no_x_file_perms }; -# Only system_server can access proc_uid_time_in_state -neverallow { domain -init -system_server } proc_uid_time_in_state:file *; - # Do not allow untrusted apps access to preloads data files neverallow all_untrusted_apps preloads_data_file:file no_rw_file_perms; diff --git a/private/compat/26.0/26.0.cil b/private/compat/26.0/26.0.cil index f7338c6eb4a35494a96b7ae1fc6257509c57a203..51eab2305c06236e8064e2677ad6be46a0d46f6c 100644 --- a/private/compat/26.0/26.0.cil +++ b/private/compat/26.0/26.0.cil @@ -473,6 +473,8 @@ proc_sched proc_swaps proc_uid_time_in_state + proc_uid_concurrent_active_time + proc_uid_concurrent_policy_time proc_uptime proc_version proc_vmallocinfo)) diff --git a/private/genfs_contexts b/private/genfs_contexts index 8e24f75f80d88a2b16e722b5b61dd37ecf29c43c..e0cafa48b94a11dfd6df0846fea820d5ef17f99a 100644 --- a/private/genfs_contexts +++ b/private/genfs_contexts @@ -74,6 +74,8 @@ genfscon proc /uid_cputime/remove_uid_range u:object_r:proc_uid_cputime_removeui genfscon proc /uid_io/stats u:object_r:proc_uid_io_stats:s0 genfscon proc /uid_procstat/set u:object_r:proc_uid_procstat_set:s0 genfscon proc /uid_time_in_state u:object_r:proc_uid_time_in_state:s0 +genfscon proc /uid_concurrent_active_time u:object_r:proc_uid_concurrent_active_time:s0 +genfscon proc /uid_concurrent_policy_time u:object_r:proc_uid_concurrent_policy_time:s0 genfscon proc /uptime u:object_r:proc_uptime:s0 genfscon proc /version u:object_r:proc_version:s0 genfscon proc /vmallocinfo u:object_r:proc_vmallocinfo:s0 diff --git a/private/system_server.te b/private/system_server.te index 2102391ce229ca1c997f6802315e0b054d53875e..7b0aad15021fb46c5814126438736649dec15d22 100644 --- a/private/system_server.te +++ b/private/system_server.te @@ -694,6 +694,8 @@ allow system_server { proc_stat proc_uid_cputime_showstat proc_uid_time_in_state + proc_uid_concurrent_active_time + proc_uid_concurrent_policy_time proc_version proc_vmallocinfo }:file r_file_perms; diff --git a/public/file.te b/public/file.te index d8677e8abb466b0be273563a4a953e7f9a4740aa..339f57d963f379ce90f02220e62cf156333ebb4a 100644 --- a/public/file.te +++ b/public/file.te @@ -52,6 +52,8 @@ type proc_uid_cputime_removeuid, fs_type; type proc_uid_io_stats, fs_type; type proc_uid_procstat_set, fs_type; type proc_uid_time_in_state, fs_type; +type proc_uid_concurrent_active_time, fs_type; +type proc_uid_concurrent_policy_time, fs_type; type proc_uptime, fs_type; type proc_version, fs_type; type proc_vmallocinfo, fs_type; diff --git a/public/vendor_init.te b/public/vendor_init.te index 5b9d09f4449a55598c664d5fcf077dffa7285932..ace58abe7b83ae505ad668e67404606910bed1e6 100644 --- a/public/vendor_init.te +++ b/public/vendor_init.te @@ -164,6 +164,8 @@ allow vendor_init { -sdcard_type -rootfs -proc_uid_time_in_state + -proc_uid_concurrent_active_time + -proc_uid_concurrent_policy_time }:file { open read setattr }; allow vendor_init { @@ -172,6 +174,8 @@ allow vendor_init { -sdcard_type -rootfs -proc_uid_time_in_state + -proc_uid_concurrent_active_time + -proc_uid_concurrent_policy_time }:dir { open read setattr search }; # chown/chmod on devices, e.g. /dev/ttyHS0