- Feb 04, 2015
-
-
Christopher Ferris authored
Without this change, any selinux warning you might get when running dumpstate from init do not show up when running from the shell as root. This change makes them run the same. Change-Id: I6b74e0f6f48f47952a2dbe7728b1853008f60dbb
-
- 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. Change-Id: I40de0ae28134ce71e808e5ef4a39779b71897571
-
- Jan 21, 2015
-
-
Nick Kralevich authored
Chrome team recommends reverting this patch and introducing it into a future version of Android, to avoid potential compatibility issues. This reverts commit 9de62d6f. Bug: 17471434 Bug: 18609318 Change-Id: I9adaa9d0e4cb6a592011336e442e9d414dbac470
-
- Jan 14, 2015
-
-
Nick Kralevich authored
SELinux domains wanting read access to /proc/net need to explicitly declare it. TODO: fixup the ListeningPortsTest cts test so that it's not broken. Bug: 9496886 Change-Id: Ia9f1214348ac4051542daa661d35950eb271b2e4
-
- Dec 02, 2014
-
-
Stephen Smalley authored
Only allow it to read/write/stat already open app data files received via Binder or local socket IPC. Change-Id: Ie66f240e109410a17aa93d9d5dea4c2b87d47009 Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
- Nov 12, 2014
-
- Oct 17, 2014
-
-
Nick Kralevich authored
This is causing the version of Chrome in Android's tree to crash. The version of Chrome in Android's tree does not have the following patch: https://codereview.chromium.org/630123003 Until Chrome updates the version in Android's tree, we need to revert. Works around the following denials: audit(0.0:19): avc: denied { search } for name="com.android.chrome" dev="mmcblk0p28" ino=1474658 scontext=u:r:isolated_app:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir audit(0.0:20): avc: denied { getattr } for path="/data/data/com.android.chrome" dev="mmcblk0p28" ino=1474658 scontext=u:r:isolated_app:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir audit(0.0:21): avc: denied { getattr } for path="/data/data/com.android.chrome" dev="mmcblk0p28" ino=1474658 scontext=u:r:isolated_app:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir This reverts commit 669a9773. Bug: 18006219 Change-Id: Id44137ec6a0dfe4a597b34ab3dad9e3feecc2a5e
-
- Oct 16, 2014
-
-
Stephen Smalley authored
Change-Id: I29136a805d2329806afc9d5d81af934a1803d8e0 Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
Nick Kralevich authored
Currently, zygote spawned apps are prohibited from modifying GPS data files. If someone tries to allow GPS access to any app domain, it generates a compile time / CTS exception. Relax the rules slightly for system_app. These apps run with UID=system, and shouldn't be banned from handling gps data files. This change doesn't add or remove any SELinux rules. Rather, it just relaxes a compile time assertion, allow partners to create SELinux rules allowing the access if they desire. (cherrypick from commit 480374e4) Bug: 18021422 Change-Id: Iad0c6a3627efe129246e2c817f6f71d2735eba93
-
Nick Kralevich authored
Currently, zygote spawned apps are prohibited from modifying GPS data files. If someone tries to allow GPS access to any app domain, it generates a compile time / CTS exception. Relax the rules slightly for system_app. These apps run with UID=system, and shouldn't be banned from handling gps data files. This change doesn't add or remove any SELinux rules. Rather, it just relaxes a compile time assertion, allow partners to create SELinux rules allowing the access if they desire. Bug: 18021422 Change-Id: Iad0c6a3627efe129246e2c817f6f71d2735eba93
-
- Oct 15, 2014
-
-
Robin Lee authored
Migrators should be allowed to write to /data/misc/keychain in order to remove it. Similarly /data/misc/user should be writable by system apps. TODO: Revoke zygote's rights to read from /data/misc/keychain on behalf of some preloaded security classes. Bug: 17811821 Change-Id: I9e9c6883cff1dca3755732225404909c16a0e547
-
- Oct 06, 2014
-
-
Stephen Smalley authored
Only allow it to read/write/stat already open app data files received via Binder or local socket IPC. Change-Id: I3c096607a74fd0f360d41f3e6f06535ca00c58ec Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
- Sep 26, 2014
-
-
Martijn Coenen authored
(cherry pick of commit 05383ebf) Bug: 17298769 Change-Id: I1994ff9f9da9b13249099f6c9bcec88dcdc2bb97
- Sep 25, 2014
-
-
Martijn Coenen authored
Bug: 17298769 Change-Id: I1994ff9f9da9b13249099f6c9bcec88dcdc2bb97
-
Nick Kralevich authored
Apps should be able to read the contents of mounted OBBs. Steps to reproduce: 1) Install com.namcobandaigames.soulcaliburgp (SoulCalibur) 2) Attempt to run the app. Expected: App runs successfully. Actual: App crashes. See denials below. This can also be reproduced by running the newly introduced CTS test in I2018b63b0236ce6b5aee4094e40473315b1948c3 Addresses the following denials: avc: denied { read } for pid=4133 comm="roidJUnitRunner" name="test1.txt" dev="loop0" ino=23 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:vfat:s0 tclass=file avc: denied { open } for pid=4133 comm="roidJUnitRunner" name="test1.txt" dev="loop0" ino=23 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:vfat:s0 tclass=file avc: denied { getattr } for pid=4133 comm="roidJUnitRunner" path="/mnt/obb/f73da56689d166b5389d49ad31ecbadb/test1.txt" dev="loop0" ino=23 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:vfat:s0 tclass=file avc: denied { search } for name="/" dev="loop0" ino=1 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:vfat:s0 tclass=dir permissive=0 (cherrypick of commit 62083414) Bug: 17633509 Change-Id: I49b722b24c1c7d9ab084ebee7c1e349d8d660ffa
-
- Sep 24, 2014
-
-
Nick Kralevich authored
Apps should be able to read the contents of mounted OBBs. Steps to reproduce: 1) Install com.namcobandaigames.soulcaliburgp (SoulCalibur) 2) Attempt to run the app. Expected: App runs successfully. Actual: App crashes. See denials below. This can also be reproduced by running the newly introduced CTS test in I2018b63b0236ce6b5aee4094e40473315b1948c3 Addresses the following denials: avc: denied { read } for pid=4133 comm="roidJUnitRunner" name="test1.txt" dev="loop0" ino=23 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:vfat:s0 tclass=file avc: denied { open } for pid=4133 comm="roidJUnitRunner" name="test1.txt" dev="loop0" ino=23 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:vfat:s0 tclass=file avc: denied { getattr } for pid=4133 comm="roidJUnitRunner" path="/mnt/obb/f73da56689d166b5389d49ad31ecbadb/test1.txt" dev="loop0" ino=23 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:vfat:s0 tclass=file avc: denied { search } for name="/" dev="loop0" ino=1 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:vfat:s0 tclass=dir permissive=0 Bug: 17633509 Change-Id: I49b722b24c1c7d9ab084ebee7c1e349d8d660ffa
-
- Sep 23, 2014
-
-
Nick Kralevich authored
During factory provisioning, some manufacturers may need to pull files from /factory (label efs_file and bluetooth_efs_file) to collect device specific identifiers such as the mac address, using commands similar to the following: adb shell cat /factory/ssn adb shell cat /factory/bt/bd_addr.conf adb shell cat /factory/wifi/mac.txt adb shell cat /factory/60isn read-only access to these files is currently disallowed by a neverallow rule. Relax the rules to allow read-only access to the shell user if desired. No new SELinux rules are added or deleted by this change. This is only a relaxation in what's allowed for vendor specific policy. Bug: 17600278 (cherry picked from commit 200a9f0e) Change-Id: I2e277b1068a35cc06e0973df994ec3a49f2c26e7
-
- Sep 22, 2014
-
-
Nick Kralevich authored
During factory provisioning, some manufacturers may need to pull files from /factory (label efs_file and bluetooth_efs_file) to collect device specific identifiers such as the mac address, using commands similar to the following: adb shell cat /factory/ssn adb shell cat /factory/bt/bd_addr.conf adb shell cat /factory/wifi/mac.txt adb shell cat /factory/60isn read-only access to these files is currently disallowed by a neverallow rule. Relax the rules to allow read-only access to the shell user if desired. No new SELinux rules are added or deleted by this change. This is only a relaxation in what's allowed for vendor specific policy. Bug: 17600278 Change-Id: I13f33f996c077918dce70a5cff31a87eac436678
-
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
-
- Sep 11, 2014
-
-
Robert Sesek authored
Bug: 17471434 Change-Id: I6fd1079be29a454f46ab84f0c43fcf816e679c98
- Sep 09, 2014
-
-
dcashman authored
Remove permission from appdomain. Bug: 16866291 Change-Id: I37936fed33c337e1ab2816258c2aff52700af116
-
- Sep 01, 2014
-
-
Mark Salyzyn authored
I/auditd(19949): type=1400 audit(0.0:71): avc: denied { write } for comm="logcat" name="logd" dev="tmpfs" ino=5924 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:logd_socket:s0 tclass=sock_file (cherry picked from 60f0be84) Bug: 17323719 Change-Id: Id8399195196ffad884eef98030d544c68ed0596f
-
Mark Salyzyn authored
I/auditd(19949): type=1400 audit(0.0:71): avc: denied { write } for comm="logcat" name="logd" dev="tmpfs" ino=5924 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:logd_socket:s0 tclass=sock_file Bug: 17323719 Change-Id: Id8399195196ffad884eef98030d544c68ed0596f
-
- Aug 27, 2014
-
-
dcashman authored
Also enable global reading of kernel policy file. Motivation for this is to allow read access to the kernel version of the binary selinux policy. Bug: 17288791 Change-Id: I1eefb457cea1164a8aa9eeb7683b3d99ee56ca99
-
dcashman authored
Address: type=1400 audit(0.0:103): avc: denied { read } for name="arm" dev="mmcblk0p28" ino=195471 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:apk_data_file:s0 tclass=dir Bug: 16204150 Change-Id: I8bf0172b26b780c110c0d95c691785143acd7dd2
-
- Aug 25, 2014
-
-
Nick Kralevich authored
Remove the CTS specific rule which allows appdomain processes to view /proc entries for the rest of the system. With this change, an SELinux domain will only be able to view it's own /proc entries, e.g. untrusted_app can only view /proc entries for other untrusted_app, system_app can only view /proc entries for other system_apps, etc. /proc contains sensitive information, and we want to avoid leaking this information between app security domains. Bug: 17254920 Change-Id: I59da37dde00107a5ab123df3b79a84afa855339f
-
- Aug 22, 2014
-
-
dcashman authored
Also enable global reading of kernel policy file. Motivation for this is to allow read access to the kernel version of the binary selinux policy. Change-Id: I1eefb457cea1164a8aa9eeb7683b3d99ee56ca99
-
- Jul 30, 2014
-
-
Stephen Smalley authored
Fix two neverallow rules that yield Invalid SELinux context warnings from the CTS SELinuxTest. For transitions from app domains, we only need to check { domain -appdomain } (i.e. domains other than app domains), not ~appdomain (i.e. all types other than app domains). Otherwise SELinuxTest tries to generate contexts with the r role and non-domain types for testing since the target class is process, and such contexts are invalid. For keeping file_type and fs_type exclusive, we only need to check associate permission, not all filesystem permissions, as only associate takes a file type as the source context. Otherwise SELinuxTest tries to generate contexts with the r role and non-domain types for testing filesystem permissions other than associate, since the source of such checks is normally a process context. Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov> (cherry picked from commit 21ada26d) Change-Id: I3346584da9b89f352864dcc30dde06d6bf42e98e
-
- Jul 29, 2014
-
-
Stephen Smalley authored
Fix two neverallow rules that yield Invalid SELinux context warnings from the CTS SELinuxTest. For transitions from app domains, we only need to check { domain -appdomain } (i.e. domains other than app domains), not ~appdomain (i.e. all types other than app domains). Otherwise SELinuxTest tries to generate contexts with the r role and non-domain types for testing since the target class is process, and such contexts are invalid. For keeping file_type and fs_type exclusive, we only need to check associate permission, not all filesystem permissions, as only associate takes a file type as the source context. Otherwise SELinuxTest tries to generate contexts with the r role and non-domain types for testing filesystem permissions other than associate, since the source of such checks is normally a process context. Change-Id: I6c2f63f4786d75294a6938613ba14b64212fc802 Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
- Jul 15, 2014
- Jul 10, 2014
-
-
Nick Kralevich authored
Currently, dex2oat runs in the installd sandbox, and has all the SELinux capabilities that installd does. That's too excessive. dex2oat handles untrusted user data, so we want to put it in it's own tighter sandbox. Bug: 15358102 Change-Id: I08083b84b9769e24d6dad6dbd12401987cb006be
-
- Jul 08, 2014
-
-
Stephen Smalley authored
Rename sdcard_internal/external types to fuse and vfat respectively to make it clear that they are assigned to any fuse or vfat filesystem by default (absent a context= mount option) and do not necessarily represent the SDcard. The sdcard_type attribute is still assigned to both types and can still be used in allow rules to permit access to either the internal or external SDcard. Define type aliases for the old names to preserve compatibility on policy reload and for device-specific policies that may not yet be updated. Change-Id: I8d91a8c4c1342b94e4f1bb62ca7ffd2ca4b06ba1 Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
- Jul 04, 2014
-
-
Nick Kralevich authored
Many of the neverallow rules have -unconfineddomain. This was intended to allow us to support permissive_or_unconfined(), and ensure that all domains were enforcing at least a minimal set of rules. Now that all the app domains are in enforcing / confined, there's no need to allow for these exceptions. Remove them. Change-Id: Ieb29872dad415269f7fc2fe5be5a3d536d292d4f
-
- Jul 01, 2014
-
-
Sharvil Nanavati authored
Change-Id: Ic7b25e79116b90378e5e89a879d8e6b87e4f052e
-
Riley Spahn authored
Remove the auditallow statements from app.te and binderservicedomain.te which were causing log spam. Change-Id: If1c33d1612866df9f338e6d8c19d73950ee028eb
-
- Jun 26, 2014
-
-
Riley Spahn authored
Add keystore_key class and an action for each action supported by keystore. Add policies that replicate the access control that already exists in keystore. Add auditallow rules for actions not known to be used frequently. Add macro for those domains wishing to access keystore. Change-Id: Iddd8672b9e9b72b45ee208e6eda608cc9dc61edc
-