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