- May 13, 2014
-
-
Nick Kralevich authored
Too many leaky files in that directory. It's a security best practice to not mount this filesystem, however, we need it mounted for tracing support. Even though it's mounted, make sure the files aren't readable. Bug: 11635985 Change-Id: I6f116c0a03a567a8107a8e07135ce025e51458dd
-
- May 01, 2014
-
-
Stephen Smalley authored
Change-Id: I4811da972f7e23ef86e04d05400169422fbaca35 Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
- Apr 04, 2014
-
-
Stephen Smalley authored
This change folds the shared_app, media_app, and release_app domains into untrusted_app, reducing the set of app domains down to just distinct domains for the fixed UID apps (e.g. system_app, bluetooth, nfc, radio), a single domain for apps signed by the platform key (platform_app), and a single domain for all other apps (untrusted_app). Thus, SELinux only distinguishes when already distinguished by a predefined Android ID (AID) or by the platform certificate (which get the signature-only Android permissions and thus may require special OS-level accesses). It is still possible to introduce specific app domains for specific apps by adding signer and package stanzas to mac_permissions.xml, but this can be done on an as-needed basis for specialized apps that require particular OS-level permissions outside the usual set. As there is now only a single platform app domains, get rid of the platformappdomain attribute and platform_app_domain() macro. We used to add mlstrustedsubject to those domains but drop this since we are not using MLS in AOSP presently; we can revisit which domains need it if/when we use MLS. Since we are dropping the shared, media, and release seinfo entries from seapp_contexts, drop them from mac_permissions.xml as well. However, we leave the keys.conf entries in case someone wants to add a signer entry in the future for specific apps signed by those keys to mac_permissions.xml. Change-Id: I877192cca07360c4a3c0ef475f016cc273e1d968 Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
- Mar 07, 2014
-
-
Stephen Smalley authored
Coalesce a number of allow rules replicated among multiple app domains. Get rid of duplicated rules already covered by domain, appdomain, or platformappdomain rules. Split the platformappdomain rules to their own platformappdomain.te file, document them more fully, and note the inheritance in each of the relevant *_app.te files. Generalize isolated app unix_stream_socket rules to all app domains to resolve denials such as: avc: denied { read write } for pid=11897 comm="Binder_2" path="socket:[203881]" dev="sockfs" ino=203881 scontext=u:r:release_app:s0 tcontext=u:r:untrusted_app:s0 tclass=unix_stream_socket avc: denied { getattr } for pid=11990 comm=4173796E635461736B202334 path="socket:[203881]" dev="sockfs" ino=203881 scontext=u:r:release_app:s0 tcontext=u:r:untrusted_app:s0 tclass=unix_stream_socket avc: denied { getopt } for pid=11990 comm=4173796E635461736B202334 scontext=u:r:release_app:s0 tcontext=u:r:untrusted_app:s0 tclass=unix_stream_socket avc: denied { read write } for pid=6890 comm="Binder_10" path="socket:[205010]" dev="sockfs" ino=205010 scontext=u:r:release_app:s0 tcontext=u:r:media_app:s0 tclass=unix_stream_socket avc: denied { getattr } for pid=11990 comm=4173796E635461736B202334 path="socket:[205010]" dev="sockfs" ino=205010 scontext=u:r:release_app:s0 tcontext=u:r:media_app:s0 tclass=unix_stream_socket avc: denied { getopt } for pid=11990 comm=4173796E635461736B202334 scontext=u:r:release_app:s0 tcontext=u:r:media_app:s0 tclass=unix_stream_socket Change-Id: I770d7d51d498b15447219083739153265d951fe5 Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
- Feb 24, 2014
-
-
Stephen Smalley authored
These same permissions are already allowed via net_domain() and the rules in net.te. Change-Id: I4681fb9993258b4ad668333ad7d7102e983b5c2b Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
- Feb 21, 2014
-
-
Stephen Smalley authored
The current inline documentation is not entirely accurate and caused user confusion, e.g. see: https://groups.google.com/d/msg/android-security-discuss/javBrPT8ius/C4EVEFUu4ZoJ Try to clarify the meaning of untrusted_app, how app domains are assigned, and how to move other system apps out of untrusted_app into a different domain. Change-Id: I98d344dd078fe9e2738b68636adaabda1f4b3c3a Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
- Feb 11, 2014
-
-
Robert Craig authored
This new type will allow us to write finer-grained policy concerning asec containers. Some files of these containers need to be world readable. Change-Id: Iefee74214d664acd262edecbb4f981d633ff96ce Signed-off-by:
rpcraig <rpcraig@tycho.ncsc.mil>
-
- Jan 11, 2014
-
-
Nick Kralevich authored
Permissive domains are only intended for development. When a device launches, we want to ensure that all permissive domains are in, at a minimum, unconfined+enforcing. Add FORCE_PERMISSIVE_TO_UNCONFINED to Android.mk. During development, this flag is false, and permissive domains are allowed. When SELinux new feature development has been frozen immediately before release, this flag will be flipped to true. Any previously permissive domains will move into unconfined+enforcing. This will ensure that all SELinux domains have at least a minimal level of protection. Unconditionally enable this flag for all user builds. Change-Id: I1632f0da0022c80170d8eb57c82499ac13fd7858
-
- Dec 11, 2013
-
-
Stephen Smalley authored
Various third party apps come with their own binaries that they write out to their sandbox directories and then execute, e.g.: audit(1386527439.462:190): avc: denied { execute_no_trans } for pid=1550 comm="Thread-79" path="/data/data/com.cisco.anyconnect.vpn.android.avf/app_bin/busybox" dev="mmcblk0p23" ino=602891 scontext=u:r:untrusted_app:s0:c39,c256 tcontext=u:object_r:app_data_file:s0:c39,c256 tclass=file While this is not ideal from a security POV, it seems necessary to support for compatibility with Android today. Split out the execute-related permissions to a separate allow rule as it only makes sense for regular files (class file) not other kinds of files (e.g. fifos, sockets, symlinks), and use the rx_file_perms macro. Move the rule to untrusted_app only so that we do not permit system apps to execute files written by untrusted apps. Change-Id: Ic9bfe80e9b14f2c0be14295c70f23f09691ae66c Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
- Sep 27, 2013
-
-
Stephen Smalley authored
Add a create_pty() macro that allows a domain to create and use its own ptys, isolated from the ptys of any other domain, and use that macro for untrusted_app. This permits the use of a pty by apps without opening up access to ptys created by any other domain on the system. Change-Id: I5d96ce4d1b26073d828e13eb71c48d1e14ce7d6b Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
- Sep 04, 2013
-
-
Nick Kralevich authored
At this point, we still don't understand the root cause of bug 10290009, or if it's even a real bug. Rollback 29d0d406 so we an get a device in this state and figure out the root cause of this problem. This reverts commit 29d0d406. Bug: 10290009
-
- Aug 17, 2013
-
-
Geremy Condra authored
Bug: 10290009 Change-Id: Ic794299261672b36a2b630893b65ab176c3eee6b (cherry picked from commit eaa4e844e4c8549c9b4808a1272876a6995ca5a7)
-
- Aug 16, 2013
-
-
Geremy Condra authored
Bug: 10290009 Change-Id: Ic794299261672b36a2b630893b65ab176c3eee6b (cherry picked from commit eaa4e844e4c8549c9b4808a1272876a6995ca5a7)
-
- Jul 16, 2013
-
-
Alex Klyubin authored
Change-Id: Ided2cf793e94bb58529789c3075f8480c0d0cf4e
-
Nick Kralevich authored
OTAs aren't properly labeling /system, which is causing SELinux breakage. Temporarily put isolated_app.te and untrusted_app.te into permissive. Bug: 9878561 Change-Id: Icaf674ad6b3d59cbca3ae796c930c98ab67cae9c
-
Nick Kralevich authored
OTAs aren't properly labeling /system, which is causing SELinux breakage. Temporarily put isolated_app.te and untrusted_app.te into permissive. Bug: 9878561 Change-Id: Icaf674ad6b3d59cbca3ae796c930c98ab67cae9c
-
Nick Kralevich authored
Bug: 9872463 Change-Id: I47eabeace3387afd24c0fd4bee70e77c0a3586d5
-
- Jul 15, 2013
-
-
Nick Kralevich authored
This is needed to support "Verify App" functionality. During side loading, the Verify App functionality reads the APK to determine if it's safe to install. Bug: 9863154 Change-Id: I33f6b0fd012f6cb194e253d5d92cf6189d6aa222
-
- Jul 14, 2013
-
-
Nick Kralevich authored
This is my first attempt at creating an enforcing SELinux domain for apps, untrusted_apps, and isolated_apps. Much of these rules are based on the contents of app.te as of commit 11153ef3 with extensive modifications, some of which are included below. * Allow communication with netd/dnsproxyd, to allow netd to handle dns requests * Allow binder communications with the DNS server * Allow binder communications with surfaceflinger * Allow an app to bind to tcp/udp ports * Allow all domains to read files from the root partition, assuming the DAC allows access. In addition, I added a bunch of "neverallow" rules, to assert that certain capabilities are never added. This change has a high probability of breaking someone, somewhere. If it does, then I'm happy to fix the breakage, rollback this change, or put untrusted_app into permissive mode. Change-Id: I83f220135d20ab4f70fbd7be9401b5b1def1fe35
-
- Jul 13, 2013
-
-
Nick Kralevich authored
app.te covers a lot of different apps types (platform_app, media_app, shared_app, release_app, isolated_app, and untrusted_app), all of which are going to have slightly different security policies. Separate the different domains from app.te. Over time, these files are likely to grow substantially, and mixing different domain types is a recipe for confusion and mistakes. No functional change. Change-Id: Ida4e77fadb510f5993eb2d32f2f7649227edff4f
-