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