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