Skip to content
Snippets Groups Projects
  1. Dec 29, 2016
  2. 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
  3. Dec 27, 2016
  4. 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
    • Mikhail Naganov's avatar
      Allow hal_audio to set scheduling policy for its threads · e91740a5
      Mikhail Naganov authored
      Audio HAL server needs to set SCHED_FIFO scheduling policy
      for its threads that communicate with FastMixer threads of
      AudioFlinger that use the same scheduler.
      
      Bug: 30222631
      Change-Id: I405a69d097a6bfed455e3483365b27c4004e1063
      e91740a5
  5. Dec 21, 2016
  6. 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
  7. Dec 19, 2016
    • Nick Kralevich's avatar
      priv_app.te: drop app_data_file:file execute_no_trans; · 8fb4cb8b
      Nick Kralevich authored
      auditallow (added in commit 758e6b36)
      has been in place for about 2 weeks now, and no hits. Remove
      execute_no_trans.
      
      The net effect of this change is that priv_apps won't be able to exec()
      a file from their home directory, but dlopen() and friends will still
      work.
      
      Test: Compiles and boots successfully.
      Test: No auditallow messages received via SELinux denial collection.
      Change-Id: I60fcdc260d12e1bcc2355ca4dd912de7e6d0a145
      8fb4cb8b
    • Allen Hair's avatar
      Add coverage service. · 2328fec7
      Allen Hair authored
      Bug: 31077138
      Test: Device boots, coverage service works when tested manually.
      Change-Id: Ia855cfefd5c25be5d1d8db48908c04b3616b5504
      2328fec7
  8. Dec 17, 2016
  9. Dec 16, 2016
  10. Dec 15, 2016
    • Glen Kuhne's avatar
      hwbinder_use: allow for hwservicemanager callbacks. · 9147a238
      Glen Kuhne authored
      In order for hal clients to use IServiceManager::registerForNotifications,
      the hwservicemanager needs to be able to call into client processes.
      
      Test: WIP
      Bug: 33383725
      Change-Id: I59470e9cd5cbeafda010fedc0b91eeb41280e0a1
      9147a238
    • Jeff Sharkey's avatar
      Allow installd to get/set filesystem quotas. · fe1de046
      Jeff Sharkey authored
      To support upcoming disk usage calculation optimizations, this change
      grants installd access to work with filesystem quotas.
      
      avc: denied { search } for name="block" dev="tmpfs" ino=15279 scontext=u:r:installd:s0 tcontext=u:object_r:block_device:s0 tclass=dir permissive=0
      avc: denied { sys_admin } for capability=21 scontext=u:r:installd:s0 tcontext=u:r:installd:s0 tclass=capability permissive=1
      avc: denied { quotaget } for scontext=u:r:installd:s0 tcontext=u:object_r:labeledfs:s0 tclass=filesystem permissive=1
      
      Test: builds
      Bug: 27948817
      Change-Id: Ic166e8ced30e15ce84223576729888a824037691
      fe1de046
    • Nick Kralevich's avatar
      Enforce assumptions around metadata_block_device · 5207ca6a
      Nick Kralevich authored
      Add a compile time assertion that only authorized SELinux domains are
      allowed to touch the metadata_block_device. This domain may be wiped at
      will, and we want to ensure that we're not inadvertently destroying
      other people's data.
      
      Test: policy compiles.
      Change-Id: I9854b527c3d83e17f717d6cc8a1c6b50e0e373b6
      5207ca6a
  11. 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
    • Chad Brubaker's avatar
      Allow binder IPC between ephemeral app and appdomain · 641d5d8f
      Chad Brubaker authored
      Address denial type=1400 audit(0.0:42): avc: denied { call } for
      scontext=u:r:untrusted_app:s0:c512,c768
      tcontext=u:r:ephemeral_app:s0:c207,c258,c512,c768 tclass=binder
      
      Test: Above denial no longer happens
      Change-Id: I351269ee4671cfd51c981d3db5d0f3944d14e702
      641d5d8f
    • 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
    • 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
  12. Dec 13, 2016
    • Max's avatar
      Removing file system remount permission from vold · 16c889c5
      Max authored
      There is no reason for vold to have this permission, and a proper
      auditallow rule has been used and monitored to ensure that nothing on
      android uses this permission.
      
      Bug: 26901147
      
      Test: Phone boots
      Change-Id: Id36ed2722348f433fe3d046a3429066338230fec
      16c889c5
    • 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
    • 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
  13. 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
    • 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
    • Roshan Pius's avatar
      hal_wifi: Allow HAL to reload wifi firmware · 85e3e7d6
      Roshan Pius authored
      Need write permissions on the specified sysfs path for reloading
      firmware.
      
      Denials:
      01-21 23:39:01.650  4669  4669 W android.hardwar: type=1400
      audit(0.0:103): avc: denied { write } for name="fwpath" dev="sysfs"
      ino=6847 scontext=u:r:hal_wifi:s0
      tcontext=u:object_r:sysfs_wlan_fwpath:s0 tclass=file permissive=0
      01-21 23:39:01.653  4669  4669 E android.hardware.wifi@1.0-service:
      Failed to open wlan fw path param: Permission denied
      
      Bug: 32018162
      Test: Denials no longer present in the logs.
      Change-Id: I1a468e7c2a2a4360a2b61f04f1940471d52d0dd6
      85e3e7d6
    • Roshan Pius's avatar
      hal_wifi: Allow system_server to access wifi HIDL services · 02ed21e8
      Roshan Pius authored
      We're going to be using Android framework directly to invoke Wifi HIDL
      calls. So, change permissions appropriately.
      
      Bug: 33398154
      Test: Verfied that framework is able to make HIDL calls using
      go/aog/310610.
      
      Change-Id: I4d0d88961753ad73f3876aec58b26b89486cc02a
      02ed21e8
  14. 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
Loading