Skip to content
Snippets Groups Projects
  1. Mar 16, 2018
  2. Mar 12, 2018
    • Amit Mahajan's avatar
      Revert "Revert "Move rild from public to vendor."" · 3007344d
      Amit Mahajan authored
      This reverts commit 016f0a58.
      
      Reason for revert: Was temporarily reverted, merging back in with fix.
      
      Test: Basic telephony sanity, treehugger
      Bug: 74486619
      Bug: 36427227
      Merged-in: Ide68726a90d5485c2758673079427407aee1e4f2
      Change-Id: Ide68726a90d5485c2758673079427407aee1e4f2
      (cherry picked from commit 312248ff)
      3007344d
    • Amit Mahajan's avatar
      Revert "Move rild from public to vendor." · 58758dc2
      Amit Mahajan authored
      This reverts commit aed57d4e.
      
      Reason for revert: This CL is expected to break pre-submit tests (b/74486619)
      
      Merged-in: I103c3faa1604fddc27b3b4602b587f2d733827b1
      Change-Id: I0eb7a744e0d43ab15fc490e7e7c870d0f44e1401
      58758dc2
  3. Mar 10, 2018
    • Amit Mahajan's avatar
      Move rild from public to vendor. · aed57d4e
      Amit Mahajan authored
      Also change the neverallow exceptions to be for hal_telephony_server
      instead of rild.
      
      Test: Basic telephony sanity, treehugger
      Bug: 36427227
      Merged-in: If892b28416d98ca1f9c241c5fcec70fbae35c82e
      Change-Id: If892b28416d98ca1f9c241c5fcec70fbae35c82e
      aed57d4e
  4. Feb 05, 2018
    • Jaekyun Seok's avatar
      Add tests for compatible property (1/2) · 64ade65d
      Jaekyun Seok authored
      The feature of compatible property has its own neverallow rules and it
      is enforced on devices launchig with Android P.
      
      This CL changes hal_nfc to hal_nfc_server in neverallow rules because
      sepolicy-analyze doesn't recognize it. Additionally one more neverallow
      rule is added to restrict reading nfc_prop.
      
      Bug: 72013705
      Bug: 72678352
      Test: 'run cts -m CtsSecurityHostTestCases' on walleye with
      ro.product.first_api_level=28
      
      Change-Id: I753cc81f7ca0e4ad6a2434b2a047052678f57671
      64ade65d
  5. Jan 31, 2018
  6. Jan 25, 2018
    • Tom Cherry's avatar
      Fix compatible property neverallows · eed2e84a
      Tom Cherry authored
      The current neverallow rules for compatible properties restrict
      domains from write file permissions to the various property files.
      This however is the wrong restriction, since only init actually writes
      to these property files.  The correct restriction is to restrict 'set'
      for 'property_service' as this change does.
      
      Note there is already a restriction preventing {domain -init} from
      writing to these files in domain.te.
      
      Test: build
      Change-Id: I19e13b0d084a240185d0f3f5195e54065dc20e09
      eed2e84a
  7. Jan 16, 2018
  8. 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
  9. Nov 16, 2017
  10. Nov 15, 2017
  11. Nov 08, 2017
  12. Sep 28, 2017
  13. Sep 26, 2017
  14. 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
  15. Jul 13, 2017
  16. Jul 12, 2017
  17. 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
  18. 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
  19. 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
  20. 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
  21. 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
  22. May 15, 2017
    • Dan Cashman's avatar
      Partially revert "Sepolicy: Give asan_extract access to powerctl" · f66fbab2
      Dan Cashman authored
      This is a partial revert of commit 82672089.
      The previous commit removed a public type, which is a version-incompatible
      change to the SELinux vendor API.  Since the 2017 devices are meant to be
      launching with the previous version, this is unacceptable.  Revert the
      version-incompatible parts of the change, but keep the other parts to enable
      existing system functionality to persist and become part of MR1.  Leave TODOs
      to remove the other parts when a version bump is acceptable.
      
      Bug: 38241921
      Test: Policy builds and device boots with ASAN enabled.
      Change-Id: I0dd3673b8ed7fb86abd79cd04982396000e986f1
      f66fbab2
  23. 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
  24. 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
  25. Apr 04, 2017
  26. 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
  27. Mar 01, 2017
  28. 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
  29. 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
  30. 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
  31. Dec 27, 2016
    • Alex Klyubin's avatar
      Remove access to ro.runtime.firstboot from apps · 062236a8
      Alex Klyubin authored
      ro.runtime.firstboot system property is only used internally by
      system_server to distinguish between first start after boot from
      consecutive starts (for example, this happens when full-disk
      encryption is enabled). The value of the property is a
      millisecond-precise timestamp which can help track individual
      device. Thus apps should not have access to this property.
      
      Test: Device boots fine, reading ro.runtime.firstboot from an app results in an error and SELinux denial.
      Bug: 33700679
      Change-Id: I4c3c26a35c5dd840bced3a3e53d071f45317f63c
      062236a8
  32. Dec 22, 2016
    • Alex Klyubin's avatar
      Restrict access to ro.serialno and ro.boot.serialno · 20151072
      Alex Klyubin authored
      This restricts access to ro.serialno and ro.boot.serialno, the two
      system properties which contain the device's serial number, to a
      select few SELinux domains which need the access. In particular, this
      removes access to these properties from Android apps. Apps can access
      the serial number via the public android.os.Build API. System
      properties are not public API for apps.
      
      The reason for the restriction is that serial number is a globally
      unique identifier which cannot be reset by the user. Thus, it can be
      used as a super-cookie by apps. Apps need to wean themselves off of
      identifiers not resettable by the user.
      
      Test: Set up fresh GMS device, install some apps via Play, update some apps, use Chrome
      Test: Access the device via ADB (ADBD exposes serial number)
      Test: Enable MTP over USB, use mtp-detect to confirm that serial number is reported in MTP DeviceInfo
      Bug: 31402365
      Bug: 33700679
      Change-Id: I4713133b8d78dbc63d8272503e80cd2ffd63a2a7
      20151072
  33. Dec 14, 2016
    • Nick Kralevich's avatar
      Assign a label to the ro.boottime.* properties · bb9a3888
      Nick Kralevich authored
      system/core commit 331cf2fb7c16b5b25064f8d2f00284105a9b413f created a
      number of new properties of the form:
      
        [ro.boottime.init]: [5294587604]
        [ro.boottime.InputEventFind]: [10278767840]
        [ro.boottime.adbd]: [8359267180]
        ...
      
      These properties were assigned the default_prop SELinux label because a
      better label did not exist. Properties labeled with the default_prop
      label are readable to any SELinux domain, which is overly broad.
      
        bullhead:/ $ getprop -Z ro.boottime.adbd
        u:object_r:default_prop:s0
      
      Instead, create a new label for the ro.boottime.* properties so we can
      apply more fine grain read access control to these properties.
      
        bullhead:/ $ getprop -Z ro.boottime.adbd
        u:object_r:boottime_prop:s0
      
      New SELinux property labels have minimal permissions by default. As a
      result, after this change, ro.boottime.* properties will only be
      readable to system_server, bootstat, init (because it manages the property
      space), and "adb root" (because no SELinux permissions are enforced there).
      
      Additional read access can be granted as-needed.
      
      This is part of a larger effort to implement fine-grain access control
      on the properties managed by init.
      
      Test: Device boots and no SELinux denials on boot.
      Change-Id: Ibf981cb81898f4356fdc5c1b6f15dd93c0d6d84d
      bb9a3888
    • Nick Kralevich's avatar
      Do not allow new additions to core_property_type · da17402c
      Nick Kralevich authored
      core_property_type is an attribute which was given to all existing
      properties known to core SELinux policy. Any property with this label is
      readable to all SELinux domains, which is overly broad. The long term
      goal is to remove the core_property_type attribute entirely.
      
      Add a neverallow rule prohibiting the introduction of new properties
      with the core_property_type attribute. Device specific properties, or
      new properties in core SELinux policy, should not have this attribute.
      
      (cherry picked from commit d310df20)
      
      Test: policy compiles
      Bug: 33620117
      Change-Id: I61d18c126bca722002f41a5cc4728318878f46c6
      da17402c
    • Bill Napier's avatar
      Revert "Merge "Do not allow new additions to core_property_type" am:... · dd7363fd
      Bill Napier authored
      Revert "Merge "Do not allow new additions to core_property_type" am: d57dd813 am: f13dcbb4 am: 5bfa8509 am: 47e2f081"
      
      This reverts commit 635d206b.
      
      Change-Id: I1f937794162b563a24bbc4f4c83a24be93812a54
      dd7363fd
    • Nick Kralevich's avatar
      Do not allow new additions to core_property_type · d310df20
      Nick Kralevich authored
      core_property_type is an attribute which was given to all existing
      properties known to core SELinux policy. Any property with this label is
      readable to all SELinux domains, which is overly broad. The long term
      goal is to remove the core_property_type attribute entirely.
      
      Add a neverallow rule prohibiting the introduction of new properties
      with the core_property_type attribute. Device specific properties, or
      new properties in core SELinux policy, should not have this attribute.
      
      Test: policy compiles
      Change-Id: Ie89a9f0d81c8561616001ff8451496ce2278dbb2
      d310df20
  34. Nov 11, 2016
Loading