Skip to content
Snippets Groups Projects
  1. Jan 08, 2017
  2. Jan 07, 2017
    • Nick Kralevich's avatar
      storaged.te: Remove redundant permission. · 1a022cbb
      Nick Kralevich authored
      All SELinux domains are already granted the ability to read the
      filenames in /proc, so it's unnecessary to add it to storaged.te.
      
        $ grep "proc:dir r_dir_perms" public/domain.te
        allow domain proc:dir r_dir_perms;
      
      Remove redundant rule.
      
      Test: policy compiles.
      Change-Id: I8779cda19176f7eb914778f131bb5b14e5b14448
      1a022cbb
    • ynwang's avatar
      Storaged permissions for task I/O · e68d2d2c
      ynwang authored
      Allow storaged to read /proc/[pid]/io
      Grant binder access to storaged
      Add storaged service
      Grant storaged_exec access to dumpstate
      Grant storaged binder_call to dumpstate
      
      Bug: 32221677
      
      Change-Id: Iecc9dba266c5566817a99ac6251eb943a0bac630
      e68d2d2c
    • ynwang's avatar
      Storaged permission setting · 9fa8823c
      ynwang authored
      Allowing storaged for reading from pseudo filesystems and debugfs.
      
      Bug: 32221677
      
      Change-Id: I837cead9a68f0b399703b64d724cb9c4b205c335
      9fa8823c
    • Nick Kralevich's avatar
      priv_app.te: remove domain_deprecated · 164af103
      Nick Kralevich authored
      No denials collected.
      
      Bug: 28760354
      Test: no denials collected.
      Test: device boots and no obvious problems
      Change-Id: I7fc053ecae2db3bb2ca7c298634453e930713bec
      164af103
  3. Jan 06, 2017
    • Alex Klyubin's avatar
      Move system_app policy to private · b5853c3b
      Alex Klyubin authored
      This leaves only the existence of system_app domain as public API.
      All other rules are implementation details of this domain's policy and
      are thus now private.
      
      Test: No change to policy according to sesearch, except for
            disappearance of all allow rules from system_app_current
            attribute (as expected).
      Bug: 31364497
      
      Change-Id: Ifc7d350ed9749a32b0c38a78ac5f41c819dbdb96
      b5853c3b
    • Alex Klyubin's avatar
      Move isolated_app policy to private · a3903974
      Alex Klyubin authored
      This leaves only the existence of isolated_app domain as public API.
      All other rules are implementation details of this domain's policy and
      are thus now private.
      
      Test: No change to policy according to sesearch, except for
            disappearance of all allow rules from isolated_app_current
            attribute (as expected).
      Bug: 31364497
      
      Change-Id: I499a648e515628932b7bcd188ecbfbe4a247f2f3
      a3903974
  4. Jan 05, 2017
    • Alex Klyubin's avatar
      Move priv_app policy to private · 92295ef8
      Alex Klyubin authored
      This leaves the existence of priv_app domain as public API. All other
      rules are implementation details of this domain's policy and are thus
      now private.
      
      Test: No change to policy according to sesearch, except for
            disappearance of all allow rules from priv_app_current
            attribute (as expected) except for
            allow priv_app_current update_engine_current:binder transfer;
            which is caused by public update_engine.te rules and will go
            away once update_engine rules go private.
      Bug: 31364497
      
      Change-Id: Iea583127fbf0a19c37dd42bf1ef2ae0454793391
      92295ef8
    • Alex Klyubin's avatar
      Move untrusted_app policy to private · fce60d3d
      Alex Klyubin authored
      This leaves only the existence of untrusted_app domain as public API.
      All other rules are implementation details of this domain's policy and
      are thus now private.
      
      Test: No change to policy according to sesearch, except for
            disappearance of all allow rules from untrusted_domain_current
            attribute (as expected).
      Bug: 31364497
      
      Change-Id: Ief71fa16cfc38437cbe5c58100bba48b9a497c92
      fce60d3d
    • dcashman's avatar
      Split file_contexts for on-device compilation. · d225b697
      dcashman authored
      
      Simulate platform and non-platform split by compiling two different
      file_contexts files and loading them together on-device.  Leave the existing
      file_contexts.bin in place until we're ready to build images based on the new
      files.
      
      Bug: 31363362
      Test: Builds and boots without additional denials.
      Change-Id: I7248f876e2230cee3b3cbf386422063da1e3dde0
      
      Bring back file_contexts.bin.
      
      Change-Id: Ifec2c363579151080fdec48e8bc46bbbc8c97674
      Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
      d225b697
  5. Jan 04, 2017
    • Nick Kralevich's avatar
      untrusted_app: allow access to /proc/tty/drivers · e427a2b2
      Nick Kralevich authored
      /proc/tty/drivers is read by applications to figure out if they are
      running in an emulated environment. Specifically, they look for the
      string "goldfish" within that file.
      
      Arguably this is not an Android API, and really shouldn't be exposed to
      applications, but:
      
      1) A largish number of applications break if they can't read this file;
      2) The information here isn't particularly sensitive
      
      While we could spend a bunch of time trying to get applications fixed,
      there are bigger fish to fry. It's not worth the battle.
      
      Test: "ls -laZ /proc/tty/drivers" is labeled properly.
      Bug: 33214085
      Bug: 33814662
      Bug: 33791054
      Bug: 33211769
      Bug: 26813932
      Change-Id: Icc05bdc1c917547a6dca7d76636a1009369bde49
      e427a2b2
  6. Jan 03, 2017
  7. Dec 29, 2016
  8. Dec 28, 2016
    • Ashutosh Joshi's avatar
      Add sepolicy for contexthub HAL · e8d0bdae
      Ashutosh Joshi authored
      Adding sepolicty for contexthub service.
      
      Test: GTS tests pass.
      Change-Id: I2576b8028d12a31151d7b7869679b853eb16c75e
      e8d0bdae
    • 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
  9. 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
    • Ashutosh Joshi's avatar
      Change the name advertised by the context hub service. · dea4975f
      Ashutosh Joshi authored
      Bring the context hub service advertised name into compliance with
      the other Android services. This changes the name from
      "contexthub_service" to "context".
      
      Test: GTS tests pass.
      
      Change-Id: I8490d60f89bdb97813e328b9ddf08270470fda76
      dea4975f
  10. Dec 22, 2016
    • Steven Moreland's avatar
      Sepolicy for allocator hal. · 72d18125
      Steven Moreland authored
      Bug: 32123421
      Test: full build/test of allocator hal using hidl_test
      Change-Id: I253b4599b6fe6e7f4a2f5f55b34cdeed9e5d769b
      72d18125
    • 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
  11. Dec 20, 2016
    • Mark Salyzyn's avatar
      logcat: introduce split to logd and logpersist domains · da62cb4d
      Mark Salyzyn authored
      - transition to logpersist from init
      - sort some overlapping negative references
      - intention is to allow logpersist to be used by vendor
        userdebug logging
      
      Test: gTest liblog-unit-tests, logd-unit-tests & logcat-unit-tests
      Bug: 30566487
      Change-Id: I7806f5a2548cbe0c1f257a0ba2855f2eb69d8e7c
      da62cb4d
  12. Dec 19, 2016
  13. Dec 17, 2016
  14. Dec 16, 2016
  15. 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
    • Steven Moreland's avatar
      All hal policies expressed as attributes. · 29eed9fa
      Steven Moreland authored
      Bug: 32123421
      Bug: 32905206
      
      Test: compiles, nfc works
      Change-Id: Ibf72ef70255573e4df0863ea640354b3c37eb47d
      29eed9fa
  16. Dec 13, 2016
    • Connor O'Brien's avatar
      Add sepolicy for consumerir HIDL HAL · a95c52e3
      Connor O'Brien authored
      
      Test: logging confirms service runs on boot
      Change-Id: If86fa7daf4a626b3e04fa0d2677d4cb590eb71ce
      Signed-off-by: default avatarConnor O'Brien <connoro@google.com>
      a95c52e3
    • dcashman's avatar
      Split policy for on-device compilation. · 1faa644c
      dcashman authored
      Simulate platform and non-platform split by sending the split files to the
      device to be compiled by init.
      
      Bug: 31363362
      Test: Policy builds on-device and boots.  sediff shows no difference.
      Change-Id: I9627d1c66ca37786d97a049666278a4992ad7579
      1faa644c
    • Jeff Sharkey's avatar
      Partially revert "mediaprovider" SELinux domain. · 52da39d9
      Jeff Sharkey authored
      The new domain wasn't fully tested, and it caused many regressions
      on the daily build.  Revert back to using "priv_app" domain until we
      can fully test and re-land the new domain.
      
      Temporarily add the USB functionfs capabilities to priv_app domain
      to keep remainder of MtpService changes working; 33574909 is tracking
      removing that from the priv_app domain.
      
      Test: builds, boots, verified UI and downloads
      Bug: 33569176, 33568261, 33574909
      Change-Id: I1bd0561d52870df0fe488e59ae8307b89978a9cb
      52da39d9
  17. Dec 12, 2016
    • Jerry Zhang's avatar
      Move MediaProvider to its own domain, add new MtpServer permissions · f921dd9c
      Jerry Zhang authored
      Also move necessary priv_app permissions into MediaProvider domain and
      remove MediaProvider specific permissions from priv_app.
      
      The new MtpServer permissions fix the following denials:
      
      avc: denied { write } for comm=6D747020666673206F70656E name="ep0" dev="functionfs" ino=12326 scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:functionfs:s0 tclass=file permissive=1
      
      denial from setting property sys.usb.ffs.mtp.ready, context priv_app
      
      Bug: 30976142
      Test: Manual, verify permissions are allowed
      Change-Id: I4e66c5a8b36be21cdb726b5d00c1ec99c54a4aa4
      f921dd9c
  18. Dec 10, 2016
    • Nick Kralevich's avatar
      Move hci_attach to hikey · 4394b2c0
      Nick Kralevich authored
      This is unused by core policy and by any device policy except for hikey.
      
      Test: device boots
      Test: no denials ever collected
      Change-Id: I36a6790499e4aeedd808457b43fd72370fa48e53
      4394b2c0
    • Nick Kralevich's avatar
      Whitespace fix · b56e6ef8
      Nick Kralevich authored
      Because I'm nitpicky.
      
      Test: policy compiles
      Change-Id: I4d886d0d6182d29d7b260cf1f142c47cd32eda29
      b56e6ef8
  19. Dec 09, 2016
    • Jeff Sharkey's avatar
      installd has moved on to Binder; goodbye socket! · 8b1d4520
      Jeff Sharkey authored
      After a series of recent commits, installd has fully migrated over
      to Binder, and all socket-based communication has been removed.
      
      Test: builds, boots, apps install fine, pre-OTA dexopt works
      Bug: 13758960, 30944031
      Change-Id: Ia67b6260de58240d057c99b1bbd782b44376dfb5
      8b1d4520
  20. 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
  21. Dec 07, 2016
    • dcashman's avatar
      Fix build. · 0c8ad1dc
      dcashman authored
      Make all platform tyeps public to start to prevent build breakage in any devices
      that may have device-specific policy using these types.  Future changes will
      need to be carefully made to ensure we properly limit types for use by
      non-platform policy.
      
      Test: Builds
      Change-Id: I7349940d5b5a57357bc7c16f66925dee1d030eb6
      0c8ad1dc
  22. 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
  23. Dec 05, 2016
    • Jeff Sharkey's avatar
      Rules for new installd Binder interface. · e160d14e
      Jeff Sharkey authored
      Most of this CL mirrors what we've already done for the "netd" Binder
      interface, while sorting a few lists alphabetically.
      
      Migrating installd to Binder will allow us to get rid of one of
      the few lingering text-based command protocols, improving system
      maintainability and security.
      
      Test: builds, boots
      Bug: 13758960, 30944031
      Change-Id: I59b89f916fd12e22f9813ace6673be38314c97b7
      e160d14e
Loading