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