Skip to content
Snippets Groups Projects
  1. Mar 02, 2016
  2. Feb 24, 2016
  3. Jan 25, 2016
    • Jeff Vander Stoep's avatar
      app: connect to adbd · 2fdeab37
      Jeff Vander Stoep authored
      Permission to connect to adb was removed from untrusted_app when
      the domain_deprecated attribute was removed. Add it back to support
      debugging of apps. Grant to all apps as eventually
      domain_deprecated will be removed from everything.
      
      Bug: 26458796
      Change-Id: I4356e6d011094cdb6829210dd0eec443b21f8496
      2fdeab37
  4. Jan 13, 2016
  5. Jan 06, 2016
  6. Jan 05, 2016
    • dcashman's avatar
      Add sysfs_batteryinfo label. · a31755fa
      dcashman authored
      Shell user needs to be able to get current device battery_level via
      /sys/class/power_supply/battery/capacity.  Create a global label and
      corresponding policy for accessing this.  Rely on each device to label
      the appropriate sysfs entry.
      
      Bug: 26219114
      Change-Id: I2c5ef489a9db2fdf7bbd5afd04278214b814351c
      a31755fa
    • Jeff Vander Stoep's avatar
      DO NOT MERGE: Further restrict access to socket ioctl commands · 57531cac
      Jeff Vander Stoep authored
      Remove untrusted/isolated app access to device private commands.
      
      Only allow shell user to access unprivileged socket ioctl commands.
      
      Bug: 26324307
      Bug: 26267358
      Change-Id: Iddf1171bc05c7600e0292f925d18d748f13a98f2
      57531cac
    • Jeff Vander Stoep's avatar
      expand scope of priv_sock_ioctls neverallows · a8d89c31
      Jeff Vander Stoep authored
      From self to domain
      
      Change-Id: I97aeea67a6b66bc307715a050cf7699e5be9715e
      a8d89c31
    • Jeff Vander Stoep's avatar
      shell: Reduce socket ioctl perms · 89e379e9
      Jeff Vander Stoep authored
      Only allow shell to access the same subset of ioctl commands as
      untrusted_app. This reduces the attack surface of the kernel
      available to a local attacker.
      
      Bug: 26324307
      Bug: 26267358
      Change-Id: Ib8ecb9546af5fb480d2622149d4e00ec50cd4cde
      89e379e9
  7. Dec 23, 2015
    • Nick Kralevich's avatar
      undeprecate /proc/cpuinfo, more shell permissions · f8f937a1
      Nick Kralevich authored
      Access to /proc/cpuinfo was moved to domain_deprecated in commit
      6e3506e1. Restore access to everyone.
      
      Allow the shell user to stat() /dev, and vfsstat() /proc and other
      labeled filesystems such as /system and /data.
      
      Access to /proc/cpuinfo was explicitly granted to bootanim, but is no
      longer required after moving it back to domain.te. Delete the redundant
      entry.
      
      Commit 4e2d2245 restored access to
      /sys/devices/system/cpu for all domains, but forgot to remove the
      redundant entry from bootanim.te. Cleanup the redundant entry.
      
      Addresses the following denials:
      
        avc: denied { getattr } for pid=23648 comm="bionic-unit-tes" name="/" dev="proc" ino=1 scontext=u:r:shell:s0 tcontext=u:object_r:proc:s0 tclass=filesystem permissive=0
        avc: denied { read } for name="cpuinfo" dev="proc" ino=4026533615 scontext=u:r:shell:s0 tcontext=u:object_r:proc_cpuinfo:s0 tclass=file permissive=0
        avc: denied { getattr } for pid=23713 comm="bionic-unit-tes" path="/dev" dev="tmpfs" ino=11405 scontext=u:r:shell:s0 tcontext=u:object_r:device:s0 tclass=dir permissive=0
        avc: denied { getattr } for name="/" dev="mmcblk0p30" ino=2 scontext=u:r:shell:s0 tcontext=u:object_r:labeledfs:s0 tclass=filesystem permissive=0
      
      Bug: 26295417
      Change-Id: Ia85ac91cbd43235c0f8fe0aebafffb8046cc77ec
      f8f937a1
  8. Dec 22, 2015
  9. Dec 16, 2015
  10. Dec 14, 2015
    • Nick Kralevich's avatar
      label /sys/kernel/debug/tracing and remove debugfs write · fe12b616
      Nick Kralevich authored
      Start labeling the directory /sys/kernel/debug/tracing. The files
      in this directory need to be writable to the shell user.
      
      Remove global debugfs:file write access. This was added in the days
      before we could label individual debugfs files.
      
      Change-Id: I79c1fcb63b4b9b903dcabd99b6b25e201fe540a3
      fe12b616
  11. Dec 08, 2015
  12. Dec 04, 2015
    • Felipe Leme's avatar
      Increase communication surface between dumpstate and Shell: · 83fd8a54
      Felipe Leme authored
      - Add a new 'dumpstate' context for system properties. This context
        will be used to share state between dumpstate and Shell. For example,
        as dumpstate progresses, it will update a system property, which Shell
        will use to display the progress in the UI as a system
        notification. The user could also rename the bugreport file, in which
        case Shell would use another system property to communicate such
        change to dumpstate.
      - Allow Shell to call 'ctl.bugreport stop' so the same system
        notification can be used to stop dumpstate.
      
      BUG: 25794470
      
      Change-Id: I74b80bda07292a91358f2eea9eb8444caabc5895
      83fd8a54
    • Nick Kralevich's avatar
      shell.te: Allow read access to system_file · 29b9532a
      Nick Kralevich authored
      Certain tests depend on the ability to examine directories
      in /system. Allow it to the shell user.
      
      Addresses the following denials:
      
        avc: denied { read } for name="egl" dev="dm-1" ino=104 scontext=u:r:shell:s0 tcontext=u:object_r:system_file:s0 tclass=dir permissive=0
      
      Bug: 26020967
      Bug: 26023420
      Change-Id: I509d921e159e99164c85fae9e8b2982a47573d14
      29b9532a
  13. Dec 03, 2015
  14. Dec 02, 2015
  15. Nov 28, 2015
    • Nick Kralevich's avatar
      Remove domain_deprecated from adbd and shell · 8ca19368
      Nick Kralevich authored
      The extra permissions are not needed. Delete them.
      
      This change also adds read permission for /data/misc/zoneinfo
      back to all domains. libc refernces this directory for timezone
      related files, and it feels dangerous and of little value to
      try to restrict access. In particular, this causes problems when the
      shell user attempts to run "ls -la" to show file time stamps in
      the correct timezone.
      
      Bug: 25433265
      Change-Id: I666bb460e440515151e3bf46fe2e0ac0e7c99f46
      8ca19368
  16. 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
  17. Oct 29, 2015
    • Nick Kralevich's avatar
      Create a new SELinux type for /data/nativetest · e9d261ff
      Nick Kralevich authored
      1) Don't use the generic "system_data_file" for the files in /data/nativetest.
      Rather, ensure it has it's own special label. This allows us to distinguish
      these files from other files in SELinux policy.
      
      2) Allow the shell user to execute files from /data/nativetest, on
      userdebug or eng builds only.
      
      3) Add a neverallow rule (compile time assertion + CTS test) that nobody
      is allowed to execute these files on user builds, and only the shell user
      is allowed to execute these files on userdebug/eng builds.
      
      Bug: 25340994
      Change-Id: I3e292cdd1908f342699d6c52f8bbbe6065359413
      e9d261ff
  18. Oct 15, 2015
    • Nick Kralevich's avatar
      allow shell self:process ptrace; · 43cd0cce
      Nick Kralevich authored
      Allow the non-privileged adb shell user to run strace. Without
      this patch, the command "strace /system/bin/ls" fails with the
      following error:
      
        shell@android:/ $ strace /system/bin/ls
        strace: ptrace(PTRACE_TRACEME, ...): Permission denied
        +++ exited with 1 +++
      
      Change-Id: I207fe0f71941bff55dbeb6fe130e636418f333ee
      43cd0cce
  19. Sep 22, 2015
  20. Aug 25, 2015
    • Stephen Smalley's avatar
      Only allow toolbox exec where /system exec was already allowed. · a3c97a76
      Stephen Smalley authored
      
      When the toolbox domain was introduced, we allowed all domains to exec it
      to avoid breakage.  However, only domains that were previously allowed the
      ability to exec /system files would have been able to do this prior to the
      introduction of the toolbox domain.  Remove the rule from domain.te and add
      rules to all domains that are already allowed execute_no_trans to system_file.
      Requires coordination with device-specific policy changes with the same Change-Id.
      
      Change-Id: Ie46209f0412f9914857dc3d7c6b0917b7031aae5
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      a3c97a76
  21. Jul 30, 2015
  22. 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
  23. Jun 02, 2015
    • Mark Salyzyn's avatar
      logd: logpersistd · 7e0838aa
      Mark Salyzyn authored
      (cherry pick from commit 0d22c6ce)
      
      - Enable logpersistd to write to /data/misc/logd
      - Enable logpersistd to read from pstore to help complete any content
        lost by reboot disruption
      - Enable shell readonly ability logpersistd files in /data/misc/logd
      - Enable logcat -f when placed into logd context to act as a
        logpersistd (nee logcatd) agent, restrict access to run only in
        userdebug or eng
      
      Bug: 19608716
      Change-Id: I3209582bc796a1093c325c90068a48bf268e5ab5
      7e0838aa
    • Mark Salyzyn's avatar
      logd: logpersistd · 0d22c6ce
      Mark Salyzyn authored
      - Enable logpersistd to write to /data/misc/logd
      - Enable logpersistd to read from pstore to help complete any content
        lost by reboot disruption
      - Enable shell readonly ability logpersistd files in /data/misc/logd
      - Enable logcat -f when placed into logd context to act as a
        logpersistd (nee logcatd) agent, restrict access to run only in
        userdebug or eng
      
      Bug: 19608716
      Change-Id: I3209582bc796a1093c325c90068a48bf268e5ab5
      0d22c6ce
  24. May 07, 2015
    • William Roberts's avatar
      Replace unix_socket_connect() and explicit property sets with macro · 2f5a6a96
      William Roberts authored
      
      A common source of mistakes when authoring sepolicy is properly
      setting up property sets. This is a 3 part step of:
      1. Allowing the unix domain connection to the init/property service
      2. Allowing write on the property_socket file
      3. Allowing the set on class property_service
      
      The macro unix_socket_connect() handled 1 and 2, but could be
      confusing for first time policy authors. 3 had to be explicitly
      added.
      
      To correct this, we introduce a new macros:
      set_prop(sourcedomain, targetprop)
      
      This macro handles steps 1, 2 and 3.
      
      No difference in sediff is expected.
      
      (cherrypicked from commit 625a3526)
      
      Change-Id: I630ba0178439c935d08062892990d43a3cc1239e
      Signed-off-by: default avatarWilliam Roberts <william.c.roberts@linux.intel.com>
      2f5a6a96
    • William Roberts's avatar
      Replace unix_socket_connect() and explicit property sets with macro · 625a3526
      William Roberts authored
      
      A common source of mistakes when authoring sepolicy is properly
      setting up property sets. This is a 3 part step of:
      1. Allowing the unix domain connection to the init/property service
      2. Allowing write on the property_socket file
      3. Allowing the set on class property_service
      
      The macro unix_socket_connect() handled 1 and 2, but could be
      confusing for first time policy authors. 3 had to be explicitly
      added.
      
      To correct this, we introduce a new macros:
      set_prop(sourcedomain, targetprop)
      
      This macro handles steps 1, 2 and 3.
      
      No difference in sediff is expected.
      
      Change-Id: I630ba0178439c935d08062892990d43a3cc1239e
      Signed-off-by: default avatarWilliam Roberts <william.c.roberts@linux.intel.com>
      625a3526
  25. Apr 16, 2015
  26. Apr 06, 2015
    • Andres Morales's avatar
      SELinux permissions for gatekeeper TEE proxy · e207986e
      Andres Morales authored
      sets up:
      - execute permissions
      - binder permission (system_server->gatekeeper->keystore)
      - prevents dumpstate and shell from finding GK binder service
      - neverallow rules for prohibited clients
      
      Change-Id: I1817933a91de625db469a20c7a4c8e2ca46efa1e
      e207986e
  27. Apr 03, 2015
    • Jeff Sharkey's avatar
      Consistent external storage policy. · 93fd6f0a
      Jeff Sharkey authored
      Apps, shell and adbd should all have identical access to external
      storage.  Also document where we have files and/or symlinks.
      
      Bug: 20055945
      Change-Id: I133ffcf28cc3ccdb0541aba18ea3b9ba676eddbe
      93fd6f0a
  28. Mar 31, 2015
Loading