Inseob Kim | bbae4a9 | 2020-03-19 17:49:08 +0900 | [diff] [blame] | 1 | # Properties used only in /system |
2 | system_internal_prop(adbd_prop) | ||||
David Anderson | 09bb944 | 2020-11-13 00:45:59 -0800 | [diff] [blame] | 3 | system_internal_prop(ctl_snapuserd_prop) |
Yi Kong | 0ac0072 | 2020-10-27 02:29:52 +0800 | [diff] [blame] | 4 | system_internal_prop(device_config_profcollect_native_boot_prop) |
Tej Singh | dd0988f | 2020-11-17 19:26:23 -0800 | [diff] [blame] | 5 | system_internal_prop(device_config_statsd_native_prop) |
6 | system_internal_prop(device_config_statsd_native_boot_prop) | ||||
Inseob Kim | bbae4a9 | 2020-03-19 17:49:08 +0900 | [diff] [blame] | 7 | system_internal_prop(device_config_storage_native_boot_prop) |
8 | system_internal_prop(device_config_sys_traced_prop) | ||||
9 | system_internal_prop(device_config_window_manager_native_boot_prop) | ||||
10 | system_internal_prop(device_config_configuration_prop) | ||||
Xiao Ma | 2d6c9f0 | 2021-02-02 10:27:38 +0000 | [diff] [blame] | 11 | system_internal_prop(device_config_connectivity_prop) |
Nick Chalko | 81a4dd4 | 2021-02-11 09:12:51 -0800 | [diff] [blame] | 12 | system_internal_prop(device_config_swcodec_native_prop) |
Hongguang Chen | 91a5f4e | 2020-04-23 23:43:13 -0700 | [diff] [blame] | 13 | system_internal_prop(fastbootd_protocol_prop) |
Inseob Kim | bbae4a9 | 2020-03-19 17:49:08 +0900 | [diff] [blame] | 14 | system_internal_prop(gsid_prop) |
15 | system_internal_prop(init_perf_lsm_hooks_prop) | ||||
Inseob Kim | 15e5e0a | 2020-05-14 19:43:08 +0900 | [diff] [blame] | 16 | system_internal_prop(init_service_status_private_prop) |
Inseob Kim | bbae4a9 | 2020-03-19 17:49:08 +0900 | [diff] [blame] | 17 | system_internal_prop(init_svc_debug_prop) |
Paul Crowley | b0c5571 | 2021-02-23 08:40:05 -0800 | [diff] [blame] | 18 | system_internal_prop(keystore_listen_prop) |
Inseob Kim | bbae4a9 | 2020-03-19 17:49:08 +0900 | [diff] [blame] | 19 | system_internal_prop(last_boot_reason_prop) |
Alexander Mishkovets | f0be89b | 2020-07-08 23:11:03 +0200 | [diff] [blame] | 20 | system_internal_prop(localization_prop) |
Primiano Tucci | cd45230 | 2020-10-09 09:15:10 +0100 | [diff] [blame] | 21 | system_internal_prop(lower_kptr_restrict_prop) |
Inseob Kim | bbae4a9 | 2020-03-19 17:49:08 +0900 | [diff] [blame] | 22 | system_internal_prop(netd_stable_secret_prop) |
23 | system_internal_prop(pm_prop) | ||||
JW Wang | 0f8cf04 | 2021-02-24 14:29:06 +0800 | [diff] [blame] | 24 | system_internal_prop(rollback_test_prop) |
Inseob Kim | d5a0448 | 2020-11-05 22:17:26 +0900 | [diff] [blame] | 25 | system_internal_prop(setupwizard_prop) |
Inseob Kim | bbae4a9 | 2020-03-19 17:49:08 +0900 | [diff] [blame] | 26 | system_internal_prop(system_adbd_prop) |
Benjamin Schwartz | 3e4d97b | 2020-10-30 13:55:21 -0700 | [diff] [blame] | 27 | system_internal_prop(suspend_prop) |
Inseob Kim | bbae4a9 | 2020-03-19 17:49:08 +0900 | [diff] [blame] | 28 | system_internal_prop(traced_perf_enabled_prop) |
29 | system_internal_prop(userspace_reboot_log_prop) | ||||
30 | system_internal_prop(userspace_reboot_test_prop) | ||||
Inseob Kim | d5a0448 | 2020-11-05 22:17:26 +0900 | [diff] [blame] | 31 | system_internal_prop(verity_status_prop) |
32 | system_internal_prop(zygote_wrap_prop) | ||||
Inseob Kim | bbae4a9 | 2020-03-19 17:49:08 +0900 | [diff] [blame] | 33 | |
Janis Danisevskis | 202e863 | 2020-10-23 11:16:34 -0700 | [diff] [blame] | 34 | # TODO Remove this property when Keystore 2.0 migration is complete b/171563717 |
35 | system_internal_prop(keystore2_enable_prop) | ||||
36 | |||||
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 37 | ### |
38 | ### Neverallow rules | ||||
39 | ### | ||||
40 | |||||
41 | treble_sysprop_neverallow(` | ||||
42 | |||||
Inseob Kim | afc0993 | 2020-09-28 13:32:43 +0900 | [diff] [blame] | 43 | enforce_sysprop_owner(` |
44 | neverallow domain { | ||||
45 | property_type | ||||
46 | -system_property_type | ||||
47 | -product_property_type | ||||
48 | -vendor_property_type | ||||
49 | }:file no_rw_file_perms; | ||||
50 | ') | ||||
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 51 | |
52 | neverallow { domain -coredomain } { | ||||
53 | system_property_type | ||||
54 | system_internal_property_type | ||||
55 | -system_restricted_property_type | ||||
56 | -system_public_property_type | ||||
57 | }:file no_rw_file_perms; | ||||
58 | |||||
59 | neverallow { domain -coredomain } { | ||||
60 | system_property_type | ||||
61 | -system_public_property_type | ||||
62 | }:property_service set; | ||||
63 | |||||
64 | # init is in coredomain, but should be able to read/write all props. | ||||
65 | # dumpstate is also in coredomain, but should be able to read all props. | ||||
66 | neverallow { coredomain -init -dumpstate } { | ||||
67 | vendor_property_type | ||||
68 | vendor_internal_property_type | ||||
69 | -vendor_restricted_property_type | ||||
70 | -vendor_public_property_type | ||||
71 | }:file no_rw_file_perms; | ||||
72 | |||||
73 | neverallow { coredomain -init } { | ||||
74 | vendor_property_type | ||||
75 | -vendor_public_property_type | ||||
76 | }:property_service set; | ||||
77 | |||||
78 | ') | ||||
79 | |||||
80 | # There is no need to perform ioctl or advisory locking operations on | ||||
81 | # property files. If this neverallow is being triggered, it is | ||||
82 | # likely that the policy is using r_file_perms directly instead of | ||||
83 | # the get_prop() macro. | ||||
84 | neverallow domain property_type:file { ioctl lock }; | ||||
85 | |||||
86 | neverallow * { | ||||
87 | core_property_type | ||||
88 | -audio_prop | ||||
89 | -config_prop | ||||
90 | -cppreopt_prop | ||||
91 | -dalvik_prop | ||||
92 | -debuggerd_prop | ||||
93 | -debug_prop | ||||
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 94 | -dhcp_prop |
95 | -dumpstate_prop | ||||
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 96 | -fingerprint_prop |
97 | -logd_prop | ||||
98 | -net_radio_prop | ||||
99 | -nfc_prop | ||||
100 | -ota_prop | ||||
101 | -pan_result_prop | ||||
102 | -persist_debug_prop | ||||
103 | -powerctl_prop | ||||
104 | -radio_prop | ||||
105 | -restorecon_prop | ||||
106 | -shell_prop | ||||
107 | -system_prop | ||||
Inseob Kim | dc1e501 | 2020-04-27 21:13:01 +0900 | [diff] [blame] | 108 | -usb_prop |
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 109 | -vold_prop |
110 | }:file no_rw_file_perms; | ||||
111 | |||||
112 | # sigstop property is only used for debugging; should only be set by su which is permissive | ||||
113 | # for userdebug/eng | ||||
114 | neverallow { | ||||
115 | domain | ||||
116 | -init | ||||
117 | -vendor_init | ||||
118 | } ctl_sigstop_prop:property_service set; | ||||
119 | |||||
120 | # Don't audit legacy ctl. property handling. We only want the newer permission check to appear | ||||
121 | # in the audit log | ||||
122 | dontaudit domain { | ||||
123 | ctl_bootanim_prop | ||||
124 | ctl_bugreport_prop | ||||
125 | ctl_console_prop | ||||
126 | ctl_default_prop | ||||
127 | ctl_dumpstate_prop | ||||
128 | ctl_fuse_prop | ||||
129 | ctl_mdnsd_prop | ||||
130 | ctl_rildaemon_prop | ||||
131 | }:property_service set; | ||||
132 | |||||
133 | neverallow { | ||||
134 | domain | ||||
135 | -init | ||||
136 | } init_svc_debug_prop:property_service set; | ||||
137 | |||||
138 | neverallow { | ||||
139 | domain | ||||
140 | -init | ||||
141 | -dumpstate | ||||
142 | userdebug_or_eng(`-su') | ||||
143 | } init_svc_debug_prop:file no_rw_file_perms; | ||||
144 | |||||
145 | compatible_property_only(` | ||||
146 | # Prevent properties from being set | ||||
147 | neverallow { | ||||
148 | domain | ||||
149 | -coredomain | ||||
150 | -appdomain | ||||
151 | -vendor_init | ||||
152 | } { | ||||
153 | core_property_type | ||||
154 | extended_core_property_type | ||||
155 | exported_config_prop | ||||
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 156 | exported_default_prop |
157 | exported_dumpstate_prop | ||||
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 158 | exported_system_prop |
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 159 | exported3_system_prop |
Inseob Kim | dc1e501 | 2020-04-27 21:13:01 +0900 | [diff] [blame] | 160 | usb_control_prop |
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 161 | -nfc_prop |
162 | -powerctl_prop | ||||
163 | -radio_prop | ||||
164 | }:property_service set; | ||||
165 | |||||
166 | neverallow { | ||||
167 | domain | ||||
168 | -coredomain | ||||
169 | -appdomain | ||||
170 | -hal_nfc_server | ||||
171 | } { | ||||
172 | nfc_prop | ||||
173 | }:property_service set; | ||||
174 | |||||
175 | neverallow { | ||||
176 | domain | ||||
177 | -coredomain | ||||
178 | -appdomain | ||||
179 | -hal_telephony_server | ||||
180 | -vendor_init | ||||
181 | } { | ||||
Inseob Kim | acd02fc | 2020-07-28 15:17:24 +0900 | [diff] [blame] | 182 | radio_control_prop |
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 183 | }:property_service set; |
184 | |||||
185 | neverallow { | ||||
186 | domain | ||||
187 | -coredomain | ||||
188 | -appdomain | ||||
189 | -hal_telephony_server | ||||
190 | } { | ||||
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 191 | radio_prop |
192 | }:property_service set; | ||||
193 | |||||
194 | neverallow { | ||||
195 | domain | ||||
196 | -coredomain | ||||
197 | -bluetooth | ||||
198 | -hal_bluetooth_server | ||||
199 | } { | ||||
200 | bluetooth_prop | ||||
201 | }:property_service set; | ||||
202 | |||||
203 | neverallow { | ||||
204 | domain | ||||
205 | -coredomain | ||||
206 | -bluetooth | ||||
207 | -hal_bluetooth_server | ||||
208 | -vendor_init | ||||
209 | } { | ||||
210 | exported_bluetooth_prop | ||||
211 | }:property_service set; | ||||
212 | |||||
213 | neverallow { | ||||
214 | domain | ||||
215 | -coredomain | ||||
216 | -hal_camera_server | ||||
217 | -cameraserver | ||||
218 | -vendor_init | ||||
219 | } { | ||||
220 | exported_camera_prop | ||||
221 | }:property_service set; | ||||
222 | |||||
223 | neverallow { | ||||
224 | domain | ||||
225 | -coredomain | ||||
226 | -hal_wifi_server | ||||
227 | -wificond | ||||
228 | } { | ||||
229 | wifi_prop | ||||
230 | }:property_service set; | ||||
231 | |||||
232 | neverallow { | ||||
233 | domain | ||||
Inseob Kim | 3dbf3d8 | 2020-06-25 21:20:42 +0900 | [diff] [blame] | 234 | -init |
235 | -dumpstate | ||||
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 236 | -hal_wifi_server |
237 | -wificond | ||||
238 | -vendor_init | ||||
239 | } { | ||||
Inseob Kim | 3dbf3d8 | 2020-06-25 21:20:42 +0900 | [diff] [blame] | 240 | wifi_hal_prop |
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 241 | }:property_service set; |
242 | |||||
243 | # Prevent properties from being read | ||||
244 | neverallow { | ||||
245 | domain | ||||
246 | -coredomain | ||||
247 | -appdomain | ||||
248 | -vendor_init | ||||
249 | } { | ||||
250 | core_property_type | ||||
Inseob Kim | d8c39d9 | 2020-04-20 19:36:33 +0900 | [diff] [blame] | 251 | dalvik_config_prop |
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 252 | extended_core_property_type |
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 253 | exported3_system_prop |
Inseob Kim | fd2d6ec | 2020-04-01 10:01:16 +0900 | [diff] [blame] | 254 | systemsound_config_prop |
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 255 | -debug_prop |
256 | -logd_prop | ||||
257 | -nfc_prop | ||||
258 | -powerctl_prop | ||||
259 | -radio_prop | ||||
260 | }:file no_rw_file_perms; | ||||
261 | |||||
262 | neverallow { | ||||
263 | domain | ||||
264 | -coredomain | ||||
265 | -appdomain | ||||
266 | -hal_nfc_server | ||||
267 | } { | ||||
268 | nfc_prop | ||||
269 | }:file no_rw_file_perms; | ||||
270 | |||||
271 | neverallow { | ||||
272 | domain | ||||
273 | -coredomain | ||||
274 | -appdomain | ||||
275 | -hal_telephony_server | ||||
276 | } { | ||||
277 | radio_prop | ||||
278 | }:file no_rw_file_perms; | ||||
279 | |||||
280 | neverallow { | ||||
281 | domain | ||||
282 | -coredomain | ||||
283 | -bluetooth | ||||
284 | -hal_bluetooth_server | ||||
285 | } { | ||||
286 | bluetooth_prop | ||||
287 | }:file no_rw_file_perms; | ||||
288 | |||||
289 | neverallow { | ||||
290 | domain | ||||
291 | -coredomain | ||||
292 | -hal_wifi_server | ||||
293 | -wificond | ||||
294 | } { | ||||
295 | wifi_prop | ||||
296 | }:file no_rw_file_perms; | ||||
Benjamin Schwartz | 3e4d97b | 2020-10-30 13:55:21 -0700 | [diff] [blame] | 297 | |
298 | neverallow { | ||||
299 | domain | ||||
300 | -init | ||||
301 | } { | ||||
302 | suspend_prop | ||||
303 | }:property_service set; | ||||
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 304 | ') |
305 | |||||
306 | compatible_property_only(` | ||||
307 | # Neverallow coredomain to set vendor properties | ||||
308 | neverallow { | ||||
309 | coredomain | ||||
310 | -init | ||||
311 | -system_writes_vendor_properties_violators | ||||
312 | } { | ||||
313 | property_type | ||||
314 | -system_property_type | ||||
315 | -extended_core_property_type | ||||
316 | }:property_service set; | ||||
317 | ') | ||||
318 | |||||
319 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 320 | domain |
Inseob Kim | bfb3708 | 2020-04-27 23:49:15 +0900 | [diff] [blame] | 321 | -coredomain |
322 | -vendor_init | ||||
323 | } { | ||||
324 | ffs_config_prop | ||||
325 | ffs_control_prop | ||||
326 | }:file no_rw_file_perms; | ||||
327 | |||||
328 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 329 | domain |
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 330 | -init |
331 | -system_server | ||||
332 | } { | ||||
333 | userspace_reboot_log_prop | ||||
334 | }:property_service set; | ||||
335 | |||||
336 | neverallow { | ||||
337 | # Only allow init and system_server to set system_adbd_prop | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 338 | domain |
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 339 | -init |
340 | -system_server | ||||
341 | } { | ||||
342 | system_adbd_prop | ||||
343 | }:property_service set; | ||||
344 | |||||
Josh Gao | 0cac6fd | 2020-10-28 13:56:23 -0700 | [diff] [blame] | 345 | # Let (vendor_)init, adbd, and system_server set service.adb.tcp.port |
346 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 347 | domain |
Josh Gao | 0cac6fd | 2020-10-28 13:56:23 -0700 | [diff] [blame] | 348 | -init |
349 | -vendor_init | ||||
350 | -adbd | ||||
351 | -system_server | ||||
352 | } { | ||||
353 | adbd_config_prop | ||||
354 | }:property_service set; | ||||
355 | |||||
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 356 | neverallow { |
357 | # Only allow init and adbd to set adbd_prop | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 358 | domain |
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 359 | -init |
360 | -adbd | ||||
361 | } { | ||||
362 | adbd_prop | ||||
363 | }:property_service set; | ||||
364 | |||||
365 | neverallow { | ||||
366 | # Only allow init and shell to set userspace_reboot_test_prop | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 367 | domain |
Inseob Kim | 55e5c9b | 2020-03-04 17:20:35 +0900 | [diff] [blame] | 368 | -init |
369 | -shell | ||||
370 | } { | ||||
371 | userspace_reboot_test_prop | ||||
372 | }:property_service set; | ||||
Inseob Kim | 721d921 | 2020-04-24 21:25:17 +0900 | [diff] [blame] | 373 | |
374 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 375 | domain |
Inseob Kim | 721d921 | 2020-04-24 21:25:17 +0900 | [diff] [blame] | 376 | -init |
377 | -system_server | ||||
378 | -vendor_init | ||||
379 | } { | ||||
380 | surfaceflinger_color_prop | ||||
381 | }:property_service set; | ||||
Inseob Kim | 9add20f | 2020-05-06 22:20:35 +0900 | [diff] [blame] | 382 | |
383 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 384 | domain |
Inseob Kim | 9add20f | 2020-05-06 22:20:35 +0900 | [diff] [blame] | 385 | -init |
386 | } { | ||||
387 | libc_debug_prop | ||||
388 | }:property_service set; | ||||
Inseob Kim | 36aeb16 | 2020-05-08 20:42:25 +0900 | [diff] [blame] | 389 | |
Mitch Phillips | eaf1404 | 2020-12-03 17:23:06 -0800 | [diff] [blame] | 390 | # Allow the shell to set MTE props, so that non-root users with adb shell |
391 | # access can control the settings on their device. | ||||
392 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 393 | domain |
Mitch Phillips | eaf1404 | 2020-12-03 17:23:06 -0800 | [diff] [blame] | 394 | -init |
395 | -shell | ||||
396 | } { | ||||
397 | arm64_memtag_prop | ||||
398 | }:property_service set; | ||||
399 | |||||
Inseob Kim | 36aeb16 | 2020-05-08 20:42:25 +0900 | [diff] [blame] | 400 | neverallow { |
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 401 | domain |
Inseob Kim | 36aeb16 | 2020-05-08 20:42:25 +0900 | [diff] [blame] | 402 | -init |
403 | -system_server | ||||
404 | -vendor_init | ||||
405 | } zram_control_prop:property_service set; | ||||
Inseob Kim | 1337e15 | 2020-05-12 22:51:48 +0900 | [diff] [blame] | 406 | |
407 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 408 | domain |
Inseob Kim | 1337e15 | 2020-05-12 22:51:48 +0900 | [diff] [blame] | 409 | -init |
410 | -system_server | ||||
411 | -vendor_init | ||||
412 | } dalvik_runtime_prop:property_service set; | ||||
Inseob Kim | dc1e501 | 2020-04-27 21:13:01 +0900 | [diff] [blame] | 413 | |
414 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 415 | domain |
Inseob Kim | dc1e501 | 2020-04-27 21:13:01 +0900 | [diff] [blame] | 416 | -coredomain |
417 | -vendor_init | ||||
418 | } { | ||||
419 | usb_config_prop | ||||
420 | usb_control_prop | ||||
421 | }:property_service set; | ||||
Inseob Kim | 3b82aec | 2020-05-14 01:38:40 +0900 | [diff] [blame] | 422 | |
423 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 424 | domain |
Inseob Kim | 3b82aec | 2020-05-14 01:38:40 +0900 | [diff] [blame] | 425 | -init |
426 | -system_server | ||||
427 | } { | ||||
428 | provisioned_prop | ||||
429 | retaildemo_prop | ||||
430 | }:property_service set; | ||||
431 | |||||
432 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 433 | domain |
Inseob Kim | 3b82aec | 2020-05-14 01:38:40 +0900 | [diff] [blame] | 434 | -coredomain |
435 | -vendor_init | ||||
436 | } { | ||||
437 | provisioned_prop | ||||
438 | retaildemo_prop | ||||
439 | }:file no_rw_file_perms; | ||||
Inseob Kim | 15e5e0a | 2020-05-14 19:43:08 +0900 | [diff] [blame] | 440 | |
441 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 442 | domain |
Inseob Kim | 15e5e0a | 2020-05-14 19:43:08 +0900 | [diff] [blame] | 443 | -init |
444 | } { | ||||
445 | init_service_status_private_prop | ||||
446 | init_service_status_prop | ||||
447 | }:property_service set; | ||||
Inseob Kim | ad63170 | 2020-05-14 21:47:43 +0900 | [diff] [blame] | 448 | |
449 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 450 | domain |
Inseob Kim | ad63170 | 2020-05-14 21:47:43 +0900 | [diff] [blame] | 451 | -init |
452 | -radio | ||||
453 | -appdomain | ||||
454 | -hal_telephony_server | ||||
Inseob Kim | 285da2f | 2020-06-04 20:29:43 +0900 | [diff] [blame] | 455 | not_compatible_property(`-vendor_init') |
Inseob Kim | ad63170 | 2020-05-14 21:47:43 +0900 | [diff] [blame] | 456 | } telephony_status_prop:property_service set; |
Peiyong Lin | 37dea07 | 2020-06-03 12:20:41 -0700 | [diff] [blame] | 457 | |
458 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 459 | domain |
Peiyong Lin | 37dea07 | 2020-06-03 12:20:41 -0700 | [diff] [blame] | 460 | -init |
461 | -vendor_init | ||||
462 | } { | ||||
463 | graphics_config_prop | ||||
464 | }:property_service set; | ||||
Inseob Kim | 6ffdf1b | 2020-06-16 20:00:41 +0900 | [diff] [blame] | 465 | |
466 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 467 | domain |
Amy Hsu | 0f352fb | 2020-06-15 17:04:12 +0800 | [diff] [blame] | 468 | -init |
Midas Chien | 0d0391f | 2020-06-17 22:13:21 +0800 | [diff] [blame] | 469 | -surfaceflinger |
Amy Hsu | 0f352fb | 2020-06-15 17:04:12 +0800 | [diff] [blame] | 470 | } { |
471 | surfaceflinger_display_prop | ||||
472 | }:property_service set; | ||||
473 | |||||
Inseob Kim | 072b014 | 2020-06-16 20:00:41 +0900 | [diff] [blame] | 474 | neverallow { |
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 475 | domain |
Inseob Kim | 5eacf72 | 2020-07-01 01:27:49 +0900 | [diff] [blame] | 476 | -coredomain |
477 | -appdomain | ||||
Inseob Kim | 6ffdf1b | 2020-06-16 20:00:41 +0900 | [diff] [blame] | 478 | -vendor_init |
Inseob Kim | 6ffdf1b | 2020-06-16 20:00:41 +0900 | [diff] [blame] | 479 | } packagemanager_config_prop:file no_rw_file_perms; |
Inseob Kim | 04f435c | 2020-07-07 12:46:24 +0900 | [diff] [blame] | 480 | |
481 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 482 | domain |
Inseob Kim | 04f435c | 2020-07-07 12:46:24 +0900 | [diff] [blame] | 483 | -coredomain |
484 | -vendor_init | ||||
485 | } keyguard_config_prop:file no_rw_file_perms; | ||||
Alexander Mishkovets | f0be89b | 2020-07-08 23:11:03 +0200 | [diff] [blame] | 486 | |
487 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 488 | domain |
Alexander Mishkovets | f0be89b | 2020-07-08 23:11:03 +0200 | [diff] [blame] | 489 | -init |
490 | } { | ||||
491 | localization_prop | ||||
492 | }:property_service set; | ||||
Inseob Kim | c80b024 | 2020-07-16 22:25:47 +0900 | [diff] [blame] | 493 | |
494 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 495 | domain |
Inseob Kim | c80b024 | 2020-07-16 22:25:47 +0900 | [diff] [blame] | 496 | -init |
497 | -vendor_init | ||||
498 | -dumpstate | ||||
499 | -system_app | ||||
500 | } oem_unlock_prop:file no_rw_file_perms; | ||||
501 | |||||
502 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 503 | domain |
Inseob Kim | c80b024 | 2020-07-16 22:25:47 +0900 | [diff] [blame] | 504 | -coredomain |
505 | -vendor_init | ||||
506 | } storagemanager_config_prop:file no_rw_file_perms; | ||||
507 | |||||
508 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 509 | domain |
Inseob Kim | c80b024 | 2020-07-16 22:25:47 +0900 | [diff] [blame] | 510 | -init |
511 | -vendor_init | ||||
512 | -dumpstate | ||||
513 | -appdomain | ||||
514 | } sendbug_config_prop:file no_rw_file_perms; | ||||
Inseob Kim | c97a97c | 2020-07-20 20:26:07 +0900 | [diff] [blame] | 515 | |
516 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 517 | domain |
Inseob Kim | c97a97c | 2020-07-20 20:26:07 +0900 | [diff] [blame] | 518 | -init |
519 | -vendor_init | ||||
520 | -dumpstate | ||||
521 | -appdomain | ||||
522 | } camera_calibration_prop:file no_rw_file_perms; | ||||
Inseob Kim | 46dd4be | 2020-08-18 11:25:32 +0900 | [diff] [blame] | 523 | |
524 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 525 | domain |
Inseob Kim | 46dd4be | 2020-08-18 11:25:32 +0900 | [diff] [blame] | 526 | -init |
527 | -dumpstate | ||||
Jeff Vander Stoep | 684d25b | 2020-08-25 11:41:00 +0200 | [diff] [blame] | 528 | -hal_dumpstate_server |
Inseob Kim | 46dd4be | 2020-08-18 11:25:32 +0900 | [diff] [blame] | 529 | not_compatible_property(`-vendor_init') |
530 | } hal_dumpstate_config_prop:file no_rw_file_perms; | ||||
Primiano Tucci | cd45230 | 2020-10-09 09:15:10 +0100 | [diff] [blame] | 531 | |
532 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 533 | domain |
Primiano Tucci | cd45230 | 2020-10-09 09:15:10 +0100 | [diff] [blame] | 534 | -init |
535 | userdebug_or_eng(`-traced_probes') | ||||
Florian Mayer | 167407d | 2020-11-11 11:01:36 +0000 | [diff] [blame] | 536 | userdebug_or_eng(`-traced_perf') |
Primiano Tucci | cd45230 | 2020-10-09 09:15:10 +0100 | [diff] [blame] | 537 | } { |
538 | lower_kptr_restrict_prop | ||||
539 | }:property_service set; | ||||
Janis Danisevskis | 202e863 | 2020-10-23 11:16:34 -0700 | [diff] [blame] | 540 | |
541 | # TODO Remove this property when Keystore 2.0 migration is complete b/171563717 | ||||
542 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 543 | domain |
Janis Danisevskis | 202e863 | 2020-10-23 11:16:34 -0700 | [diff] [blame] | 544 | -init |
545 | -dumpstate | ||||
546 | -system_app | ||||
547 | -system_server | ||||
548 | -zygote | ||||
549 | } keystore2_enable_prop:file no_rw_file_perms; | ||||
Inseob Kim | d5a0448 | 2020-11-05 22:17:26 +0900 | [diff] [blame] | 550 | |
551 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 552 | domain |
Inseob Kim | d5a0448 | 2020-11-05 22:17:26 +0900 | [diff] [blame] | 553 | -init |
554 | } zygote_wrap_prop:property_service set; | ||||
555 | |||||
556 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 557 | domain |
Inseob Kim | d5a0448 | 2020-11-05 22:17:26 +0900 | [diff] [blame] | 558 | -init |
559 | } verity_status_prop:property_service set; | ||||
560 | |||||
561 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 562 | domain |
Inseob Kim | d5a0448 | 2020-11-05 22:17:26 +0900 | [diff] [blame] | 563 | -init |
564 | } setupwizard_prop:property_service set; | ||||
Inseob Kim | 9985566 | 2020-11-12 22:21:51 +0900 | [diff] [blame] | 565 | |
566 | # ro.product.property_source_order is useless after initialization of ro.product.* props. | ||||
567 | # So making it accessible only from init and vendor_init. | ||||
568 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 569 | domain |
Inseob Kim | 9985566 | 2020-11-12 22:21:51 +0900 | [diff] [blame] | 570 | -init |
571 | -dumpstate | ||||
572 | -vendor_init | ||||
573 | } build_config_prop:file no_rw_file_perms; | ||||
Inseob Kim | 0cef0fe | 2020-11-17 13:54:52 +0900 | [diff] [blame] | 574 | |
575 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 576 | domain |
Inseob Kim | 0cef0fe | 2020-11-17 13:54:52 +0900 | [diff] [blame] | 577 | -init |
578 | -shell | ||||
579 | } sqlite_log_prop:property_service set; | ||||
580 | |||||
581 | neverallow { | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 582 | domain |
Inseob Kim | 0cef0fe | 2020-11-17 13:54:52 +0900 | [diff] [blame] | 583 | -coredomain |
584 | -appdomain | ||||
585 | } sqlite_log_prop:file no_rw_file_perms; | ||||
Inseob Kim | 4c110ff | 2020-11-26 21:50:23 +0900 | [diff] [blame] | 586 | |
Inseob Kim | 5c011e5 | 2021-01-14 04:08:16 +0000 | [diff] [blame] | 587 | neverallow { |
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 588 | domain |
Inseob Kim | 5c011e5 | 2021-01-14 04:08:16 +0000 | [diff] [blame] | 589 | -init |
590 | } default_prop:property_service set; | ||||
591 | |||||
Inseob Kim | 4c110ff | 2020-11-26 21:50:23 +0900 | [diff] [blame] | 592 | # Only one of system_property_type and vendor_property_type can be assigned. |
593 | # Property types having both attributes won't be accessible from anywhere. | ||||
594 | neverallow domain system_and_vendor_property_type:{file property_service} *; | ||||
JW Wang | 0f8cf04 | 2021-02-24 14:29:06 +0800 | [diff] [blame] | 595 | |
596 | neverallow { | ||||
597 | # Only allow init and shell to set rollback_test_prop | ||||
Inseob Kim | 85acf6e | 2021-03-10 10:42:23 +0900 | [diff] [blame^] | 598 | domain |
JW Wang | 0f8cf04 | 2021-02-24 14:29:06 +0800 | [diff] [blame] | 599 | -init |
600 | -shell | ||||
601 | } rollback_test_prop:property_service set; |