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