blob: 423be141b252285e7f4d4f43877d967d4d89a842 [file] [log] [blame]
Nick Kralevich748fdef2013-07-12 16:33:29 -07001###
2### Domain for all zygote spawned apps
3###
4### This file is the base policy for all zygote spawned apps.
5### Other policy files, such as isolated_app.te, untrusted_app.te, etc
6### extend from this policy. Only policies which should apply to ALL
7### zygote spawned apps should be added here.
8###
Stephen Smalley2dd4e512012-01-04 12:33:27 -05009
Stephen Smalleyad7df7b2013-12-20 08:24:12 -050010# Dalvik Compiler JIT Mapping.
11allow appdomain self:process execmem;
Stephen Smalleye7ec2f52013-12-23 16:18:55 -050012allow appdomain ashmem_device:chr_file execute;
Stephen Smalleyad7df7b2013-12-20 08:24:12 -050013
Nick Kralevich6634a102013-07-12 18:45:56 -070014# Receive and use open file descriptors inherited from zygote.
15allow appdomain zygote:fd use;
16
Stephen Smalley48759ca2013-10-29 14:42:39 -040017# gdbserver for ndk-gdb reads the zygote.
Nick Kralevich4fce0ef2014-05-22 15:00:25 -070018# valgrind needs mmap exec for zygote
19allow appdomain zygote_exec:file rx_file_perms;
Stephen Smalley48759ca2013-10-29 14:42:39 -040020
21# gdbserver for ndk-gdb ptrace attaches to app process.
22allow appdomain self:process ptrace;
23
Nick Kralevich6634a102013-07-12 18:45:56 -070024# Read system properties managed by zygote.
25allow appdomain zygote_tmpfs:file read;
26
27# Notify zygote of death;
28allow appdomain zygote:process sigchld;
29
Stephen Smalley48759ca2013-10-29 14:42:39 -040030# Notify shell and adbd of death when spawned via runas for ndk-gdb.
31allow appdomain shell:process sigchld;
32allow appdomain adbd:process sigchld;
33
34# child shell or gdbserver pty access for runas.
35allow appdomain devpts:chr_file { getattr read write ioctl };
36
Stephen Smalley3dad7b62014-03-05 09:50:08 -050037# Use pipes and sockets provided by system_server via binder or local socket.
Alex Klyubin1fdee112013-09-13 15:59:04 -070038allow appdomain system_server:fifo_file rw_file_perms;
Stephen Smalley3dad7b62014-03-05 09:50:08 -050039allow appdomain system_server:unix_stream_socket { read write setopt getattr getopt shutdown };
40allow appdomain system_server:tcp_socket { read write getattr getopt shutdown };
Nick Kralevich6634a102013-07-12 18:45:56 -070041
Nick Kralevich82fc3b52013-12-06 13:31:16 -080042# Communication with other apps via fifos
43allow appdomain appdomain:fifo_file rw_file_perms;
44
Nick Kralevich6634a102013-07-12 18:45:56 -070045# Communicate with surfaceflinger.
Stephen Smalleyb0db7122014-03-06 16:03:48 -050046allow appdomain surfaceflinger:unix_stream_socket { read write setopt getattr getopt shutdown };
Nick Kralevich6634a102013-07-12 18:45:56 -070047
48# App sandbox file accesses.
49allow appdomain app_data_file:dir create_dir_perms;
Stephen Smalley65317122013-12-11 09:08:09 -050050allow appdomain app_data_file:notdevfile_class_set create_file_perms;
Nick Kralevich6634a102013-07-12 18:45:56 -070051
Nick Kralevich6634a102013-07-12 18:45:56 -070052# lib subdirectory of /data/data dir is system-owned.
53allow appdomain system_data_file:dir r_dir_perms;
Nick Kralevich78706f92014-06-02 14:49:10 -070054allow appdomain system_data_file:file { execute execute_no_trans open execmod };
Nick Kralevich6634a102013-07-12 18:45:56 -070055
Robin Lee51bfecf2014-10-13 12:10:08 +010056# Keychain and user-trusted credentials
57allow appdomain keychain_data_file:dir r_dir_perms;
58allow appdomain keychain_data_file:file r_file_perms;
59allow appdomain misc_user_data_file:dir r_dir_perms;
60allow appdomain misc_user_data_file:file r_file_perms;
61
Jeff Sharkey6736bac2014-04-24 13:31:29 -070062# Access to OEM provided data and apps
63allow appdomain oemfs:dir r_dir_perms;
64allow appdomain oemfs:file rx_file_perms;
65
Nick Kralevich6634a102013-07-12 18:45:56 -070066# Execute the shell or other system executables.
67allow appdomain shell_exec:file rx_file_perms;
68allow appdomain system_file:file rx_file_perms;
69
Ed Heyl8ee37b42014-07-14 23:32:08 -070070# Execute dex2oat when apps call dexclassloader
71allow appdomain dex2oat_exec:file rx_file_perms;
72
Nick Kralevich6634a102013-07-12 18:45:56 -070073# Read/write wallpaper file (opened by system).
Robert Craigfc4c6b72014-01-23 10:05:28 -050074allow appdomain wallpaper_file:file { getattr read write };
Nick Kralevich6634a102013-07-12 18:45:56 -070075
76# Write to /data/anr/traces.txt.
77allow appdomain anr_data_file:dir search;
78allow appdomain anr_data_file:file { open append };
79
Nick Kralevich09e6abd2013-12-13 22:19:45 -080080# Allow apps to send dump information to dumpstate
81allow appdomain dumpstate:fd use;
Stephen Smalleyb0db7122014-03-06 16:03:48 -050082allow appdomain dumpstate:unix_stream_socket { read write getopt getattr shutdown };
Nick Kralevich2e7a3012014-01-10 23:05:25 -080083allow appdomain shell_data_file:file { write getattr };
Nick Kralevich09e6abd2013-12-13 22:19:45 -080084
Nick Kralevich6634a102013-07-12 18:45:56 -070085# Write to /proc/net/xt_qtaguid/ctrl file.
86allow appdomain qtaguid_proc:file rw_file_perms;
87# Everybody can read the xt_qtaguid resource tracking misc dev.
88# So allow all apps to read from /dev/xt_qtaguid.
89allow appdomain qtaguid_device:chr_file r_file_perms;
90
Stephen Smalley3ba90122013-12-12 09:09:53 -050091# Grant GPU access to all processes started by Zygote.
92# They need that to render the standard UI.
Nick Kralevich7ef348b2015-01-16 11:58:05 -080093allow appdomain gpu_device:chr_file { rw_file_perms execute };
Stephen Smalley3ba90122013-12-12 09:09:53 -050094
Nick Kralevich6634a102013-07-12 18:45:56 -070095# Use the Binder.
96binder_use(appdomain)
97# Perform binder IPC to binder services.
98binder_call(appdomain, binderservicedomain)
99# Perform binder IPC to other apps.
100binder_call(appdomain, appdomain)
101
Nick Kralevich6634a102013-07-12 18:45:56 -0700102# Already connected, unnamed sockets being passed over some other IPC
103# hence no sock_file or connectto permission. This appears to be how
104# Chrome works, may need to be updated as more apps using isolated services
105# are examined.
Stephen Smalleyb0db7122014-03-06 16:03:48 -0500106allow appdomain appdomain:unix_stream_socket { getopt getattr read write shutdown };
Nick Kralevich6634a102013-07-12 18:45:56 -0700107
108# Backup ability for every app. BMS opens and passes the fd
109# to any app that has backup ability. Hence, no open permissions here.
Geremy Condra81560732013-08-30 13:02:30 -0700110allow appdomain backup_data_file:file { read write getattr };
111allow appdomain cache_backup_file:file { read write getattr };
Stephen Smalley9ba844f2014-04-04 09:09:25 -0400112allow appdomain cache_backup_file:dir getattr;
Nick Kralevich6634a102013-07-12 18:45:56 -0700113# Backup ability using 'adb backup'
114allow appdomain system_data_file:lnk_file getattr;
115
Stephen Smalley2737cef2014-03-04 13:44:01 -0500116# Allow read/stat of /data/media files passed by Binder or local socket IPC.
117allow appdomain media_rw_data_file:file { read getattr };
118
Nick Kralevich1545b602014-05-05 11:04:12 -0700119# Read and write /data/data/com.android.providers.telephony files passed over Binder.
120allow appdomain radio_data_file:file { read write getattr };
Stephen Smalley3fbc5362014-03-27 09:45:26 -0400121
Stephen Smalley91a4f8d2014-05-07 13:10:02 -0400122# Read and write system app data files passed over Binder.
123# Motivating case was /data/data/com.android.settings/cache/*.jpg for
124# cropping or taking user photos.
125allow untrusted_app system_app_data_file:file { read write getattr };
126
Stephen Smalleycf610692014-06-20 14:13:14 -0400127# Access SDcard via the fuse mount.
Ed Heyle9c90bd2014-07-14 23:29:21 -0700128allow appdomain fuse:dir create_dir_perms;
129allow appdomain fuse:file create_file_perms;
Stephen Smalleyb0db7122014-03-06 16:03:48 -0500130
Nick Kralevich62083412014-09-24 15:18:08 -0700131# Access OBBs (vfat images) mounted by vold (b/17633509)
132allow appdomain vfat:dir r_dir_perms;
133allow appdomain vfat:file r_file_perms;
134
Nick Kralevich0b8c20e2013-10-09 12:27:27 -0700135# Allow apps to use the USB Accessory interface.
136# http://developer.android.com/guide/topics/connectivity/usb/accessory.html
137#
138# USB devices are first opened by the system server (USBDeviceManagerService)
139# and the file descriptor is passed to the right Activity via binder.
140allow appdomain usb_device:chr_file { read write getattr ioctl };
141allow appdomain usbaccessory_device:chr_file { read write getattr };
142
Stephen Smalley527316a2013-12-23 14:48:02 -0500143# For art.
144allow appdomain dalvikcache_data_file:file execute;
Jeff Hao6f201dd2014-11-11 15:42:43 -0800145allow appdomain dalvikcache_data_file:lnk_file r_file_perms;
Stephen Smalley527316a2013-12-23 14:48:02 -0500146
Stephen Smalley19c50902014-04-09 14:24:33 -0400147# /data/dalvik-cache/profiles
Nick Kralevich86703052014-06-10 18:42:22 -0700148allow appdomain dalvikcache_profiles_data_file:dir { search getattr };
149allow appdomain dalvikcache_profiles_data_file:file rw_file_perms;
Stephen Smalley19c50902014-04-09 14:24:33 -0400150
Torne (Richard Coles)9786af22014-05-23 11:01:58 +0100151# Allow any app to read shared RELRO files.
152allow appdomain shared_relro_file:dir search;
153allow appdomain shared_relro_file:file r_file_perms;
154
Christopher Tate6f6c4252014-05-30 15:21:22 -0700155# Allow apps to read/execute installed binaries
dcashman711895d2014-08-27 10:14:18 -0700156allow appdomain apk_data_file:dir r_dir_perms;
Christopher Tate6f6c4252014-05-30 15:21:22 -0700157allow appdomain apk_data_file:file { rx_file_perms execmod };
158
Nick Kralevichfad4d5f2014-06-16 14:19:31 -0700159# /data/resource-cache
160allow appdomain resourcecache_data_file:file r_file_perms;
161allow appdomain resourcecache_data_file:dir r_dir_perms;
162
Nick Kralevich6634a102013-07-12 18:45:56 -0700163###
Stephen Smalley59469372013-12-16 08:55:24 -0500164### CTS-specific rules
165###
166
167# For cts/tools/device-setup/TestDeviceSetup/src/android/tests/getinfo/RootProcessScanner.java.
168# Reads /proc/pid/status and statm entries to check that
169# no unexpected root processes are running.
170# Also for cts/tests/tests/security/src/android/security/cts/VoldExploitTest.java
171# Reads /proc/pid/cmdline of vold.
172allow appdomain domain:dir { open read search getattr };
173allow appdomain domain:{ file lnk_file } { open read getattr };
174
175# For cts/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java.
176# testRunAsHasCorrectCapabilities
177allow appdomain runas_exec:file getattr;
178# Others are either allowed elsewhere or not desired.
179
180# For cts/tests/tests/security/src/android/security/cts/SELinuxTest.java
181# Check SELinux policy and contexts.
182selinux_check_access(appdomain)
183selinux_check_context(appdomain)
184# Validate that each process is running in the correct security context.
185allow appdomain domain:process getattr;
186
Mark Salyzyn8ed750e2013-11-12 15:34:52 -0800187# logd access
188read_logd(appdomain)
Mark Salyzynbcdff892014-09-01 11:07:26 -0700189control_logd(appdomain)
Mark Salyzyn8ed750e2013-11-12 15:34:52 -0800190# application inherit logd write socket (urge is to deprecate this long term)
191allow appdomain zygote:unix_dgram_socket write;
192
Riley Spahn1196d2a2014-06-17 14:58:52 -0700193allow appdomain keystore:keystore_key { test get insert delete exist saw sign verify };
Riley Spahn1196d2a2014-06-17 14:58:52 -0700194
195use_keystore(appdomain)
196
Stephen Smalley59469372013-12-16 08:55:24 -0500197###
Nick Kralevich6634a102013-07-12 18:45:56 -0700198### Neverallow rules
199###
200### These are things that Android apps should NEVER be able to do
201###
202
203# Superuser capabilities.
Sharvil Nanavati77eb3522014-06-29 10:45:03 -0700204# bluetooth requires net_admin and wake_alarm.
Nick Kralevichbe660692014-07-04 10:12:13 -0700205neverallow { appdomain -bluetooth } self:capability *;
206neverallow { appdomain -bluetooth } self:capability2 *;
Nick Kralevich6634a102013-07-12 18:45:56 -0700207
208# Block device access.
Nick Kralevichbe660692014-07-04 10:12:13 -0700209neverallow appdomain dev_type:blk_file { read write };
Nick Kralevich6634a102013-07-12 18:45:56 -0700210
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400211# Access to any of the following character devices.
Nick Kralevichbe660692014-07-04 10:12:13 -0700212neverallow appdomain {
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400213 audio_device
214 camera_device
215 dm_device
216 radio_device
217 gps_device
218 rpmsg_device
219}:chr_file { read write };
220
221# Note: Try expanding list of app domains in the future.
Nick Kralevichbe660692014-07-04 10:12:13 -0700222neverallow { untrusted_app isolated_app shell } graphics_device:chr_file { read write };
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400223
Nick Kralevichbe660692014-07-04 10:12:13 -0700224neverallow { appdomain -nfc } nfc_device:chr_file
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400225 { read write };
Nick Kralevichbe660692014-07-04 10:12:13 -0700226neverallow { appdomain -bluetooth } hci_attach_dev:chr_file
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400227 { read write };
Nick Kralevichbe660692014-07-04 10:12:13 -0700228neverallow appdomain tee_device:chr_file { read write };
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400229
Nick Kralevich6634a102013-07-12 18:45:56 -0700230# Privileged netlink socket interfaces.
Nick Kralevichbe660692014-07-04 10:12:13 -0700231neverallow appdomain
Nick Kralevichbf626ce2015-01-28 17:46:30 -0800232 domain:{
Nick Kralevich6634a102013-07-12 18:45:56 -0700233 netlink_firewall_socket
234 netlink_tcpdiag_socket
235 netlink_nflog_socket
236 netlink_xfrm_socket
Nick Kralevich6634a102013-07-12 18:45:56 -0700237 netlink_audit_socket
238 netlink_ip6fw_socket
239 netlink_dnrt_socket
Nick Kralevich6634a102013-07-12 18:45:56 -0700240 } *;
241
Nick Kralevich36fb1f12014-09-21 23:35:24 -0700242# These messages are broadcast messages from the kernel to userspace.
243# Do not allow the writing of netlink messages, which has been a source
244# of rooting vulns in the past.
Nick Kralevichbf626ce2015-01-28 17:46:30 -0800245neverallow appdomain domain:netlink_kobject_uevent_socket { write append };
Nick Kralevich36fb1f12014-09-21 23:35:24 -0700246
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400247# Sockets under /dev/socket that are not specifically typed.
Nick Kralevichbe660692014-07-04 10:12:13 -0700248neverallow appdomain socket_device:sock_file write;
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400249
250# Unix domain sockets.
Nick Kralevichbe660692014-07-04 10:12:13 -0700251neverallow appdomain adbd_socket:sock_file write;
252neverallow appdomain installd_socket:sock_file write;
Martijn Coenen05383eb2014-09-25 15:13:41 -0700253neverallow { appdomain -bluetooth -radio -shell -system_app -nfc }
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400254 property_socket:sock_file write;
Nick Kralevichbe660692014-07-04 10:12:13 -0700255neverallow { appdomain -radio } rild_socket:sock_file write;
256neverallow appdomain vold_socket:sock_file write;
257neverallow appdomain zygote_socket:sock_file write;
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400258
Nick Kralevich6634a102013-07-12 18:45:56 -0700259# ptrace access to non-app domains.
Nick Kralevichbe660692014-07-04 10:12:13 -0700260neverallow appdomain { domain -appdomain }:process ptrace;
Nick Kralevich6634a102013-07-12 18:45:56 -0700261
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400262# Write access to /proc/pid entries for any non-app domain.
Nick Kralevichbe660692014-07-04 10:12:13 -0700263neverallow appdomain { domain -appdomain }:file write;
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400264
265# signal access to non-app domains.
266# sigchld allowed for parent death notification.
267# signull allowed for kill(pid, 0) existence test.
268# All others prohibited.
Nick Kralevichbe660692014-07-04 10:12:13 -0700269neverallow appdomain { domain -appdomain }:process
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400270 { sigkill sigstop signal };
271
Nick Kralevich6634a102013-07-12 18:45:56 -0700272# Transition to a non-app domain.
Stephen Smalley396015c2014-01-07 12:47:10 -0500273# Exception for the shell domain, can transition to runas, etc.
Stephen Smalleyd990a782014-07-29 14:50:30 -0400274neverallow { appdomain -shell } { domain -appdomain }:process
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400275 { transition dyntransition };
276
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400277# Write to rootfs.
Nick Kralevichbe660692014-07-04 10:12:13 -0700278neverallow appdomain rootfs:dir_file_class_set
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400279 { create write setattr relabelfrom relabelto append unlink link rename };
Nick Kralevich6634a102013-07-12 18:45:56 -0700280
281# Write to /system.
Nick Kralevichbe660692014-07-04 10:12:13 -0700282neverallow appdomain system_file:dir_file_class_set
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400283 { create write setattr relabelfrom relabelto append unlink link rename };
284
285# Write to entrypoint executables.
Nick Kralevichbe660692014-07-04 10:12:13 -0700286neverallow appdomain exec_type:file
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400287 { create write setattr relabelfrom relabelto append unlink link rename };
Nick Kralevich6634a102013-07-12 18:45:56 -0700288
289# Write to system-owned parts of /data.
290# This is the default type for anything under /data not otherwise
291# specified in file_contexts. Define a different type for portions
292# that should be writable by apps.
293# Exception for system_app for Settings.
Nick Kralevichbe660692014-07-04 10:12:13 -0700294neverallow { appdomain -system_app }
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400295 system_data_file:dir_file_class_set
296 { create write setattr relabelfrom relabelto append unlink link rename };
297
298# Write to various other parts of /data.
Nick Kralevichbe660692014-07-04 10:12:13 -0700299neverallow appdomain drm_data_file:dir_file_class_set
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400300 { create write setattr relabelfrom relabelto append unlink link rename };
Nick Kralevich480374e2014-10-16 15:00:19 -0700301neverallow { appdomain -system_app }
302 gps_data_file:dir_file_class_set
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400303 { create write setattr relabelfrom relabelto append unlink link rename };
Nick Kralevichbe660692014-07-04 10:12:13 -0700304neverallow { appdomain -platform_app }
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400305 apk_data_file:dir_file_class_set
306 { create write setattr relabelfrom relabelto append unlink link rename };
Nick Kralevichbe660692014-07-04 10:12:13 -0700307neverallow { appdomain -platform_app }
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400308 apk_tmp_file:dir_file_class_set
309 { create write setattr relabelfrom relabelto append unlink link rename };
Nick Kralevichbe660692014-07-04 10:12:13 -0700310neverallow { appdomain -platform_app }
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400311 apk_private_data_file:dir_file_class_set
312 { create write setattr relabelfrom relabelto append unlink link rename };
Nick Kralevichbe660692014-07-04 10:12:13 -0700313neverallow { appdomain -platform_app }
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400314 apk_private_tmp_file:dir_file_class_set
315 { create write setattr relabelfrom relabelto append unlink link rename };
Nick Kralevichbe660692014-07-04 10:12:13 -0700316neverallow { appdomain -shell }
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400317 shell_data_file:dir_file_class_set
Nick Kralevich2e7a3012014-01-10 23:05:25 -0800318 { create setattr relabelfrom relabelto append unlink link rename };
Nick Kralevichbe660692014-07-04 10:12:13 -0700319neverallow { appdomain -bluetooth }
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400320 bluetooth_data_file:dir_file_class_set
321 { create write setattr relabelfrom relabelto append unlink link rename };
Nick Kralevichbe660692014-07-04 10:12:13 -0700322neverallow appdomain
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400323 keystore_data_file:dir_file_class_set
324 { create write setattr relabelfrom relabelto append unlink link rename };
Nick Kralevichbe660692014-07-04 10:12:13 -0700325neverallow appdomain
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400326 systemkeys_data_file:dir_file_class_set
327 { create write setattr relabelfrom relabelto append unlink link rename };
Nick Kralevichbe660692014-07-04 10:12:13 -0700328neverallow appdomain
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400329 wifi_data_file:dir_file_class_set
330 { create write setattr relabelfrom relabelto append unlink link rename };
Nick Kralevichbe660692014-07-04 10:12:13 -0700331neverallow appdomain
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400332 dhcp_data_file:dir_file_class_set
333 { create write setattr relabelfrom relabelto append unlink link rename };
334
335# Access to factory files.
Nick Kralevicha8b651b2014-09-22 15:41:38 -0700336neverallow appdomain efs_file:dir_file_class_set write;
337neverallow { appdomain -shell } efs_file:dir_file_class_set read;
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400338
339# Write to various pseudo file systems.
Nick Kralevichbe660692014-07-04 10:12:13 -0700340neverallow { appdomain -bluetooth -nfc }
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400341 sysfs:dir_file_class_set write;
Nick Kralevichbe660692014-07-04 10:12:13 -0700342neverallow appdomain
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400343 proc:dir_file_class_set write;
344
345# Access to syslog(2) or /proc/kmsg.
Nick Kralevich685e2f92014-05-28 13:48:52 -0700346neverallow { appdomain -system_app }
Nick Kralevichf821b5a2014-05-27 16:49:59 -0700347 kernel:system { syslog_mod syslog_console };
Stephen Smalley42fb8242014-06-11 07:10:09 -0400348neverallow { appdomain -system_app -shell }
Nick Kralevichf821b5a2014-05-27 16:49:59 -0700349 kernel:system syslog_read;
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400350
351# Ability to perform any filesystem operation other than statfs(2).
352# i.e. no mount(2), unmount(2), etc.
Nick Kralevichbe660692014-07-04 10:12:13 -0700353neverallow appdomain fs_type:filesystem ~getattr;
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400354
355# Ability to set system properties.
Martijn Coenen05383eb2014-09-25 15:13:41 -0700356neverallow { appdomain -system_app -radio -shell -bluetooth -nfc }
Stephen Smalley2a273ad2013-09-27 10:55:59 -0400357 property_type:property_service set;