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