diff --git a/private/app.te b/private/app.te index 184629d05165801a695302bb921a60ecb57221a0..6a1afbe314988c0c63d97f0f00372f68493bbaf5 100644 --- a/private/app.te +++ b/private/app.te @@ -540,3 +540,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 83baf9260e25cbdeb93b8be90120b3f2d338b94c..47c58cabd603fdebbf8ac10dde80cb10451cd758 100644 --- a/private/compat/26.0/26.0.cil +++ b/private/compat/26.0/26.0.cil @@ -474,6 +474,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 6dd3e9f989f172d4d79a7a65c414d3f67579cfb1..f683a69511bbd3cf85e7275d6a72baca4d04d49e 100644 --- a/private/system_server.te +++ b/private/system_server.te @@ -696,6 +696,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 314405c480055a9b2201b67ff8400c0b0773e301..1870e36db919a08e3e3ab8ba639dd60e28c4cb9c 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