Skip to content
Snippets Groups Projects
  1. Dec 12, 2016
    • Daniel Rosenberg's avatar
      isolated_app.te: Give permissions for using sdcardfs · 02bf4aad
      Daniel Rosenberg authored
      Sdcardfs does not use a userspace daemon, so the secontext
      is currently the caller's when accessing files. This can be
      removed if sdcardfs is modified to change the secontext before
      calling into the lower filesystem.
      
      Bug: 32735101
      Test: Run any app that falls under isolated_app.
      Test: See bug for example
      Change-Id: I9433aa0f14ff0d5a518249079e07f57e55b09bcf
      02bf4aad
  2. Dec 08, 2016
    • dcashman's avatar
      Restore app_domain macro and move to private use. · 3e8dbf01
      dcashman authored
      app_domain was split up in commit: 2e00e637 to
      enable compilation by hiding type_transition rules from public policy.  These
      rules need to be hidden from public policy because they describe how objects are
      labeled, of which non-platform should be unaware.  Instead of cutting apart the
      app_domain macro, which non-platform policy may rely on for implementing new app
      types, move all app_domain calls to private policy.
      
      (cherry-pick of commit: 76035ea0)
      
      Bug: 33428593
      Test: bullhead and sailfish both boot. sediff shows no policy change.
      Change-Id: I4beead8ccc9b6e13c6348da98bb575756f539665
      3e8dbf01
  3. Dec 06, 2016
    • dcashman's avatar
      sepolicy: add version_policy tool and version non-platform policy. · 2e00e637
      dcashman authored
      In order to support platform changes without simultaneous updates from
      non-platform components, the platform and non-platform policies must be
      split.  In order to provide a guarantee that policy written for
      non-platform objects continues to provide the same access, all types
      exposed to non-platform policy are versioned by converting them and the
      policy using them into attributes.
      
      This change performs that split, the subsequent versioning and also
      generates a mapping file to glue the different policy components
      together.
      
      Test: Device boots and runs.
      Bug: 31369363
      Change-Id: Ibfd3eb077bd9b8e2ff3b2e6a0ca87e44d78b1317
      2e00e637
  4. Nov 22, 2016
    • Nick Kralevich's avatar
      neverallow some /proc file reads · 0b7506ff
      Nick Kralevich authored
      Lock in the gains we've made so far in restricting access to generically
      labeled /proc files. There's more we can do here, but let's avoid
      inadvertent regressions.
      
      Test: policy compiles. Only compile time assertions added.
      Bug: 26813932
      Change-Id: If354c2ddc1c59beed7f0eb4bcbd3f0d9971c3b8a
      0b7506ff
  5. Nov 15, 2016
    • Nick Kralevich's avatar
      isolated_app: allow access to pre-opened sdcard FDs · c121735f
      Nick Kralevich authored
      Allow isolated apps to read/write/append/lock already open sdcard
      file descriptors passed to it by normal app processes. isolated_apps are
      used by processes like Google drive when handling untrusted content.
      
      Addresses the following denial:
      
        audit(0.0:1508): avc: denied { read } for
        path="/storage/emulated/0/Download/02-corejava.pdf" dev="fuse" ino=310
        scontext=u:r:isolated_app:s0:c512,c768 tcontext=u:object_r:fuse:s0
        tclass=file permissive=0
      
      This partially reverts the tightening added in
      ce4b5eea.
      
      Add a TODO to consider removing isolated_apps ability to write or append
      to files on the sdcard. This limits the damage that can occur should the
      isolated_app process be compromised.
      
      Bug: 32896414
      Test: Policy compiles. Rule add only, so no possibility of breakage.
      Change-Id: Ia128569608fc9c872c90e6c380106b7c81eb7b6f
      c121735f
  6. Nov 11, 2016
    • Robert Sesek's avatar
      Add the "webview_zygote" domain. · dc43f7cd
      Robert Sesek authored
      The webview_zygote is a new unprivileged zygote and has its own sockets for
      listening to fork requests. However the webview_zygote does not run as root
      (though it does require certain capabilities) and only allows dyntransition to
      the isolated_app domain.
      
      Test: m
      Test: angler boots
      
      Bug: 21643067
      Change-Id: I89a72ffe6dcb983c4a44048518efd7efb7ed8e83
      dc43f7cd
  7. Oct 21, 2016
    • Jeff Vander Stoep's avatar
      isolated_app: no sdcard access · ce4b5eea
      Jeff Vander Stoep authored
      Remove and neverallow isolated_app access to external storage and
      USB accessories.
      
      Test: aosp_angler-userdebug builds
      Bug: 21643067
      Change-Id: Ie912706a954a38610f2afd742b1ab4b8cd4b1f36
      ce4b5eea
  8. Oct 06, 2016
    • dcashman's avatar
      Split general policy into public and private components. · cc39f637
      dcashman authored
      Divide policy into public and private components.  This is the first
      step in splitting the policy creation for platform and non-platform
      policies.  The policy in the public directory will be exported for use
      in non-platform policy creation.  Backwards compatibility with it will
      be achieved by converting the exported policy into attribute-based
      policy when included as part of the non-platform policy and a mapping
      file will be maintained to be included with the platform policy that
      maps exported attributes of previous versions to the current platform
      version.
      
      Eventually we would like to create a clear interface between the
      platform and non-platform device components so that the exported policy,
      and the need for attributes is minimal.  For now, almost all types and
      avrules are left in public.
      
      Test: Tested by building policy and running on device.
      
      Change-Id: Idef796c9ec169259787c3f9d8f423edf4ce27f8c
      cc39f637
  9. Aug 28, 2016
  10. May 12, 2016
    • Jeff Vander Stoep's avatar
      Remove domain_deprecated from isolated_app · 0b430aba
      Jeff Vander Stoep authored
      Address denials:
      avc: denied { read } for name="meminfo" dev="proc" ino=4026544360 scontext=u:r:isolated_app:s0:c512,c768 tcontext=u:object_r:proc_meminfo:s0 tclass=file permissive=0
      
      Bug: 28722489
      Change-Id: I3c55bd95bb82ec54e88e9e9bc42d6392a216a936
      0b430aba
  11. Apr 15, 2016
    • Jeff Vander Stoep's avatar
      Further restrict socket ioctls available to apps · 32333536
      Jeff Vander Stoep authored
      (cherry picked from commit 6ba383c5)
      
      Restrict unix_dgram_socket and unix_stream_socket to a whitelist.
      Disallow all ioctls for netlink_selinux_socket and netlink_route_socket.
      
      Neverallow third party app use of all ioctls other than
      unix_dgram_socket, unix_stream_socket, netlink_selinux_socket,
      netlink_route_socket, tcp_socket, udp_socket and rawip_socket.
      
      Bug: 28171804
      Change-Id: Icfe3486a62fc2fc2d2abd8d4030a5fbdd0ab30ab
      32333536
    • Nick Kralevich's avatar
      neverallow /data/anr access for isolated/untrusted apps · 0e61a7a9
      Nick Kralevich authored
      Add a neverallow rule (compile time assertion + CTS test) that
      isolated_apps and untrusted_apps can't do anything else but append
      to /data/anr/traces.txt. In particular, assert that they can't
      read from the file, or overwrite other data which may already be
      in the file.
      
      Bug: 18340553
      Bug: 27853304
      
      (cherry picked from commit 369cf8cd)
      
      Change-Id: Ib33e7ea0342ad28e5a89dfffdd9bc16fe54d8b3d
      0e61a7a9
  12. Mar 25, 2016
    • Nick Kralevich's avatar
      neverallow /data/anr access for isolated/untrusted apps · 369cf8cd
      Nick Kralevich authored
      Add a neverallow rule (compile time assertion + CTS test) that
      isolated_apps and untrusted_apps can't do anything else but append
      to /data/anr/traces.txt. In particular, assert that they can't
      read from the file, or overwrite other data which may already be
      in the file.
      
      Bug: 18340553
      Bug: 27853304
      Change-Id: I249fe2a46401b660efaa3f1102924a448ed750d5
      369cf8cd
  13. Mar 09, 2016
  14. Feb 29, 2016
    • Nick Kralevich's avatar
      Allow bluetooth access to the tun device. · ba12da95
      Nick Kralevich authored
      Bluetooth uses the tun device for tethering. Allow access.
      
        STEPS TO REPRODUCE:
        0. Have two devices to test on, say Device A and Device B
        1. On Device A, Go to settings ->Bluetooth .
        2. Turn on the Bluetooth .
        3. Pair it with device B
        4. Tap on the paired device
      
        OBSERVED RESULTS:
        -Bluetooth share crash is observed with "Bluetooth share has stopped"
        error message
        -Unable to use Bluetooth tethering due to this issue
      
        EXPECTED RESULTS:
        No crash and Bluetooth devices should be able to connect for tethering
      
      Addresses the following denial:
      
      com.android.bluetooth: type=1400 audit(0.0:131): avc: denied { open }
      for comm=425420536572766963652043616C6C path="/dev/tun" dev="tmpfs"
      ino=12340 scontext=u:r:bluetooth:s0 tcontext=u:object_r:tun_device:s0
      tclass=chr_file permissive=0
      
      Bug: 27372573
      
      (cherry picked from commit 9a1347ee)
      
      Change-Id: Ibd16e48c09fe80ebb4f3779214de3b4806c12497
      ba12da95
    • Nick Kralevich's avatar
      Allow bluetooth access to the tun device. · 9a1347ee
      Nick Kralevich authored
      Bluetooth uses the tun device for tethering. Allow access.
      
        STEPS TO REPRODUCE:
        0. Have two devices to test on, say Device A and Device B
        1. On Device A, Go to settings ->Bluetooth .
        2. Turn on the Bluetooth .
        3. Pair it with device B
        4. Tap on the paired device
      
        OBSERVED RESULTS:
        -Bluetooth share crash is observed with "Bluetooth share has stopped"
        error message
        -Unable to use Bluetooth tethering due to this issue
      
        EXPECTED RESULTS:
        No crash and Bluetooth devices should be able to connect for tethering
      
      Addresses the following denial:
      
      com.android.bluetooth: type=1400 audit(0.0:131): avc: denied { open }
      for comm=425420536572766963652043616C6C path="/dev/tun" dev="tmpfs"
      ino=12340 scontext=u:r:bluetooth:s0 tcontext=u:object_r:tun_device:s0
      tclass=chr_file permissive=0
      
      Bug: 27372573
      Change-Id: I07724d8d68ffcdda691f1179787a4f40a0ab1c73
      9a1347ee
  15. Jan 08, 2016
  16. Jan 06, 2016
  17. Jan 05, 2016
  18. Dec 11, 2015
    • Jeff Vander Stoep's avatar
      Migrate to upstream policy version 30 · 3a0ce49b
      Jeff Vander Stoep authored
      Grant untrusted_app and isolated_app unpriv_sock_perms, neverallow
      priv_sock_perms to disallow access to MAC address and ESSID.
      
      Change-Id: Idac3b657a153e7d7fdc647ff34b876a325d759b3
      3a0ce49b
  19. Dec 08, 2015
  20. Nov 03, 2015
    • Jeff Vander Stoep's avatar
      Create attribute for moving perms out of domain · d22987b4
      Jeff Vander Stoep authored
      Motivation: Domain is overly permissive. Start removing permissions
      from domain and assign them to the domain_deprecated attribute.
      Domain_deprecated and domain can initially be assigned to all
      domains. The goal is to not assign domain_deprecated to new domains
      and to start removing domain_deprecated where it is not required or
      reassigning the appropriate permissions to the inheriting domain
      when necessary.
      
      Bug: 25433265
      Change-Id: I8b11cb137df7bdd382629c98d916a73fe276413c
      d22987b4
  21. Oct 23, 2015
    • Jeff Vander Stoep's avatar
      Temporarily downgrade to policy version number · 0fc831c3
      Jeff Vander Stoep authored
      Temporarily move from policy version 30 to 29 until device kernels
      and prebuilts are all upgraded to the accepted upstream version of
      the selinux ioctl command whitelisting code.
      
      (cherry picked from commit 89765083)
      
      Bug: 22846070
      
      Change-Id: I31d1e80aaee164cf41a2f01c6ca846a000898ef4
      0fc831c3
  22. Oct 16, 2015
    • Jeff Vander Stoep's avatar
      Remove untrusted_app access to cache · 68748c21
      Jeff Vander Stoep authored
      neverallow access to untrusted_app and isolated app
      
      Access to cache is a system|signature permission. Only
      priv/system/platform apps should be allowed access.
      
      Change-Id: I7ebd38ce6d39950e74c0a164479bc59e694c852d
      68748c21
  23. Oct 13, 2015
    • Nick Kralevich's avatar
      Remove ptrace from app.te · de11f501
      Nick Kralevich authored
      Remove ptrace from app.te, and only add it to the app domains
      which explicitly require it.
      
      Change-Id: I327aabd154ae07ce90e3529dee2b324ca125dd16
      de11f501
  24. Jul 30, 2015
    • Jeff Vander Stoep's avatar
      Temporarily downgrade to policy version number · 89765083
      Jeff Vander Stoep authored
      Temporarily move from policy version 30 to 29 until device kernels
      and prebuilts are all upgraded to the accepted upstream version of
      the selinux ioctl command whitelisting code.
      
      Bug: 22846070
      
      Change-Id: I31d1e80aaee164cf41a2f01c6ca846a000898ef4
      89765083
  25. Jun 08, 2015
    • dcashman's avatar
      Remove service_manager_local_audit_domain. · 4b4b2b92
      dcashman authored
      service_manager_local_audit_domain was used to fine tune the service_manager
      auditallow rules when introducing the service_manager SELinux rules.  This is no
      longer needed.
      
      (cherry-pick of commit: eab26faa)
      
      Bug: 21656807
      Change-Id: Ia042a887e7bf9eb2a2b08b8d831e68dfe6395f75
      4b4b2b92
    • dcashman's avatar
      Remove service_manager_local_audit_domain. · eab26faa
      dcashman authored
      service_manager_local_audit_domain was used to fine tune the service_manager
      auditallow rules when introducing the service_manager SELinux rules.  This is no
      longer needed.
      
      Bug: 21656807
      Change-Id: Ia042a887e7bf9eb2a2b08b8d831e68dfe6395f75
      eab26faa
  26. 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
  27. Apr 09, 2015
  28. 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
  29. 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
  30. Jan 21, 2015
  31. Jan 16, 2015
  32. 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
  33. 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
  34. Dec 02, 2014
Loading