Skip to content
Snippets Groups Projects
  1. Jun 05, 2015
    • Jeff Vander Stoep's avatar
      restrict app access to socket ioctls · de9b5301
      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
      de9b5301
  2. Apr 09, 2015
  3. Apr 01, 2015
    • dcashman's avatar
      Record observed service accesses. · 8af4e9cb
      dcashman authored
      Get ready to switch system_server service lookups into enforcing.
      
      Bug: 18106000
      Change-Id: Iefd4b2eee6cdd680f5ab423d15cc72a2a30e27cf
      8af4e9cb
  4. Mar 05, 2015
    • Nick Kralevich's avatar
      update isolated_app service_manager rules · 75f34dc3
      Nick Kralevich authored
      isolated apps should only be able to access 2 services.
      Remove access permissions for services inappropriately added,
      and add a neverallow rule to prevent regressions.
      
      Change-Id: I2783465c4a22507849b2a64894fb76690a27bc01
      75f34dc3
  5. Jan 21, 2015
  6. Jan 16, 2015
  7. Jan 14, 2015
    • dcashman's avatar
      Make system_server_service an attribute. · 4a89cdfa
      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
      4a89cdfa
  8. Dec 15, 2014
    • dcashman's avatar
      Restrict service_manager find and list access. · cd82557d
      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
      cd82557d
  9. Dec 02, 2014
  10. Oct 17, 2014
    • Nick Kralevich's avatar
      Revert "Do not allow isolated_app to directly open app data files." · 44cb98a7
      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
      44cb98a7
  11. Oct 06, 2014
  12. Oct 03, 2014
  13. Oct 01, 2014
    • Nick Kralevich's avatar
      isolated_app: remove app_data_file execute · 94f9ff87
      Nick Kralevich authored
      In commit ad891591, we allowed
      isolated processes to execute files from /data/data/APPNAME.
      
      I'm pretty sure all the necessary linker changes have been made
      so that this functionality isn't required anymore. Remove the
      allow rule.
      
      This is essentially a revert of ad891591.
      
      Change-Id: I1b073916f66f4965dfc53c0ea2b624bbb2fe8816
      94f9ff87
  14. Sep 23, 2014
  15. Sep 11, 2014
  16. Jul 25, 2014
    • Nick Kralevich's avatar
      Resync lmp-dev-plus-aosp with master · d065f048
      Nick Kralevich authored
      A DO NOT MERGE change merged from lmp-dev to lmp-dev-plus-aosp.
      This is expected, but it's causing unnecessary merge conflicts
      when handling AOSP contributions.
      
      Resolve those conflicts.
      
      This is essentially a revert of bf696327
      for lmp-dev-plus-aosp only.
      
      Change-Id: Icc66def7113ab45176ae015f659cb442d53bce5c
      d065f048
  17. Jul 18, 2014
  18. Jul 15, 2014
    • Riley Spahn's avatar
      Add access control for each service_manager action. · 344fc109
      Riley Spahn authored
      Add SELinux MAC for the service manager actions list
      and find. Add the list and find verbs to the
      service_manager class. Add policy requirements for
      service_manager to enforce policies to binder_use
      macro.
      
      (cherry picked from commit b8511e0d)
      
      Change-Id: I980d4a8acf6a0c6e99a3a7905961eb5564b1be15
      344fc109
  19. Jul 14, 2014
    • Riley Spahn's avatar
      Add access control for each service_manager action. · b8511e0d
      Riley Spahn authored
      Add SELinux MAC for the service manager actions list
      and find. Add the list and find verbs to the
      service_manager class. Add policy requirements for
      service_manager to enforce policies to binder_use
      macro.
      
      Change-Id: I224b1c6a6e21e3cdeb23badfc35c82a37558f964
      b8511e0d
  20. Jun 27, 2014
    • Nick Kralevich's avatar
      isolated_app: allow app_data_file execute · ad891591
      Nick Kralevich authored
      Chrome renderer processes dlopen() a shared library from
      gmscore. Open and read on app data file is already allowed,
      but execute isn't, so the dlopen() fails. This is a regression
      from K, where the dlopen succeeded.
      
      Longer term, there's questions about whether this is appropriate
      behavior for an isolated app. For now, allow the behavior.
      See the discussion in b/15902433 for details.
      
      Addresses the following denial:
      
        I/auditd  ( 5087): type=1400 audit(0.0:76): avc:  denied  { execute } for  comm="CrRendererMain" path="/data/data/com.google.android.gms/files/libAppDataSearchExt_armeabi_v7a.so" dev="mmcblk0p28" ino=83196 scontext=u:r:isolated_app:s0 tcontext=u:object_r:app_data_file:s0 tclass=file
      
      Bug: 15902433
      Change-Id: Ie98605d43753be8c31a6fe510ef2dde0bdb52678
      ad891591
  21. Mar 07, 2014
    • Stephen Smalley's avatar
      Clean up, unify, and deduplicate app domain rules. · b0db712b
      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: default avatarStephen Smalley <sds@tycho.nsa.gov>
      b0db712b
  22. Feb 25, 2014
    • Stephen Smalley's avatar
      Resolve overlapping rules between app.te and net.te. · 85708ec4
      Stephen Smalley authored
      
      There is some overlap between socket rules in app.te and the net.te rules,
      but they aren't quite identical since not all app domains presently include
      the net_domain() macro and because the rules in app.te allow more permissions
      for netlink_route_socket and allow rawip_socket permissions for ping.
      The current app.te rules prevent one from ever creating a non-networked app
      domain.  Resolve this overlap by:
      
      1) Adding the missing permissions allowed by app.te to net.te for
      netlink_route_socket and rawip_socket.
      2) Adding net_domain() calls to all existing app domains that do not already
      have it.
      3) Deleting the redundant socket rules from app.te.
      
      Then we'll have no effective change in what is allowed for apps but
      allow one to define app domains in the future that are not allowed
      network access.
      
      Also cleanup net.te to use the create_socket_perms macro rather than *
      and add macros for stream socket permissions.
      
      Change-Id: I6e80d65b0ccbd48bd2b7272c083a4473e2b588a9
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      85708ec4
  23. Jan 09, 2014
  24. Dec 02, 2013
  25. Sep 13, 2013
  26. Sep 05, 2013
    • Geremy Condra's avatar
      Fix more long-tail denials. · 217f8afc
      Geremy Condra authored
      For additional context-
      
      The denials related to init_tmpfs are of the form:
      
      denied  { read } for  pid=12315 comm=""dboxed_process0"" path=2F6465762F6173686D656D2F64616C76696B2D68656170202864656C6574656429 dev=""tmpfs"" ino=9464 scontext=u:r:isolated_app:s0 tcontext=u:object_r:init_tmpfs:s0 tclass=file
      
      (the path above is "/dev/ashmem/dalvik-heap (deleted)")
      
      The denials related to executing things from the dalvik cache are of the form:
      
      enied  { execute } for  pid=3565 comm=""dboxed_process0"" path=""/data/dalvik-cache/system@app@Chrome.apk@classes.dex"" dev=""mmcblk0p28"" ino=105983 scontext=u:r:isolated_app:s0 tcontext=u:object_r:dalvikcache_data_file:s0 tclass=file
      
      The denials related to isolated_app and the init socket are:
      
      denied  { getattr } for  pid=3824 comm=""Binder_2"" path=""socket:[14059]"" dev=""sockfs"" ino=14059 scontext=u:r:isolated_app:s0 tcontext=u:r:init:s0 tclass=unix_stream_socket
      
      The getopt denials for the aforementioned socket are:
      
      denied  { getopt } for  pid=3824 comm=""Binder_2"" path=""/dev/socket/dumpstate"" scontext=u:r:isolated_app:s0 tcontext=u:r:init:s0 tclass=unix_stream_socket
      
      Change-Id: I3c57702e2af5a779a7618da9aa40930e7f12ee49
      217f8afc
  27. Jul 16, 2013
  28. Jul 14, 2013
    • Nick Kralevich's avatar
      untrusted_app.te / isolated_app.te / app.te first pass · 6634a108
      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
      6634a108
  29. Jul 13, 2013
    • Nick Kralevich's avatar
      Move *_app into their own file · 748fdef6
      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
      748fdef6
Loading