Inseob Kim | bbae4a9 | 2020-03-19 17:49:08 +0900 | [diff] [blame] | 1 | # Properties used only in /system |
2 | system_internal_prop(adbd_prop) | ||||
Richard Fung | 0c7c267 | 2021-11-08 20:09:54 +0000 | [diff] [blame] | 3 | system_internal_prop(apexd_payload_metadata_prop) |
David Anderson | 09bb944 | 2020-11-13 00:45:59 -0800 | [diff] [blame] | 4 | system_internal_prop(ctl_snapuserd_prop) |
Suren Baghdasaryan | 592e06c | 2021-08-04 12:31:43 -0700 | [diff] [blame] | 5 | system_internal_prop(device_config_lmkd_native_prop) |
Kalesh Singh | 9e25714 | 2022-04-06 14:31:26 -0700 | [diff] [blame] | 6 | system_internal_prop(device_config_mglru_native_prop) |
Yi Kong | 0ac0072 | 2020-10-27 02:29:52 +0800 | [diff] [blame] | 7 | system_internal_prop(device_config_profcollect_native_boot_prop) |
Vikram Gaur | e1c49f5 | 2022-09-29 21:20:22 +0000 | [diff] [blame] | 8 | system_internal_prop(device_config_remote_key_provisioning_native_prop) |
Tej Singh | dd0988f | 2020-11-17 19:26:23 -0800 | [diff] [blame] | 9 | system_internal_prop(device_config_statsd_native_prop) |
10 | system_internal_prop(device_config_statsd_native_boot_prop) | ||||
Inseob Kim | bbae4a9 | 2020-03-19 17:49:08 +0900 | [diff] [blame] | 11 | system_internal_prop(device_config_storage_native_boot_prop) |
12 | system_internal_prop(device_config_sys_traced_prop) | ||||
13 | system_internal_prop(device_config_window_manager_native_boot_prop) | ||||
14 | system_internal_prop(device_config_configuration_prop) | ||||
Xiao Ma | 2d6c9f0 | 2021-02-02 10:27:38 +0000 | [diff] [blame] | 15 | system_internal_prop(device_config_connectivity_prop) |
Nick Chalko | 81a4dd4 | 2021-02-11 09:12:51 -0800 | [diff] [blame] | 16 | system_internal_prop(device_config_swcodec_native_prop) |
Alexander Potapenko | 0a64d10 | 2022-01-28 19:48:27 +0100 | [diff] [blame] | 17 | system_internal_prop(dmesgd_start_prop) |
Hongguang Chen | 91a5f4e | 2020-04-23 23:43:13 -0700 | [diff] [blame] | 18 | system_internal_prop(fastbootd_protocol_prop) |
Inseob Kim | bbae4a9 | 2020-03-19 17:49:08 +0900 | [diff] [blame] | 19 | system_internal_prop(gsid_prop) |
20 | system_internal_prop(init_perf_lsm_hooks_prop) | ||||
Inseob Kim | 15e5e0a | 2020-05-14 19:43:08 +0900 | [diff] [blame] | 21 | system_internal_prop(init_service_status_private_prop) |
Suren Baghdasaryan | 9fdb298 | 2022-09-07 13:13:47 -0700 | [diff] [blame] | 22 | system_internal_prop(init_storage_prop) |
Inseob Kim | bbae4a9 | 2020-03-19 17:49:08 +0900 | [diff] [blame] | 23 | system_internal_prop(init_svc_debug_prop) |
Hasini Gunasinghe | 4fa6b1a | 2021-07-02 23:14:50 +0000 | [diff] [blame] | 24 | system_internal_prop(keystore_crash_prop) |
Paul Crowley | b0c5571 | 2021-02-23 08:40:05 -0800 | [diff] [blame] | 25 | system_internal_prop(keystore_listen_prop) |
Inseob Kim | bbae4a9 | 2020-03-19 17:49:08 +0900 | [diff] [blame] | 26 | system_internal_prop(last_boot_reason_prop) |
Alexander Mishkovets | f0be89b | 2020-07-08 23:11:03 +0200 | [diff] [blame] | 27 | system_internal_prop(localization_prop) |
Primiano Tucci | cd45230 | 2020-10-09 09:15:10 +0100 | [diff] [blame] | 28 | system_internal_prop(lower_kptr_restrict_prop) |
Lorenzo Colitti | 082ebd2 | 2021-03-10 14:45:07 +0900 | [diff] [blame] | 29 | system_internal_prop(net_464xlat_fromvendor_prop) |
Lorenzo Colitti | 26d3d4a | 2021-03-10 15:31:36 +0900 | [diff] [blame] | 30 | system_internal_prop(net_connectivity_prop) |
Inseob Kim | bbae4a9 | 2020-03-19 17:49:08 +0900 | [diff] [blame] | 31 | system_internal_prop(netd_stable_secret_prop) |
Martijn Coenen | f2e4ee6 | 2021-03-16 08:34:30 +0100 | [diff] [blame] | 32 | system_internal_prop(odsign_prop) |
Michael Rosenfeld | 3ccbebb | 2021-02-10 18:45:35 -0800 | [diff] [blame] | 33 | system_internal_prop(perf_drop_caches_prop) |
Inseob Kim | bbae4a9 | 2020-03-19 17:49:08 +0900 | [diff] [blame] | 34 | system_internal_prop(pm_prop) |
Yi Kong | 9b65845 | 2021-03-22 22:02:22 +0800 | [diff] [blame] | 35 | system_internal_prop(profcollectd_node_id_prop) |
Nazanin | b373dd0 | 2021-04-29 21:52:42 -0700 | [diff] [blame] | 36 | system_internal_prop(radio_cdma_ecm_prop) |
Andrew Scull | edba76d | 2022-10-31 18:27:29 +0000 | [diff] [blame] | 37 | system_internal_prop(remote_prov_prop) |
JW Wang | 0f8cf04 | 2021-02-24 14:29:06 +0800 | [diff] [blame] | 38 | system_internal_prop(rollback_test_prop) |
Inseob Kim | d5a0448 | 2020-11-05 22:17:26 +0900 | [diff] [blame] | 39 | system_internal_prop(setupwizard_prop) |
David Anderson | bf5b6ce | 2021-07-26 15:03:11 -0700 | [diff] [blame] | 40 | system_internal_prop(snapuserd_prop) |
Inseob Kim | bbae4a9 | 2020-03-19 17:49:08 +0900 | [diff] [blame] | 41 | system_internal_prop(system_adbd_prop) |
Neil Fuller | bbb00fa | 2022-09-23 14:10:35 +0100 | [diff] [blame] | 42 | system_internal_prop(timezone_metadata_prop) |
Inseob Kim | bbae4a9 | 2020-03-19 17:49:08 +0900 | [diff] [blame] | 43 | system_internal_prop(traced_perf_enabled_prop) |
Hongguang | 9515559 | 2022-08-09 14:57:02 -0700 | [diff] [blame] | 44 | system_internal_prop(tuner_server_ctl_prop) |
Inseob Kim | bbae4a9 | 2020-03-19 17:49:08 +0900 | [diff] [blame] | 45 | system_internal_prop(userspace_reboot_log_prop) |
46 | system_internal_prop(userspace_reboot_test_prop) | ||||
Inseob Kim | d5a0448 | 2020-11-05 22:17:26 +0900 | [diff] [blame] | 47 | system_internal_prop(verity_status_prop) |
48 | system_internal_prop(zygote_wrap_prop) | ||||
hkuang | de370e5 | 2021-05-14 12:52:54 -0700 | [diff] [blame] | 49 | system_internal_prop(ctl_mediatranscoding_prop) |
Martijn Coenen | 5f21a0f | 2021-07-27 13:47:42 +0200 | [diff] [blame] | 50 | system_internal_prop(ctl_odsign_prop) |
Jiyong Park | b804de2 | 2021-09-16 21:06:20 +0900 | [diff] [blame] | 51 | system_internal_prop(virtualizationservice_prop) |
Jooyung Han | ccfb0ef | 2022-07-07 15:42:39 +0900 | [diff] [blame] | 52 | system_internal_prop(ctl_apex_load_prop) |
Inseob Kim | bbae4a9 | 2020-03-19 17:49:08 +0900 | [diff] [blame] | 53 | |
Pontus Lidman | 0af0e71 | 2023-07-20 19:09:48 +0000 | [diff] [blame^] | 54 | system_internal_prop(sensors_config_prop) |
55 | |||||
Andrew Scull | aedd65a | 2021-10-08 12:13:46 +0000 | [diff] [blame] | 56 | # Properties which can't be written outside system |
57 | system_restricted_prop(device_config_virtualization_framework_native_prop) | ||||
Jiyong Park | c4f84bc | 2022-09-18 23:09:53 +0900 | [diff] [blame] | 58 | system_restricted_prop(log_file_logger_prop) |
Alexander Roederer | 829d974 | 2023-03-23 02:19:22 +0000 | [diff] [blame] | 59 | system_restricted_prop(persist_sysui_builder_extras_prop) |
Alexander Roederer | 584a862 | 2023-05-31 21:25:50 +0000 | [diff] [blame] | 60 | system_restricted_prop(persist_sysui_ranking_update_prop) |
Andrew Scull | aedd65a | 2021-10-08 12:13:46 +0000 | [diff] [blame] | 61 | |
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 62 | ### |
63 | ### Neverallow rules | ||||
64 | ### | ||||
65 | |||||
66 | treble_sysprop_neverallow(` | ||||
67 | |||||
Inseob Kim | afc0993 | 2020-09-28 13:32:43 +0900 | [diff] [blame] | 68 | enforce_sysprop_owner(` |
69 | neverallow domain { | ||||
70 | property_type | ||||
71 | -system_property_type | ||||
72 | -product_property_type | ||||
73 | -vendor_property_type | ||||
74 | }:file no_rw_file_perms; | ||||
75 | ') | ||||
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 76 | |
77 | neverallow { domain -coredomain } { | ||||
78 | system_property_type | ||||
79 | system_internal_property_type | ||||
80 | -system_restricted_property_type | ||||
81 | -system_public_property_type | ||||
82 | }:file no_rw_file_perms; | ||||
83 | |||||
84 | neverallow { domain -coredomain } { | ||||
85 | system_property_type | ||||
86 | -system_public_property_type | ||||
87 | }:property_service set; | ||||
88 | |||||
89 | # init is in coredomain, but should be able to read/write all props. | ||||
90 | # dumpstate is also in coredomain, but should be able to read all props. | ||||
91 | neverallow { coredomain -init -dumpstate } { | ||||
92 | vendor_property_type | ||||
93 | vendor_internal_property_type | ||||
94 | -vendor_restricted_property_type | ||||
95 | -vendor_public_property_type | ||||
96 | }:file no_rw_file_perms; | ||||
97 | |||||
98 | neverallow { coredomain -init } { | ||||
99 | vendor_property_type | ||||
100 | -vendor_public_property_type | ||||
101 | }:property_service set; | ||||
102 | |||||
103 | ') | ||||
104 | |||||
105 | # There is no need to perform ioctl or advisory locking operations on | ||||
106 | # property files. If this neverallow is being triggered, it is | ||||
107 | # likely that the policy is using r_file_perms directly instead of | ||||
108 | # the get_prop() macro. | ||||
109 | neverallow domain property_type:file { ioctl lock }; | ||||
110 | |||||
111 | neverallow * { | ||||
112 | core_property_type | ||||
113 | -audio_prop | ||||
114 | -config_prop | ||||
115 | -cppreopt_prop | ||||
116 | -dalvik_prop | ||||
117 | -debuggerd_prop | ||||
118 | -debug_prop | ||||
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 119 | -dhcp_prop |
120 | -dumpstate_prop | ||||
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 121 | -fingerprint_prop |
122 | -logd_prop | ||||
123 | -net_radio_prop | ||||
124 | -nfc_prop | ||||
125 | -ota_prop | ||||
126 | -pan_result_prop | ||||
127 | -persist_debug_prop | ||||
128 | -powerctl_prop | ||||
129 | -radio_prop | ||||
130 | -restorecon_prop | ||||
131 | -shell_prop | ||||
132 | -system_prop | ||||
Inseob Kim | dc1e501 | 2020-04-27 21:13:01 +0900 | [diff] [blame] | 133 | -usb_prop |
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 134 | -vold_prop |
135 | }:file no_rw_file_perms; | ||||
136 | |||||
137 | # sigstop property is only used for debugging; should only be set by su which is permissive | ||||
138 | # for userdebug/eng | ||||
139 | neverallow { | ||||
140 | domain | ||||
141 | -init | ||||
142 | -vendor_init | ||||
143 | } ctl_sigstop_prop:property_service set; | ||||
144 | |||||
145 | # Don't audit legacy ctl. property handling. We only want the newer permission check to appear | ||||
146 | # in the audit log | ||||
147 | dontaudit domain { | ||||
148 | ctl_bootanim_prop | ||||
149 | ctl_bugreport_prop | ||||
150 | ctl_console_prop | ||||
151 | ctl_default_prop | ||||
152 | ctl_dumpstate_prop | ||||
153 | ctl_fuse_prop | ||||
154 | ctl_mdnsd_prop | ||||
155 | ctl_rildaemon_prop | ||||
156 | }:property_service set; | ||||
157 | |||||
158 | neverallow { | ||||
159 | domain | ||||
160 | -init | ||||
Suren Baghdasaryan | 9fdb298 | 2022-09-07 13:13:47 -0700 | [diff] [blame] | 161 | -extra_free_kbytes |
162 | } init_storage_prop:property_service set; | ||||
163 | |||||
164 | neverallow { | ||||
165 | domain | ||||
166 | -init | ||||
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 167 | } init_svc_debug_prop:property_service set; |
168 | |||||
169 | neverallow { | ||||
170 | domain | ||||
171 | -init | ||||
172 | -dumpstate | ||||
173 | userdebug_or_eng(`-su') | ||||
174 | } init_svc_debug_prop:file no_rw_file_perms; | ||||
175 | |||||
176 | compatible_property_only(` | ||||
177 | # Prevent properties from being set | ||||
178 | neverallow { | ||||
179 | domain | ||||
180 | -coredomain | ||||
181 | -appdomain | ||||
182 | -vendor_init | ||||
183 | } { | ||||
184 | core_property_type | ||||
185 | extended_core_property_type | ||||
186 | exported_config_prop | ||||
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 187 | exported_default_prop |
188 | exported_dumpstate_prop | ||||
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 189 | exported_system_prop |
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 190 | exported3_system_prop |
Inseob Kim | dc1e501 | 2020-04-27 21:13:01 +0900 | [diff] [blame] | 191 | usb_control_prop |
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 192 | -nfc_prop |
193 | -powerctl_prop | ||||
194 | -radio_prop | ||||
195 | }:property_service set; | ||||
196 | |||||
197 | neverallow { | ||||
198 | domain | ||||
199 | -coredomain | ||||
200 | -appdomain | ||||
201 | -hal_nfc_server | ||||
202 | } { | ||||
203 | nfc_prop | ||||
204 | }:property_service set; | ||||
205 | |||||
206 | neverallow { | ||||
207 | domain | ||||
208 | -coredomain | ||||
209 | -appdomain | ||||
210 | -hal_telephony_server | ||||
211 | -vendor_init | ||||
212 | } { | ||||
Inseob Kim | acd02fc | 2020-07-28 15:17:24 +0900 | [diff] [blame] | 213 | radio_control_prop |
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 214 | }:property_service set; |
215 | |||||
216 | neverallow { | ||||
217 | domain | ||||
218 | -coredomain | ||||
219 | -appdomain | ||||
220 | -hal_telephony_server | ||||
221 | } { | ||||
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 222 | radio_prop |
223 | }:property_service set; | ||||
224 | |||||
225 | neverallow { | ||||
226 | domain | ||||
227 | -coredomain | ||||
228 | -bluetooth | ||||
229 | -hal_bluetooth_server | ||||
230 | } { | ||||
231 | bluetooth_prop | ||||
232 | }:property_service set; | ||||
233 | |||||
234 | neverallow { | ||||
235 | domain | ||||
236 | -coredomain | ||||
237 | -bluetooth | ||||
238 | -hal_bluetooth_server | ||||
239 | -vendor_init | ||||
240 | } { | ||||
241 | exported_bluetooth_prop | ||||
242 | }:property_service set; | ||||
243 | |||||
244 | neverallow { | ||||
245 | domain | ||||
246 | -coredomain | ||||
247 | -hal_camera_server | ||||
248 | -cameraserver | ||||
249 | -vendor_init | ||||
250 | } { | ||||
251 | exported_camera_prop | ||||
252 | }:property_service set; | ||||
253 | |||||
254 | neverallow { | ||||
255 | domain | ||||
256 | -coredomain | ||||
257 | -hal_wifi_server | ||||
258 | -wificond | ||||
259 | } { | ||||
260 | wifi_prop | ||||
261 | }:property_service set; | ||||
262 | |||||
263 | neverallow { | ||||
264 | domain | ||||
Inseob Kim | 3dbf3d8 | 2020-06-25 21:20:42 +0900 | [diff] [blame] | 265 | -init |
266 | -dumpstate | ||||
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 267 | -hal_wifi_server |
268 | -wificond | ||||
269 | -vendor_init | ||||
270 | } { | ||||
Inseob Kim | 3dbf3d8 | 2020-06-25 21:20:42 +0900 | [diff] [blame] | 271 | wifi_hal_prop |
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 272 | }:property_service set; |
273 | |||||
274 | # Prevent properties from being read | ||||
275 | neverallow { | ||||
276 | domain | ||||
277 | -coredomain | ||||
278 | -appdomain | ||||
279 | -vendor_init | ||||
280 | } { | ||||
281 | core_property_type | ||||
Jiakai Zhang | 22fb5c7 | 2023-03-30 15:50:05 +0100 | [diff] [blame] | 282 | dalvik_config_prop_type |
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 283 | extended_core_property_type |
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 284 | exported3_system_prop |
Inseob Kim | fd2d6ec | 2020-04-01 10:01:16 +0900 | [diff] [blame] | 285 | systemsound_config_prop |
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 286 | -debug_prop |
287 | -logd_prop | ||||
288 | -nfc_prop | ||||
289 | -powerctl_prop | ||||
290 | -radio_prop | ||||
291 | }:file no_rw_file_perms; | ||||
292 | |||||
293 | neverallow { | ||||
294 | domain | ||||
295 | -coredomain | ||||
296 | -appdomain | ||||
297 | -hal_nfc_server | ||||
298 | } { | ||||
299 | nfc_prop | ||||
300 | }:file no_rw_file_perms; | ||||
301 | |||||
302 | neverallow { | ||||
303 | domain | ||||
304 | -coredomain | ||||
305 | -appdomain | ||||
306 | -hal_telephony_server | ||||
307 | } { | ||||
308 | radio_prop | ||||
309 | }:file no_rw_file_perms; | ||||
310 | |||||
311 | neverallow { | ||||
312 | domain | ||||
313 | -coredomain | ||||
314 | -bluetooth | ||||
315 | -hal_bluetooth_server | ||||
316 | } { | ||||
317 | bluetooth_prop | ||||
318 | }:file no_rw_file_perms; | ||||
319 | |||||
320 | neverallow { | ||||
321 | domain | ||||
322 | -coredomain | ||||
323 | -hal_wifi_server | ||||
324 | -wificond | ||||
325 | } { | ||||
326 | wifi_prop | ||||
327 | }:file no_rw_file_perms; | ||||
Benjamin Schwartz | 3e4d97b | 2020-10-30 13:55:21 -0700 | [diff] [blame] | 328 | |
329 | neverallow { | ||||
330 | domain | ||||
Benjamin Schwartz | c171a1d | 2021-04-20 09:13:02 -0700 | [diff] [blame] | 331 | -coredomain |
332 | -vendor_init | ||||
Benjamin Schwartz | 3e4d97b | 2020-10-30 13:55:21 -0700 | [diff] [blame] | 333 | } { |
334 | suspend_prop | ||||
335 | }:property_service set; | ||||
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 336 | ') |
337 | |||||
338 | compatible_property_only(` | ||||
339 | # Neverallow coredomain to set vendor properties | ||||
340 | neverallow { | ||||
341 | coredomain | ||||
342 | -init | ||||
343 | -system_writes_vendor_properties_violators | ||||
344 | } { | ||||
345 | property_type | ||||
346 | -system_property_type | ||||
347 | -extended_core_property_type | ||||
348 | }:property_service set; | ||||
349 | ') | ||||
350 | |||||
351 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 352 | domain |
Inseob Kim | bfb3708 | 2020-04-27 23:49:15 +0900 | [diff] [blame] | 353 | -coredomain |
354 | -vendor_init | ||||
355 | } { | ||||
356 | ffs_config_prop | ||||
357 | ffs_control_prop | ||||
358 | }:file no_rw_file_perms; | ||||
359 | |||||
360 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 361 | domain |
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 362 | -init |
363 | -system_server | ||||
364 | } { | ||||
365 | userspace_reboot_log_prop | ||||
366 | }:property_service set; | ||||
367 | |||||
368 | neverallow { | ||||
369 | # Only allow init and system_server to set system_adbd_prop | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 370 | domain |
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 371 | -init |
372 | -system_server | ||||
373 | } { | ||||
374 | system_adbd_prop | ||||
375 | }:property_service set; | ||||
376 | |||||
Josh Gao | 0cac6fd | 2020-10-28 13:56:23 -0700 | [diff] [blame] | 377 | # Let (vendor_)init, adbd, and system_server set service.adb.tcp.port |
378 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 379 | domain |
Josh Gao | 0cac6fd | 2020-10-28 13:56:23 -0700 | [diff] [blame] | 380 | -init |
381 | -vendor_init | ||||
382 | -adbd | ||||
383 | -system_server | ||||
384 | } { | ||||
385 | adbd_config_prop | ||||
386 | }:property_service set; | ||||
387 | |||||
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 388 | neverallow { |
389 | # Only allow init and adbd to set adbd_prop | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 390 | domain |
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 391 | -init |
392 | -adbd | ||||
393 | } { | ||||
394 | adbd_prop | ||||
395 | }:property_service set; | ||||
396 | |||||
397 | neverallow { | ||||
Richard Fung | 0c7c267 | 2021-11-08 20:09:54 +0000 | [diff] [blame] | 398 | # Only allow init to set apexd_payload_metadata_prop |
399 | domain | ||||
400 | -init | ||||
401 | } { | ||||
402 | apexd_payload_metadata_prop | ||||
403 | }:property_service set; | ||||
404 | |||||
405 | |||||
406 | neverallow { | ||||
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 407 | # Only allow init and shell to set userspace_reboot_test_prop |
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 408 | domain |
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 409 | -init |
410 | -shell | ||||
411 | } { | ||||
412 | userspace_reboot_test_prop | ||||
413 | }:property_service set; | ||||
Inseob Kim | 721d921 | 2020-04-24 21:25:17 +0900 | [diff] [blame] | 414 | |
415 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 416 | domain |
Inseob Kim | 721d921 | 2020-04-24 21:25:17 +0900 | [diff] [blame] | 417 | -init |
418 | -system_server | ||||
419 | -vendor_init | ||||
420 | } { | ||||
421 | surfaceflinger_color_prop | ||||
422 | }:property_service set; | ||||
Inseob Kim | 9add20f | 2020-05-06 22:20:35 +0900 | [diff] [blame] | 423 | |
424 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 425 | domain |
Inseob Kim | 9add20f | 2020-05-06 22:20:35 +0900 | [diff] [blame] | 426 | -init |
427 | } { | ||||
428 | libc_debug_prop | ||||
429 | }:property_service set; | ||||
Inseob Kim | 36aeb16 | 2020-05-08 20:42:25 +0900 | [diff] [blame] | 430 | |
Mitch Phillips | 8cd32cd | 2022-03-22 15:59:57 -0700 | [diff] [blame] | 431 | # Allow the shell to set MTE & GWP-ASan props, so that non-root users with adb |
432 | # shell access can control the settings on their device. Allow system apps to | ||||
433 | # set MTE props, so Developer Options can set them. | ||||
Mitch Phillips | eaf1404 | 2020-12-03 17:23:06 -0800 | [diff] [blame] | 434 | neverallow { |
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 435 | domain |
Mitch Phillips | eaf1404 | 2020-12-03 17:23:06 -0800 | [diff] [blame] | 436 | -init |
437 | -shell | ||||
Florian Mayer | 39f29f7 | 2021-12-21 12:06:31 -0800 | [diff] [blame] | 438 | -system_app |
Florian Mayer | 152f832 | 2022-12-16 16:50:13 -0800 | [diff] [blame] | 439 | -system_server |
Florian Mayer | 51382a3 | 2022-09-21 14:53:48 -0700 | [diff] [blame] | 440 | -mtectrl |
Mitch Phillips | eaf1404 | 2020-12-03 17:23:06 -0800 | [diff] [blame] | 441 | } { |
442 | arm64_memtag_prop | ||||
Mitch Phillips | 8cd32cd | 2022-03-22 15:59:57 -0700 | [diff] [blame] | 443 | gwp_asan_prop |
Mitch Phillips | eaf1404 | 2020-12-03 17:23:06 -0800 | [diff] [blame] | 444 | }:property_service set; |
445 | |||||
Inseob Kim | 36aeb16 | 2020-05-08 20:42:25 +0900 | [diff] [blame] | 446 | neverallow { |
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 447 | domain |
Inseob Kim | 36aeb16 | 2020-05-08 20:42:25 +0900 | [diff] [blame] | 448 | -init |
449 | -system_server | ||||
450 | -vendor_init | ||||
451 | } zram_control_prop:property_service set; | ||||
Inseob Kim | 1337e15 | 2020-05-12 22:51:48 +0900 | [diff] [blame] | 452 | |
453 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 454 | domain |
Inseob Kim | 1337e15 | 2020-05-12 22:51:48 +0900 | [diff] [blame] | 455 | -init |
456 | -system_server | ||||
457 | -vendor_init | ||||
458 | } dalvik_runtime_prop:property_service set; | ||||
Inseob Kim | dc1e501 | 2020-04-27 21:13:01 +0900 | [diff] [blame] | 459 | |
460 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 461 | domain |
Inseob Kim | dc1e501 | 2020-04-27 21:13:01 +0900 | [diff] [blame] | 462 | -coredomain |
463 | -vendor_init | ||||
464 | } { | ||||
465 | usb_config_prop | ||||
466 | usb_control_prop | ||||
467 | }:property_service set; | ||||
Inseob Kim | 3b82aec | 2020-05-14 01:38:40 +0900 | [diff] [blame] | 468 | |
469 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 470 | domain |
Inseob Kim | 3b82aec | 2020-05-14 01:38:40 +0900 | [diff] [blame] | 471 | -init |
472 | -system_server | ||||
473 | } { | ||||
474 | provisioned_prop | ||||
475 | retaildemo_prop | ||||
476 | }:property_service set; | ||||
477 | |||||
478 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 479 | domain |
Inseob Kim | 3b82aec | 2020-05-14 01:38:40 +0900 | [diff] [blame] | 480 | -coredomain |
481 | -vendor_init | ||||
482 | } { | ||||
483 | provisioned_prop | ||||
484 | retaildemo_prop | ||||
485 | }:file no_rw_file_perms; | ||||
Inseob Kim | 15e5e0a | 2020-05-14 19:43:08 +0900 | [diff] [blame] | 486 | |
487 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 488 | domain |
Inseob Kim | 15e5e0a | 2020-05-14 19:43:08 +0900 | [diff] [blame] | 489 | -init |
490 | } { | ||||
491 | init_service_status_private_prop | ||||
492 | init_service_status_prop | ||||
493 | }:property_service set; | ||||
Inseob Kim | ad63170 | 2020-05-14 21:47:43 +0900 | [diff] [blame] | 494 | |
495 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 496 | domain |
Inseob Kim | ad63170 | 2020-05-14 21:47:43 +0900 | [diff] [blame] | 497 | -init |
498 | -radio | ||||
499 | -appdomain | ||||
500 | -hal_telephony_server | ||||
Inseob Kim | 285da2f | 2020-06-04 20:29:43 +0900 | [diff] [blame] | 501 | not_compatible_property(`-vendor_init') |
Inseob Kim | ad63170 | 2020-05-14 21:47:43 +0900 | [diff] [blame] | 502 | } telephony_status_prop:property_service set; |
Peiyong Lin | 37dea07 | 2020-06-03 12:20:41 -0700 | [diff] [blame] | 503 | |
504 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 505 | domain |
Peiyong Lin | 37dea07 | 2020-06-03 12:20:41 -0700 | [diff] [blame] | 506 | -init |
507 | -vendor_init | ||||
508 | } { | ||||
509 | graphics_config_prop | ||||
510 | }:property_service set; | ||||
Inseob Kim | 6ffdf1b | 2020-06-16 20:00:41 +0900 | [diff] [blame] | 511 | |
512 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 513 | domain |
Amy Hsu | 0f352fb | 2020-06-15 17:04:12 +0800 | [diff] [blame] | 514 | -init |
Midas Chien | 0d0391f | 2020-06-17 22:13:21 +0800 | [diff] [blame] | 515 | -surfaceflinger |
Amy Hsu | 0f352fb | 2020-06-15 17:04:12 +0800 | [diff] [blame] | 516 | } { |
517 | surfaceflinger_display_prop | ||||
518 | }:property_service set; | ||||
519 | |||||
Inseob Kim | 072b014 | 2020-06-16 20:00:41 +0900 | [diff] [blame] | 520 | neverallow { |
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 521 | domain |
Inseob Kim | 5eacf72 | 2020-07-01 01:27:49 +0900 | [diff] [blame] | 522 | -coredomain |
523 | -appdomain | ||||
Inseob Kim | 6ffdf1b | 2020-06-16 20:00:41 +0900 | [diff] [blame] | 524 | -vendor_init |
Inseob Kim | 6ffdf1b | 2020-06-16 20:00:41 +0900 | [diff] [blame] | 525 | } packagemanager_config_prop:file no_rw_file_perms; |
Inseob Kim | 04f435c | 2020-07-07 12:46:24 +0900 | [diff] [blame] | 526 | |
527 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 528 | domain |
Inseob Kim | 04f435c | 2020-07-07 12:46:24 +0900 | [diff] [blame] | 529 | -coredomain |
530 | -vendor_init | ||||
531 | } keyguard_config_prop:file no_rw_file_perms; | ||||
Alexander Mishkovets | f0be89b | 2020-07-08 23:11:03 +0200 | [diff] [blame] | 532 | |
533 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 534 | domain |
Alexander Mishkovets | f0be89b | 2020-07-08 23:11:03 +0200 | [diff] [blame] | 535 | -init |
536 | } { | ||||
537 | localization_prop | ||||
538 | }:property_service set; | ||||
Inseob Kim | c80b024 | 2020-07-16 22:25:47 +0900 | [diff] [blame] | 539 | |
540 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 541 | domain |
Inseob Kim | c80b024 | 2020-07-16 22:25:47 +0900 | [diff] [blame] | 542 | -init |
543 | -vendor_init | ||||
544 | -dumpstate | ||||
545 | -system_app | ||||
546 | } oem_unlock_prop:file no_rw_file_perms; | ||||
547 | |||||
548 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 549 | domain |
Inseob Kim | c80b024 | 2020-07-16 22:25:47 +0900 | [diff] [blame] | 550 | -coredomain |
551 | -vendor_init | ||||
552 | } storagemanager_config_prop:file no_rw_file_perms; | ||||
553 | |||||
554 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 555 | domain |
Inseob Kim | c80b024 | 2020-07-16 22:25:47 +0900 | [diff] [blame] | 556 | -init |
557 | -vendor_init | ||||
558 | -dumpstate | ||||
559 | -appdomain | ||||
560 | } sendbug_config_prop:file no_rw_file_perms; | ||||
Inseob Kim | c97a97c | 2020-07-20 20:26:07 +0900 | [diff] [blame] | 561 | |
562 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 563 | domain |
Inseob Kim | c97a97c | 2020-07-20 20:26:07 +0900 | [diff] [blame] | 564 | -init |
565 | -vendor_init | ||||
566 | -dumpstate | ||||
567 | -appdomain | ||||
568 | } camera_calibration_prop:file no_rw_file_perms; | ||||
Inseob Kim | 46dd4be | 2020-08-18 11:25:32 +0900 | [diff] [blame] | 569 | |
570 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 571 | domain |
Inseob Kim | 46dd4be | 2020-08-18 11:25:32 +0900 | [diff] [blame] | 572 | -init |
573 | -dumpstate | ||||
Jeff Vander Stoep | 684d25b | 2020-08-25 11:41:00 +0200 | [diff] [blame] | 574 | -hal_dumpstate_server |
Inseob Kim | 46dd4be | 2020-08-18 11:25:32 +0900 | [diff] [blame] | 575 | not_compatible_property(`-vendor_init') |
576 | } hal_dumpstate_config_prop:file no_rw_file_perms; | ||||
Primiano Tucci | cd45230 | 2020-10-09 09:15:10 +0100 | [diff] [blame] | 577 | |
578 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 579 | domain |
Primiano Tucci | cd45230 | 2020-10-09 09:15:10 +0100 | [diff] [blame] | 580 | -init |
Yabin Cui | bd4c9e8 | 2021-03-18 11:15:36 -0700 | [diff] [blame] | 581 | userdebug_or_eng(`-profcollectd') |
Yabin Cui | f17fb42 | 2021-11-24 14:06:07 -0800 | [diff] [blame] | 582 | userdebug_or_eng(`-simpleperf_boot') |
Primiano Tucci | cd45230 | 2020-10-09 09:15:10 +0100 | [diff] [blame] | 583 | userdebug_or_eng(`-traced_probes') |
Florian Mayer | 167407d | 2020-11-11 11:01:36 +0000 | [diff] [blame] | 584 | userdebug_or_eng(`-traced_perf') |
Primiano Tucci | cd45230 | 2020-10-09 09:15:10 +0100 | [diff] [blame] | 585 | } { |
586 | lower_kptr_restrict_prop | ||||
587 | }:property_service set; | ||||
Janis Danisevskis | 202e863 | 2020-10-23 11:16:34 -0700 | [diff] [blame] | 588 | |
Inseob Kim | d5a0448 | 2020-11-05 22:17:26 +0900 | [diff] [blame] | 589 | neverallow { |
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 590 | domain |
Inseob Kim | d5a0448 | 2020-11-05 22:17:26 +0900 | [diff] [blame] | 591 | -init |
592 | } zygote_wrap_prop:property_service set; | ||||
593 | |||||
594 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 595 | domain |
Inseob Kim | d5a0448 | 2020-11-05 22:17:26 +0900 | [diff] [blame] | 596 | -init |
597 | } verity_status_prop:property_service set; | ||||
598 | |||||
599 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 600 | domain |
Inseob Kim | d5a0448 | 2020-11-05 22:17:26 +0900 | [diff] [blame] | 601 | -init |
602 | } setupwizard_prop:property_service set; | ||||
Inseob Kim | 9985566 | 2020-11-12 22:21:51 +0900 | [diff] [blame] | 603 | |
604 | # ro.product.property_source_order is useless after initialization of ro.product.* props. | ||||
605 | # So making it accessible only from init and vendor_init. | ||||
606 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 607 | domain |
Inseob Kim | 9985566 | 2020-11-12 22:21:51 +0900 | [diff] [blame] | 608 | -init |
609 | -dumpstate | ||||
610 | -vendor_init | ||||
611 | } build_config_prop:file no_rw_file_perms; | ||||
Inseob Kim | 0cef0fe | 2020-11-17 13:54:52 +0900 | [diff] [blame] | 612 | |
613 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 614 | domain |
Inseob Kim | 0cef0fe | 2020-11-17 13:54:52 +0900 | [diff] [blame] | 615 | -init |
616 | -shell | ||||
617 | } sqlite_log_prop:property_service set; | ||||
618 | |||||
619 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 620 | domain |
Inseob Kim | 0cef0fe | 2020-11-17 13:54:52 +0900 | [diff] [blame] | 621 | -coredomain |
622 | -appdomain | ||||
623 | } sqlite_log_prop:file no_rw_file_perms; | ||||
Inseob Kim | 4c110ff | 2020-11-26 21:50:23 +0900 | [diff] [blame] | 624 | |
Inseob Kim | 5c011e5 | 2021-01-14 04:08:16 +0000 | [diff] [blame] | 625 | neverallow { |
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 626 | domain |
Inseob Kim | 5c011e5 | 2021-01-14 04:08:16 +0000 | [diff] [blame] | 627 | -init |
628 | } default_prop:property_service set; | ||||
629 | |||||
Inseob Kim | 4c110ff | 2020-11-26 21:50:23 +0900 | [diff] [blame] | 630 | # Only one of system_property_type and vendor_property_type can be assigned. |
631 | # Property types having both attributes won't be accessible from anywhere. | ||||
632 | neverallow domain system_and_vendor_property_type:{file property_service} *; | ||||
JW Wang | 0f8cf04 | 2021-02-24 14:29:06 +0800 | [diff] [blame] | 633 | |
634 | neverallow { | ||||
Seth Moore | 8bfdd82 | 2022-04-20 10:10:49 -0700 | [diff] [blame] | 635 | domain |
636 | -init | ||||
Seth Moore | d3bd686 | 2023-02-24 11:50:51 -0800 | [diff] [blame] | 637 | -shell |
Vikram Gaur | 0139008 | 2023-03-16 01:41:29 +0000 | [diff] [blame] | 638 | -rkpdapp |
Seth Moore | 8bfdd82 | 2022-04-20 10:10:49 -0700 | [diff] [blame] | 639 | } remote_prov_prop:property_service set; |
640 | |||||
641 | neverallow { | ||||
JW Wang | 0f8cf04 | 2021-02-24 14:29:06 +0800 | [diff] [blame] | 642 | # Only allow init and shell to set rollback_test_prop |
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame] | 643 | domain |
JW Wang | 0f8cf04 | 2021-02-24 14:29:06 +0800 | [diff] [blame] | 644 | -init |
645 | -shell | ||||
646 | } rollback_test_prop:property_service set; | ||||
Yi Kong | 9b65845 | 2021-03-22 22:02:22 +0800 | [diff] [blame] | 647 | |
648 | neverallow { | ||||
Jooyung Han | ccfb0ef | 2022-07-07 15:42:39 +0900 | [diff] [blame] | 649 | domain |
650 | -init | ||||
Jooyung Han | ccfb0ef | 2022-07-07 15:42:39 +0900 | [diff] [blame] | 651 | -apexd |
652 | } ctl_apex_load_prop:property_service set; | ||||
653 | |||||
654 | neverallow { | ||||
655 | domain | ||||
656 | -coredomain | ||||
657 | -init | ||||
658 | -dumpstate | ||||
659 | -apexd | ||||
Deyao Ren | 3fab00f | 2022-08-30 19:14:51 +0000 | [diff] [blame] | 660 | } ctl_apex_load_prop:file no_rw_file_perms; |
Jooyung Han | ccfb0ef | 2022-07-07 15:42:39 +0900 | [diff] [blame] | 661 | |
662 | neverallow { | ||||
Deyao Ren | 7848d3a | 2022-09-01 22:20:10 +0000 | [diff] [blame] | 663 | domain |
664 | -init | ||||
665 | -apexd | ||||
666 | } apex_ready_prop:property_service set; | ||||
667 | |||||
668 | neverallow { | ||||
669 | domain | ||||
670 | -coredomain | ||||
671 | -dumpstate | ||||
672 | -apexd | ||||
Jooyung Han | cae2368 | 2022-09-02 16:26:27 +0900 | [diff] [blame] | 673 | -vendor_init |
Deyao Ren | 7848d3a | 2022-09-01 22:20:10 +0000 | [diff] [blame] | 674 | } apex_ready_prop:file no_rw_file_perms; |
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 675 | |
676 | neverallow { | ||||
677 | # Only allow init and profcollectd to access profcollectd_node_id_prop | ||||
678 | domain | ||||
679 | -init | ||||
680 | -dumpstate | ||||
681 | -profcollectd | ||||
682 | } profcollectd_node_id_prop:file r_file_perms; | ||||
683 | |||||
Jiyong Park | c4f84bc | 2022-09-18 23:09:53 +0900 | [diff] [blame] | 684 | neverallow { |
685 | domain | ||||
686 | -init | ||||
687 | } log_file_logger_prop:property_service set; | ||||
Avichal Rakesh | a12d310 | 2023-01-23 23:46:42 -0800 | [diff] [blame] | 688 | |
689 | neverallow { | ||||
690 | domain | ||||
691 | -init | ||||
692 | -vendor_init | ||||
693 | } usb_uvc_enabled_prop:property_service set; | ||||
Avichal Rakesh | e2cb0f2 | 2023-02-01 15:56:40 -0800 | [diff] [blame] | 694 | |
695 | # Disallow non system apps from reading ro.usb.uvc.enabled | ||||
696 | neverallow { | ||||
697 | appdomain | ||||
698 | -system_app | ||||
699 | -device_as_webcam | ||||
700 | } usb_uvc_enabled_prop:file no_rw_file_perms; |