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