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