- Jun 05, 2015
-
-
Jeff Vander Stoep authored
Create a macro of unprivileged ioctls including - All common socket ioctls except MAC address - All wireless extensions ioctls except get/set ESSID - Some commonly used tty ioctls Bug: 21657002 Change-Id: Ib08be9cb70d08c1fa2c8bddbae519e7c2df5293c
-
- May 19, 2015
-
-
Jeff Sharkey authored
As an optimization, platform components like MediaProvider may choose to shortcut past the FUSE daemon and return open file descriptors directly pointing at the underlying storage device. Now that we have a specific label for /mnt/media_rw, we need to grant search access to untrusted apps like MediaProvider. The actual access control is still managed by POSIX permissions on that directory. avc: denied { search } for name="media_rw" dev="tmpfs" ino=4150 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:mnt_media_rw_file:s0 tclass=dir permissive=0 Bug: 21017105 Change-Id: I6d51939668b39b43b91b1f0c24c98bc2205bf511
-
- May 15, 2015
-
-
Jeff Vander Stoep authored
Allow tty ioctls TIOCOUTQ 0x5411 and FIOCLEX 0x5451. Allow/audit all wireless extension ioctls. Bug: 21120188 Change-Id: Icd447ee40351c615c236f041931d210751e0f0c3
-
- May 13, 2015
-
-
Nick Kralevich authored
Programs routinely scan through /system, looking at the files there. Don't generate an SELinux denial when it happens. Bug: 21120228 Change-Id: I85367406e7ffbb3e24ddab6f97448704df990603
-
- May 06, 2015
-
-
Dehao Chen authored
Bug: 19483574 (cherry picked from commit 7d66f783) Change-Id: If617e29b6fd36c88c157941bc9e11cf41329da48
-
- May 05, 2015
-
-
Jeff Vander Stoep authored
MAC address access is no longer allowed via the java API. Deny access from native code. Bug: 17787238 Change-Id: Ia337317d5927349b243bbbd5c2cf393911771cdf
-
- Apr 29, 2015
-
-
Alex Klyubin authored
This enables access to gatekeeperd for anybody who invokes Android framework APIs. This is necessary because the AndroidKeyStore abstraction offered by the framework API occasionally communicates with gatekeeperd from the calling process. (cherry picked from commit effcac7d) Bug: 20526234 Change-Id: I450242cd085259b3f82f36f359ee65ff27bebd13
-
- Apr 18, 2015
-
-
Nick Kralevich authored
Use a more specific label for /data/misc/gatekeeper Rearrange some other rules. Change-Id: Ib634e52526cf31a8f0a0e6d12bbf0f69dff8f6b5
-
- Apr 09, 2015
-
-
dcashman authored
Move the remaining services from tmp_system_server_service to appropriate attributes and remove tmp_system_server and associated logging: registry restrictions rttmanager scheduling_policy search sensorservice serial servicediscovery statusbar task textservices telecom_service trust_service uimode updatelock usagestats usb user vibrator voiceinteraction wallpaper webviewupdate wifip2p wifi window Bug: 18106000 Change-Id: Ia0a6d47099d82c53ba403af394537db6fbc71ca0
-
- Apr 08, 2015
-
-
dcashman authored
Move the following services from tmp_system_server_service to appropriate attributes: network_management network_score notification package permission persistent power print processinfo procstats Bug: 18106000 Change-Id: I9dfb41fa41cde72ef0059668410a2e9eb1af491c
-
- Apr 07, 2015
-
-
dcashman authored
Move the following services from tmp_system_server_service to appropriate attributes: jobscheduler launcherapps location lock_settings media_projection media_router media_session mount netpolicy netstats Bug: 18106000 Change-Id: Ia82d475ec41f658851f945173c968f4abf57e7e1
-
dcashman authored
Move the following services from tmp_system_server_service to appropriate attributes: diskstats display dreams dropbox ethernet fingerprint graphicstats hardware hdmi_control input_method input_service Bug: 18106000 Change-Id: Iadd8aab9e78d9d39fb00cf0b5a95fa1927d02095
-
dcashman authored
Move the following services from tmp_system_server_service to appropriate attributes: battery bluetooth_manager clipboard commontime_management connectivity content country_detector device_policy deviceidle Bug: 18106000 Change-Id: I0d0f2a075c0509a783631d88ba453ac13399cdf2
-
- Apr 06, 2015
-
-
dcashman authored
Assign the alarm, appwidget, assetatlas, audio, backup and batterystats services the appropriate service access levels and move into enforcing. Bug: 18106000 Change-Id: If3210bb25f3076edfdb6eec36ef6521ace1bd8d7
-
- Apr 03, 2015
-
-
dcashman authored
Move accessibility, account, appops and activity services into enforcing with app_api_service level of access, with additional grants to mediaserver and isolated app. Bug: 18106000 Change-Id: I1d5a79b9223026415f1690e8e9325ec4c270e3dd
-
dcashman authored
System services differ in designed access level. Add attributes reflecting this distinction and label services appropriately. Begin moving access to the newly labeled services by removing them from tmp_system_server_service into the newly made system_server_service attribute. Reflect the move of system_server_service from a type to an attribute by removing access to system_server_service where appropriate. Change-Id: I7fd06823328daaea6d6f96e4d6bd00332382230b
-
- Apr 01, 2015
-
-
dcashman authored
Get ready to switch system_server service lookups into enforcing. Bug: 18106000 Change-Id: Iefd4b2eee6cdd680f5ab423d15cc72a2a30e27cf
-
- Mar 27, 2015
-
-
John Reck authored
Change-Id: I156b139b57f46c695ece35b7b26a3087d87b25df
-
Nick Kralevich authored
Modify create_file_perms and create_dir_perms so it doesn't have the "link" permission. This permission controls whether hard links are allowed or not on the given file label. Hard links are a common source of security bugs, and isn't something we want to support by default. Get rid of link_file_perms and move the necessary permissions into create_file_perms and create_dir_perms. Nobody is using this macro, so it's pointless to keep it around. Get rid of unlink on directories. It returns EISDIR if you attempt to do it, independent of SELinux permissions. SELinux domains which have a need for hard linking for a particular file type can add it back to their permission set on an as-needed basis. Add a compile time assertion (neverallow rule) for untrusted_app. It's particularly dangerous for untrusted_app to ever have hard link capabilities, and the neverallow rule will prevent regressions. Bug: 19953790 Change-Id: I5e9493d2bf5da460d074f0bc5ad8ba7c14dec6e0
-
- Mar 13, 2015
-
-
Stephen Smalley authored
Assigning mlstrustedsubject to untrusted_app would undermine the per-user isolation model being enforced via levelFrom=user in seapp_contexts and the mls constraints. There is no direct way to specify a neverallow on attribute assignment, but this makes use of a particular property of the fork permission to prevent ever adding mlstrustedsubject to untrusted_app. A similar restriction for app_data_file and mlstrustedobject is also important for the same reason, but cannot be expressed as a neverallow. Change-Id: I5170cadc55cc614aef0cd5f6491de8f69a4fa2a0 Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
Stephen Smalley authored
There were a few instances where allow rules were appended after the neverallow rules stanza in the .te file. Also there were some regular allow rules inserted into the CTS-specific rules section of app.te. Just move the rules as appropriate. Should be no change in policy. Change-Id: Iec76f32d4b531d245bbf5dd9f621a71ff5c71f3e Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
- Mar 06, 2015
-
-
dcashman authored
Bug: 18106000 Change-Id: I80b574f73d53439dd710ccdb8f05cc2f9e9a10b4
-
Nick Kralevich authored
The GMS core feedback agent runs as untrusted_app, and needs the ability to read /data/anr/traces.txt to report ANR information. Allow all untrusted_apps to read /data/anr/traces.txt so that GMS core can access it. Longer term, we need to move GMS core into it's own domain, but that's a longer term change. Addresses the following denial: W/ndroid.feedback(17825): type=1400 audit(0.0:68004): avc: denied { read } for name="traces.txt" dev="mmcblk0p28" ino=325762 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:anr_data_file:s0 tclass=file (cherrypick from commit e2547c3b) Bug: 18504118 Bug: 18340553 Change-Id: I8b472b6ab7dfe2a73154033e0a088b8e26396fa8
-
- Mar 05, 2015
-
-
Nick Kralevich authored
Change-Id: I5ae9606023ef7f3489f44e6657766e922160c470
-
- Mar 03, 2015
-
-
dcashman authored
Also formally allow dumpstate access to all services and grant system_server access to address the following non-system_server_service entries: avc: granted { find } for service=drm.drmManager scontext=u:r:system_server:s0 tcontext=u:object_r:drmserver_service:s0 tclass=service_manager avc: granted { find } for service=nfc scontext=u:r:system_server:s0 tcontext=u:object_r:nfc_service:s0 tclass=service_manager Bug: 18106000 Change-Id: Iad16b36acf44bce52c4824f8b53c0e7731c25602
-
- Mar 02, 2015
-
-
dcashman authored
Encountered when certinstaller tries to talk to keystore: ComponentInfo{com.android.certinstaller/com.android.certinstaller.CertInstaller}: java.lang.NullPointerException: Attempt to invoke interface method 'int android.security.IKeystoreService.test()' on a null object reference Address the following denial: avc: denied { find } for service=android.security.keystore scontext=u:r:platform_app:s0:c512,c768 tcontext=u:object_r:keystore_service:s0 tclass=service_manager Bug: 19347232 Change-Id: I35b46da3c78b384cf04216be937c6b5bfa86452d
-
- Feb 05, 2015
-
-
Nick Kralevich authored
Relax the neverallow netlink restrictions for app domains. In particular, some non-AOSP app domains may use netlink sockets to communicate with a kernel driver. Continue to neverallow generic netlink sockets for untrusted_app. The intention here is that only app domains which explicitly need this functionality should be able to request it. This change does not add or remove any SELinux rules. Rather, it just changes SELinux compile time assertions, as well as allowing this behavior in CTS. Modify other neverallow rules to use "domain" instead of "self". Apps shouldn't be able to handle netlink sockets, even those created in other SELinux domains. (cherry picked from commit d31936f8) Change-Id: I4763cb0c9510220693c506636dbb7584712b67e2
-
- Jan 29, 2015
-
-
Nick Kralevich authored
Relax the neverallow netlink restrictions for app domains. In particular, some non-AOSP app domains may use netlink sockets to communicate with a kernel driver. Continue to neverallow generic netlink sockets for untrusted_app. The intention here is that only app domains which explicitly need this functionality should be able to request it. This change does not add or remove any SELinux rules. Rather, it just changes SELinux compile time assertions, as well as allowing this behavior in CTS. Modify other neverallow rules to use "domain" instead of "self". Apps shouldn't be able to handle netlink sockets, even those created in other SELinux domains. (cherry picked from commit d31936f8) Bug: 19198997 Change-Id: Icfed1ee66f082df1117b090341f62981f01bc849
-
Nick Kralevich authored
Relax the neverallow netlink restrictions for app domains. In particular, some non-AOSP app domains may use netlink sockets to communicate with a kernel driver. Continue to neverallow generic netlink sockets for untrusted_app. The intention here is that only app domains which explicitly need this functionality should be able to request it. This change does not add or remove any SELinux rules. Rather, it just changes SELinux compile time assertions, as well as allowing this behavior in CTS. Modify other neverallow rules to use "domain" instead of "self". Apps shouldn't be able to handle netlink sockets, even those created in other SELinux domains. Change-Id: I40de0ae28134ce71e808e5ef4a39779b71897571
-
- Jan 17, 2015
-
-
dcashman authored
Reduce logspam and record further observed service connections. Bug: 18106000 Change-Id: I9a57e4bb8f1c8e066861719fb208c691498842a8
-
- Jan 15, 2015
-
-
dcashman authored
Address observed audit logs of the form: granted { find } for service=XXX scontext=u:r:YYY:s0:c512,c768 tcontext=u:object_r:XXX_service:s0 tclass=service_manager in order to record existing relationships with services. Bug: 18106000 Change-Id: I99a68f329c17ba67ebf3b87729b8405bdc925ef4
-
- Jan 14, 2015
-
-
dcashman authored
Temporarily give every system_server_service its own domain in preparation for splitting it and identifying special services or classes of services. Change-Id: I81ffbdbf5eea05e0146fd7fd245f01639b1ae0ef
-
- Dec 15, 2014
-
-
dcashman authored
All domains are currently granted list and find service_manager permissions, but this is not necessary. Pare the permissions which did not trigger any of the auditallow reporting. Bug: 18106000 Change-Id: Ie0ce8de2af8af2cbe4ce388a2dcf4534694c994a
-
- Dec 12, 2014
-
-
Pawit Pornkitprasan authored
Required for Settings to show name/icon of apps on sd card (permission copied from untrusted_app) Also removed duplicate permission (from domain) in untrusted_app (cherry picked from commit c06ed8f7) Bug: 18730865 Change-Id: I725d088d1d4a1256e3bfe49bc32796a54889f925
-
Pawit Pornkitprasan authored
Required for Settings to show name/icon of apps on sd card (permission copied from untrusted_app) Also removed duplicate permission (from domain) in untrusted_app Change-Id: Ib2b3bee4dfb54ad5e45b392fd9bfd65add4a00bf
-
- Dec 04, 2014
-
-
Nick Kralevich authored
The GMS core feedback agent runs as untrusted_app, and needs the ability to read /data/anr/traces.txt to report ANR information. Allow all untrusted_apps to read /data/anr/traces.txt so that GMS core can access it. Longer term, we need to move GMS core into it's own domain, but that's a longer term change. Addresses the following denial: W/ndroid.feedback(17825): type=1400 audit(0.0:68004): avc: denied { read } for name="traces.txt" dev="mmcblk0p28" ino=325762 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:anr_data_file:s0 tclass=file Bug: 18504118 Bug: 18340553 Change-Id: Ia9fac599befc3a3b6e5282be15ec8fd04bb23385
-
- Oct 14, 2014
-
-
Nick Kralevich authored
Change-Id: I2911d2b5d1931c6f6245cc54465458a8a3c2b2bb
-
- Sep 22, 2014
-
-
Nick Kralevich authored
Netlink uevent sockets are used by the kernel to inform userspace when certain events occur, for example, when new hardware is added or removed. This allows userspace to take some action based on those messages. Relax the neverallow rule for NETLINK_KOBJECT_UEVENT sockets. Certain device specific app domains, such as system_app, may have a need to receive messages from this socket type. Continue to neverallow NETLINK_KOBJECT_UEVENT sockets for untrusted_app. These sockets have been the source of rooting attacks in Android in the past, and it doesn't make sense to expose this to untrusted_apps. No new SELinux rules are introduced by this change. This is an adjustment of compile time assertions only. Bug: 17525863 (cherry picked from commit 642b8042) Change-Id: I35f3dc8b1ead9f427645a13fb202e760d1e68e64
-
Nick Kralevich authored
Netlink uevent sockets are used by the kernel to inform userspace when certain events occur, for example, when new hardware is added or removed. This allows userspace to take some action based on those messages. Relax the neverallow rule for NETLINK_KOBJECT_UEVENT sockets. Certain device specific app domains, such as system_app, may have a need to receive messages from this socket type. Continue to neverallow NETLINK_KOBJECT_UEVENT sockets for untrusted_app. These sockets have been the source of rooting attacks in Android in the past, and it doesn't make sense to expose this to untrusted_apps. No new SELinux rules are introduced by this change. This is an adjustment of compile time assertions only. Bug: 17525863 Change-Id: I3e538dc8096dc23b9678bcd20e3c1e742c21c967
-
- Aug 07, 2014
-
-
dcashman authored
Before actual installation, apks are put in a staging area where they are scanned by a verifier before completing the install flow. This verifier runs as a priv-app, which is in the untrusted_app domain. Allow untrusted_app read-access to these files. Bug: 16515815 Change-Id: Ifedc12a33b1f53b62f45013e7b253dbc79b02a4e
-