Skip to content
Snippets Groups Projects
  1. Jun 26, 2018
    • Samuel Ha's avatar
      Revert "Revert "Reduce the number of processes that can start adbd"" · 22f98197
      Samuel Ha authored
      This reverts commit b5dc6137.
      
      Reason for revert: Reverted incorrect change
      
      Change-Id: Ieafa3338e28ffeed40bcceb73486cffbfbd08b9d
      22f98197
    • Samuel Ha's avatar
      Revert "Reduce the number of processes that can start adbd" · b5dc6137
      Samuel Ha authored
      This reverts commit faebeaca.
      
      Reason for revert: broke the build
      
      Change-Id: I3d61ce011ad42c6ff0e9f122de3daa37e846407a
      b5dc6137
    • Luis Hector Chavez's avatar
      Reduce the number of processes that can start adbd · faebeaca
      Luis Hector Chavez authored
      This change makes it such that only init can start adbd directly. It
      also introduces new rules for ctl.{start,stop,restart} properties such
      that only usbd and recovery (and su, since it's permissive) can directly
      ask init to start adbd.
      
      Bug: 64720460
      Test: adbd still runs
      Test: /data/nativetest64/adbd_test/adbd_test
      Test: python system/core/adb/test_adb.py
      Test: "USB debugging" in System Settings still start/stop adbd
      Test: Recovery menu still make the device show as "recovery" in adb
            devices
      Test: "Apply update from ADB" in recovery menu still works
      Change-Id: Iafcda8aa44e85129afcc958036b472d856fa1192
      faebeaca
  2. Jun 25, 2018
    • Neil Fuller's avatar
      Add label for time (zone) system properties · b794ad0f
      Neil Fuller authored
      This adds a label for system properties that will affect system-wide
      time / time detection logic.
      
      The first example will be something like:
      persist.time.detection_impl_version
      
      Bug: 78217059
      Test: build
      Change-Id: I46044f1e28170760001da9acf2496a1e3037e48a
      b794ad0f
  3. Jun 11, 2018
    • Mark Salyzyn's avatar
      persist.sys.boot.reason is cleared once read by bootstat · a1bce779
      Mark Salyzyn authored
      To ensure a surprise reboot does not take the last boot reason on
      face value especially if coming from more than one boot sessions ago.
      We shift and clear the value from persist.sys.boot.reason to
      sys.boot.reason.last and establish a correct last reboot reason in
      the canonical sys.boot.reason property.  As a result, the power
      manager should read the canonical sys.boot.reason for a definitive
      result rather than relying on the possibly incorrect values in the
      persistent storage.  sys.boot.reason should be a core property as
      it represents the canonical boot reason API.
      
      Test: compile
      Bug: 86671991
      Bug: 63736262
      Change-Id: If3742c487d6c0ab69c464f056bf48c786b66a945
      a1bce779
  4. May 22, 2018
    • Tom Cherry's avatar
      Finer grained permissions for ctl. properties · 7b8be35d
      Tom Cherry authored
      Currently, permissions for ctl. property apply to each action verb, so
      if a domain has permissions for controlling service 'foo', then it can
      start, stop, and restart foo.
      
      This change implements finer grainer permissions such that permission
      can be given to strictly start a given service, but not stop or
      restart it.  This new permission scheme is mandatory for the new
      control functions, sigstop_on, sigstop_off, interface_start,
      interface_stop, interface_restart.
      
      Bug: 78511553
      Test: see appropriate successes and failures based on permissions
      Merged-In: Ibe0cc0d6028fb0ed7d6bcba626721e0d84cc20fa
      Change-Id: Ibe0cc0d6028fb0ed7d6bcba626721e0d84cc20fa
      (cherry picked from commit 2208f96e)
      7b8be35d
  5. May 16, 2018
    • Wei Wang's avatar
      Allow dumpstate to kill dumpstate vendor HAL in timeout case · a1db36e1
      Wei Wang authored
      Bug: 77489941
      Test: simulate delay in dumpstate HAL and get BR, see below from dumpstate_log.txt
          dumpstateBoard timed out after 10s, killing dumpstate vendor HAL
          dumpstateBoard failed: Status(EX_TRANSACTION_FAILED): 'DEAD_OBJECT: '
      Change-Id: I90ed5cb8fe8da8ad21ae77676433936cb12d9d04
      (cherry picked from commit 60d17674)
      a1db36e1
  6. May 04, 2018
  7. May 03, 2018
    • Mark Salyzyn's avatar
      FrameworksServicesTests: allow access to test.sys.boot.reason property · 0ab13a8d
      Mark Salyzyn authored
      com.android.server.power.PowerManagerServiceTest#testGetLastShutdownReasonInternal due to "RuntimeException: failed to set system property"
      
      W/roidJUnitRunner: type=1400 audit(0.0:6): avc: denied { write } for name="property_service" dev="tmpfs" ino=13178 scontext=u:r:platform_app:s0:c512,c768 tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=0
      W/libc    : Unable to set property "test.sys.boot.reason" to "shutdown,thermal": connection failed; errno=13 (Permission denied)
      
      Test: compile
      Bug: 78245377
      Change-Id: Id21436d281bab27823969a9f7e92318d70b5a2d6
      0ab13a8d
  8. Apr 23, 2018
    • Lalit Maganti's avatar
      sepolicy: allow shell to read/write traced prop · 673b4db7
      Lalit Maganti authored
      This is to fix the CTS failures given by the bugs below where devices
      where traced is not enabled by default causes test failures.
      
      Bug: 78215159
      Bug: 78347829
      Change-Id: Ib0f6a1cdb770528dbbeb857368534ff5040e464e
      673b4db7
  9. Mar 26, 2018
    • Primiano Tucci's avatar
      Revert "Allow system server to set persist.traced.enable" · 4f673cf4
      Primiano Tucci authored
      This reverts commit 6f2040f8.
      
      Reason for revert: not needed anymore after ag/3773705
      This was meant to allow system_server toggling the property on/off.
      Later we realized that we needed a separate property for that 
      (see discussion in b/76077784) and system server happens to
      have already permissions to write to sys.* properties even without
      this CL.
      Reverting because at this point this creates just unnecessary clutter.
      
      Change-Id: Ia73d000aad3c4288a5652047dfe10896e231b0b1
      Test: perfetto_integrationtests
      Bug: 76077784
      4f673cf4
  10. Mar 19, 2018
    • Hector Dearman's avatar
      Allow system server to set persist.traced.enable · 6f2040f8
      Hector Dearman authored
      To enable/disable the traced and traced_probes deamons remotely we would
      like system server to be able to set persist.traced.enable.
      See also ag/3736001.
      
      Denial:
      selinux: avc: denied { set } for
      property=persist.traced.enable
      pid=1606 uid=1000 gid=1000
      scontext=u:r:system_server:s0
      tcontext=u:object_r:default_prop:s0 tclass=property_service
      permissive=0\x0a
      
      Run:
      $ adb shell 'ps -A | grep traced'
      Should see traced.
      $ adb shell 'settings put global sys_traced 0'
      $ adb shell 'ps -A | grep traced'
      Should no longer see traced.
      
      Test: See above.
      Change-Id: I245b7df3853cabeb0e75db41fb4facaa178ab8f1
      6f2040f8
  11. Jan 18, 2018
    • Jaekyun Seok's avatar
      Add default namespaces of odm properties · afca82a3
      Jaekyun Seok authored
      Since /odm is an extension of /vendor, its default property contexts
      should be consistent with ones of /vendor.
      
      Bug: 36796459
      Test: tested on wahoo devices
      Change-Id: Ia67ebe81e9c7102aab35a34f14738ed9a24811d3
      afca82a3
  12. Jan 16, 2018
  13. Jan 10, 2018
    • Jaekyun Seok's avatar
      Whitelist exported platform properties · e4971454
      Jaekyun Seok authored
      This CL lists all the exported platform properties in
      private/exported_property_contexts.
      
      Additionally accessing core_property_type from vendor components is
      restricted.
      Instead public_readable_property_type is used to allow vendor components
      to read exported platform properties, and accessibility from
      vendor_init is also specified explicitly.
      
      Note that whitelisting would be applied only if
      PRODUCT_COMPATIBLE_PROPERTY is set on.
      
      Bug: 38146102
      Test: tested on walleye with PRODUCT_COMPATIBLE_PROPERTY=true
      Change-Id: I304ba428cc4ca82668fec2ddeb17c971e7ec065e
      e4971454
  14. Nov 16, 2017
  15. Nov 15, 2017
  16. Nov 08, 2017
  17. Sep 28, 2017
  18. Sep 26, 2017
  19. Aug 24, 2017
    • Mark Salyzyn's avatar
      Switch /data/misc/reboot/last_reboot_reason to persistent property · 006c2e99
      Mark Salyzyn authored
      Switch from /data/misc/reboot/last_reboot_reason to persistent
      Android property persist.sys.boot.reason for indicating why the
      device is rebooted or shutdown.
      
      Introduce protection for all boot reason properties
      
      Protect the following properties with these labels
      
      ro.boot.bootreason      u:object_r:bootloader_boot_reason_prop:s0
      sys.boot.reason         u:object_r:sys_boot_reason_prop:s0
      persist.sys.boot.reason u:object_r:last_boot_reason_prop:s0
      
      Setup the current as-need access rules for each.
      
      ToDo: Remove u:object_r:reboot_data_file after internal fixes.
      
      Test: system/core/bootstat/boot_reason_test.sh
      Bug: 64687998
      Change-Id: I3771c73933e8ae2d94aee936c7a38b6282611b80
      006c2e99
  20. Jul 13, 2017
  21. Jul 12, 2017
  22. Jul 11, 2017
    • Lorenzo Colitti's avatar
      Temporarily revert the SELinux policy for persist.netd.stable_secret. · 9fa11b77
      Lorenzo Colitti authored
      This change did not make it into core sepolicy in time for O.
      The revert allows devices to define these selinux policies in
      vendor-specific sepolicy instead of core sepolicy. It is
      necessary because:
      
      1. It is too late to change property_contexts in O.
      2. Adding the netd_stable_secret prop to vendor sepolicy results
         in a duplicate definition error at compile time.
      3. Defining a new vendor-specific context (such as
         net_stable_secret_vendor_prop) and applying it to
         persist.netd.stable_secret results in the device not booting
         due to attempting to apply two different contexts to the same
         property.
      
      Lack of the sepolicy no longer breaks wifi connectivity now that
      IpManager no longer considers failure to set the stable secret to
      be a fatal error.
      
      Once all interested devices have adopted the vendor sepolicy,
      this policy can safely be reinstated by reverting said vendor
      sepolicies in internal master.
      
      This reverts commit abb1ba65.
      
      Bug: 17613910
      Test: bullhead builds, boots, connects to wifi
      Change-Id: Idffcf78491171c54bca9f93cb920eab9b1c47709
      9fa11b77
  23. Jul 10, 2017
    • Lorenzo Colitti's avatar
      Temporarily revert the SELinux policy for persist.netd.stable_secret. · 07e631d2
      Lorenzo Colitti authored
      This change did not make it into core sepolicy in time for O.
      The revert allows devices to define these selinux policies in
      vendor-specific sepolicy instead of core sepolicy. It is
      necessary because:
      
      1. It is too late to change property_contexts in O.
      2. Adding the netd_stable_secret prop to vendor sepolicy results
         in a duplicate definition error at compile time.
      3. Defining a new vendor-specific context (such as
         net_stable_secret_vendor_prop) and applying it to
         persist.netd.stable_secret results in the device not booting
         due to attempting to apply two different contexts to the same
         property.
      
      Lack of the sepolicy no longer breaks wifi connectivity now that
      IpManager no longer considers failure to set the stable secret to
      be a fatal error.
      
      Once all interested devices have adopted the vendor sepolicy,
      this policy can safely be reinstated by reverting said vendor
      sepolicies in internal master.
      
      This reverts commit abb1ba65.
      
      Bug: 17613910
      Test: bullhead builds, boots, connects to wifi
      Change-Id: Idffcf78491171c54bca9f93cb920eab9b1c47709
      07e631d2
  24. Jun 27, 2017
    • Andreas Gampe's avatar
      Sepolicy: Give asan_extract access to powerctl · 8c7514ad
      Andreas Gampe authored
      rc-style powerctl has beem removed. Accordingly, asan_extract now
      needs access to sys.powerctl directly.
      
      (orginally commit: 82672089)
      
      Bug: 36458146
      Bug: 38241921
      Test: Builds and boots.
      Change-Id: I7d6e583f5e98b671986a2071abf157c86e288a10
      8c7514ad
  25. Jun 15, 2017
    • Dan Cashman's avatar
      DO NOT MERGE. Restore property to match oc-dev. · 9d448b91
      Dan Cashman authored
      CTS checks to make sure that the _contexts files on a device have
      a superset of the AOSP entries.  This was removed due to concurrent
      master and DR development.  Restore the entry to allow CTS to pass.
      
      Bug: 38241921
      Bug: 62348859
      Test: Policy builds and is identical to oc-dev for prop ctxts.
      Change-Id: I87ccbee7aadee57b8e46ede73280810362b618c0
      9d448b91
  26. Jun 12, 2017
    • Joel Scherpelz's avatar
      SELinux policy for secure persistent netd storage · abb1ba65
      Joel Scherpelz authored
      This is used to persist RFC 7217 stable secrets across device reboots.
      
      First submit caused a merge conflict. This revision replaces netd_prop
      with a more unique name netd_stable_secret_prop.
      
      Test: as follows
          - Manually tested that stable_secret is generated on first use and
            persists until reset of user data partition (factory reset).
          - Tested that "adb shell getprop" was denied access to
            persist.netd.stable_secret after running "adb unroot".
      Bug: 17613910
      
      Change-Id: I0a609c724799a15b1926e62534c16810d34f2275
      abb1ba65
  27. Jun 08, 2017
    • Bartosz Fabianowski's avatar
      Revert "SELinux policy for secure persistent netd storage" · 06486796
      Bartosz Fabianowski authored
      This broke the build on master. See b/17613910#comment17
      for details.
      
      This reverts commit ef1fd98b.
      
      Change-Id: I11f7d463061a9b6340c11827135586266e26f016
      06486796
    • Joel Scherpelz's avatar
      SELinux policy for secure persistent netd storage · ef1fd98b
      Joel Scherpelz authored
      This is used to persist RFC 7217 stable secrets across device reboots.
      
      Test: as follows
          - Manually tested that stable_secret is generated on first use and
            persists until reset of user data partition (factory reset).
          - Tested that "adb shell getprop" was denied access to
            persist.netd.stable_secret after running "adb unroot".
      Bug: 17613910
      
      Change-Id: I4dad00fb189d697aceaffae49ad63987c7e45054
      ef1fd98b
  28. Apr 20, 2017
    • Andreas Gampe's avatar
      Sepolicy: Give asan_extract access to powerctl · 82672089
      Andreas Gampe authored
      rc-style powerctl has beem removed. Accordingly, asan_extract now
      needs access to sys.powerctl directly.
      
      Bug: 36458146
      Test: m && m SANITIZE_TARGET=address SANITIZE_TARGET_SYSTEM=true
      Change-Id: Ic65a858962b4b3dd613fdbfa09f93d21425bf892
      82672089
  29. Apr 05, 2017
    • Andreas Gampe's avatar
      Sepolicy: Add ASAN-Extract · 82071b68
      Andreas Gampe authored
      Add selinux policies for init script and shell script to unzip a tar
      containing ASAN libraries on boot.
      
      Bug: 36458146
      Test: m && m SANITIZE_TARGET=address
      Test: manual (build steps for tar missing)
      Change-Id: I5c3cb233aae93ee9985431090af902b0e3c1b0a7
      (cherry picked from commit 0b743050)
      Merged-In: I5c3cb233aae93ee9985431090af902b0e3c1b0a7
      82071b68
  30. Apr 04, 2017
  31. Apr 01, 2017
    • Andreas Gampe's avatar
      Sepolicy: Add ASAN-Extract · 0b743050
      Andreas Gampe authored
      Add selinux policies for init script and shell script to unzip a tar
      containing ASAN libraries on boot.
      
      Bug: 36458146
      Test: m && m SANITIZE_TARGET=address
      Test: manual (build steps for tar missing)
      Change-Id: I5c3cb233aae93ee9985431090af902b0e3c1b0a7
      0b743050
  32. Mar 01, 2017
  33. Feb 10, 2017
    • Nick Kralevich's avatar
      Move net.dns* to it's own label. · 4e404290
      Nick Kralevich authored
      Move net.dns* from net_radio_prop to the newly created label
      net_dns_prop. This allows finer grain control over this specific
      property.
      
      Prior to this change, this property was readable to all SELinux domains,
      and writable by the following SELinux domains:
      
        * system_server
        * system_app (apps which run as UID=system)
        * netmgrd
        * radio
      
      This change:
      
      1) Removes read access to this property to everyone EXCEPT untrusted_app
      and system_server.
      2) Limit write access to system_server.
      
      In particular, this change removes read access to priv_apps. Any
      priv_app which ships with the system should not be reading this
      property.
      
      Bug: 34115651
      Test: Device boots, wifi turns on, no problems browsing the internet
      Change-Id: I8a32e98c4f573d634485c4feac91baa35d021d38
      4e404290
  34. Jan 26, 2017
    • Steven Moreland's avatar
      property: add persist.hal.binderization · cd597cd5
      Steven Moreland authored
      - Added set_prop to shell so that you can set it from shell.
      - Added set_prop to sytem_app so that it can be updated in settings.
      
      Bug: 34256441
      Test: can update prop from Settings and shell. nfc and lights work with
      ag/1833821 with persist.hal.binderization set to on and off. There are
      no additional selinux denials.
      Change-Id: I883ca489093c1d56b2efa725c58e6e3f3b81c3aa
      cd597cd5
  35. Dec 28, 2016
    • Alex Klyubin's avatar
      Restrict access to Bluetooth system properties · 6e4508e6
      Alex Klyubin authored
      This removes access to Bluetooth system properties from arbitrary
      SELinux domains. Access remains granted to init, bluetooth, and
      system_app domains. neverallow rules / CTS enforce that access is not
      granted to Zygote and processes spawned from Zygote expcept for
      system_app and bluetooth.
      
      The reason is that some of these properties may leak persistent
      identifiers not resettable by the user.
      
      Test: Bluetooth pairing and data transfer works
      Bug: 33700679
      Change-Id: Icdcb3927a423c4011a62942340a498cc1b302472
      6e4508e6
Loading