Skip to content
Snippets Groups Projects
  1. Sep 15, 2017
  2. Sep 14, 2017
    • Peng Xu's avatar
      Allow sensor hal to use wakelock · 123bbe94
      Peng Xu authored
      Added permission related to use of wake lock. Wakelock in sensor
      HAL is used to gurantee delivery of wake up sensor events before
      system go back to sleep.
      
      Bug: 63995095
      Test: QCOM and nanohub sensor hal are able to acquire wakelock
            successfuly.
      
      Change-Id: Id4ac3552e18a1cad252017e3dc9ab3d4be8d4ab9
      123bbe94
    • Peng Xu's avatar
      Allow sensor to use gralloc handle and access ion device · d1a9a2f4
      Peng Xu authored
      Allow sensor hal to sue gralloc handle and access ion device
      so that sensor direct report feature can function correctly when
      HardwareBuffer shared memory is used.
      
      Test: SensorDirectReportTest passes without setenforce 0
      
      Change-Id: I2068f6f4a8ac15da40126892e1326e0b90a6576f
      Merged-In: I2068f6f4a8ac15da40126892e1326e0b90a6576f
      d1a9a2f4
  3. Jun 21, 2017
  4. Jun 05, 2017
    • Sandeep Patil's avatar
      Fix coredomain violation for modprobe · e41af203
      Sandeep Patil authored
      
      modprobe domain was allowed to launch vendor toolbox even if its a
      coredomain. That violates the treble separation. Fix that by creating a
      separate 'vendor_modprobe' domain that init is allowed to transition to
      through vendor_toolbox.
      
      Bug: 37008075
      Test: Build and boot sailfish
      
      Change-Id: Ic3331797691bb5d1fdc05a674aa4aa313e1f86b2
      Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
      (cherry picked from commit 9e366a0e)
      e41af203
  5. May 18, 2017
    • Sohani Rao's avatar
      SE Policy for Wifi Offload HAL · 325bf725
      Sohani Rao authored
      Update SE Policy to allow calls to and callbacks from Wifi Offload HAL
      HIDL binderized service.
      Combined cherry pick from d56aa1982d15acfc2408271138dac43f1e5dc987
      and 66e27bf5
      
      Bug: 32842314
      Test: Unit tests, Mannual test to ensure Wifi can be brought up and
      connected to an AP, ensure that Offload HAL service is running and that
      that wificond can get the service handle by calling hwservicemanager.
      
      Change-Id: I0fc51a4152f1891c8d88967e75d45ded115e766e
      325bf725
  6. May 15, 2017
    • Jeff Vander Stoep's avatar
      Move domain_deprecated into private policy · 76aab82c
      Jeff Vander Stoep authored
      This attribute is being actively removed from policy. Since
      attributes are not being versioned, partners must not be able to
      access and use this attribute. Move it from private and verify in
      the logs that rild and tee are not using these permissions.
      
      Bug: 38316109
      Test: build and boot Marlin
      Test: Verify that rild and tee are not being granted any of these
            permissions.
      Change-Id: I31beeb5bdf3885195310b086c1af3432dc6a349b
      76aab82c
  7. May 10, 2017
  8. Apr 28, 2017
    • Jeff Vander Stoep's avatar
      Add default label and mapping for vendor services · 082eae4e
      Jeff Vander Stoep authored
      Adding the default label/mapping is important because:
      1.  Lookups of services without an selinux label should generate
          a denial.
      2.  In permissive mode, lookups of a service without a label should be
          be allowed, without the default label service manager disallows
          access.
      3.  We can neverallow use of the default label.
      
      Bug: 37762790
      Test: Build and flash policy onto Marlin with unlabeled vendor services.
          Add/find of unlabeled vendor services generate a denial.
      
      Change-Id: I66531deedc3f9b79616f5d0681c87ed66aca5b80
      (cherry picked from commit 639a2b84)
      082eae4e
    • Steven Moreland's avatar
      Remove audio from socket_between.._violators · b0ed9363
      Steven Moreland authored
      Test: Play Music over BT headset
      Bug: 37640821
      Change-Id: I1fe6c9a289315dc0118888e19250cd64aee9a0d5
      b0ed9363
  9. Apr 27, 2017
  10. Apr 25, 2017
    • Alex Klyubin's avatar
      Fix typos in comment · a8a03c84
      Alex Klyubin authored
      This is a follow-up to cbc0d2bb which
      introduced the typos.
      
      Test: mmm system/sepolicy -- comments only change
      Bug: 37640821
      Change-Id: Ibe0eda0b3ee9bbfb1e33ef98f2e81267ec580e59
      a8a03c84
  11. Apr 24, 2017
  12. Apr 21, 2017
    • Alex Klyubin's avatar
      Restrict access to hwservicemanager · 53656c17
      Alex Klyubin authored
      This adds fine-grained policy about who can register and find which
      HwBinder services in hwservicemanager.
      
      Test: Play movie in Netflix and Google Play Movies
      Test: Play video in YouTube app and YouTube web page
      Test: In Google Camera app, take photo (HDR+ and conventional),
            record video (slow motion and normal), and check that photos
            look fine and videos play back with sound.
      Test: Cast screen to a Google Cast device
      Test: Get location fix in Google Maps
      Test: Make and receive a phone call, check that sound works both ways
            and that disconnecting the call frome either end works fine.
      Test: Run RsHelloCompute RenderScript demo app
      Test: Run fast subset of media CTS tests:
            make and install CtsMediaTestCases.apk
            adb shell am instrument -e size small \
                -w 'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
      Test: Play music using Google Play music
      Test: Adjust screen brightness via the slider in Quick Settings
      Test: adb bugreport
      Test: Enroll in fingerprint screen unlock, unlock screen using
            fingerprint
      Test: Apply OTA update:
            Make some visible change, e.g., rename Settings app.
            make otatools && \
            make dist
            Ensure device has network connectivity
            ota_call.py -s <serial here> --file out/dist/sailfish-ota-*.zip
            Confirm the change is now live on the device
      Bug: 34454312
      (cherry picked from commit 632bc494)
      Merged-In: Iecf74000e6c68f01299667486f3c767912c076d3
      Change-Id: I7a9a487beaf6f30c52ce08e04d415624da49dd31
      53656c17
  13. Apr 14, 2017
  14. Apr 11, 2017
    • Sandeep Patil's avatar
      sepolicy: make exec_types in /vendor a subset of vendor_file_type · 2ee66e7d
      Sandeep Patil authored
      
      We install all default hal implementations in /vendor/bin/hw along with
      a few domains that are defined in vendor policy and installed in
      /vendor. These files MUST be a subset of the global 'vendor_file_type'
      which is used to address *all files installed in /vendor* throughout the
      policy.
      
      Bug: 36463595
      Test: Boot sailfish without any new denials
      
      Change-Id: I3d26778f9a26f9095f49d8ecc12f2ec9d2f4cb41
      Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
      2ee66e7d
  15. Apr 07, 2017
    • Donghyun Cho's avatar
      Add sepolicy for tv.cec · f81dd0c5
      Donghyun Cho authored
      Bug: 36562029
      Test: m -j40 and CEC functionality works well
      Change-Id: I5a693e65abdd5139a848d939149a475056cc41e8
      f81dd0c5
  16. Apr 06, 2017
  17. Apr 05, 2017
    • Sandeep Patil's avatar
      sepolicy: relabel /vendor · 277a20eb
      Sandeep Patil authored
      
      The CL splits /vendor labeling from /system. Which was allowing all
      processes read, execute access to /vendor.
      
      Following directories will remain world readable
       /vendor/etc
       /vendor/lib(64)/hw/
      
      Following are currently world readable but their scope
      will be minimized to platform processes that require access
       /vendor/app
       /vendor/framework/
       /vendor/overlay
      
      Files labelled with 'same_process_hal_file' are allowed to be
      read + executed from by the world. This is for Same process HALs and
      their dependencies.
      
      Bug: 36527360
      Bug: 36832490
      Bug: 36681210
      Bug: 36680116
      Bug: 36690845
      Bug: 36697328
      Bug: 36696623
      Bug: 36806861
      Bug: 36656392
      Bug: 36696623
      Bug: 36792803
      
      All of the tests were done on sailfish, angler, bullhead, dragon
      Test: Boot and connect to wifi
      Test: Run chrome and load websites, play video in youtube, load maps w/
            current location, take pictures and record video in camera,
            playback recorded video.
      Test: Connect to BT headset and ensure BT audio playback works.
      Test: OTA sideload using recovery
      Test: CTS SELinuxHostTest pass
      
      Change-Id: I278435b72f7551a28f3c229f720ca608b77a7029
      Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
      277a20eb
  18. Apr 04, 2017
    • Alex Klyubin's avatar
      Wifi Keystore HAL is not a HAL · 9a14704f
      Alex Klyubin authored
      Wifi Keystore HAL is a HwBinder service (currently offered by keystore
      daemon) which is used by Wifi Supplicant HAL. This commit thus
      switches the SELinux policy of Wifi Keystore HAL to the approach used
      for non-HAL HwBinder services.
      
      The basic idea is simimilar to how we express Binder services in the
      policy, with two tweaks: (1) we don't have 'hwservicemanager find' and
      thus there's no add_hwservice macro, and (2) we need loosen the
      coupling between core and vendor components. For example, it should be
      possible to move a HwBinder service offered by a core component into
      another core component, without having to update the SELinux policy of
      the vendor image. We thus annotate all components offering HwBinder
      service x across the core-vendor boundary with x_server, which enables
      the policy of clients to contain rules of the form:
      binder_call(mydomain, x_server), and, if the service uses IPC
      callbacks, also binder_call(x_server, mydomain).
      
      Test: mmm system/sepolicy
      Test: sesearch indicates to changes to binder { call transfer} between
            keystore and hal_wifi_supplicant_default domains
      Bug: 36896667
      
      Change-Id: I45c4ce8159b63869d7bb6df5c812c5291776d892
      9a14704f
    • Alex Klyubin's avatar
      tee no longer violates the socket comms ban · 645abead
      Alex Klyubin authored
      SELinux policy no longer has allow rules which permit core/non-vendor
      domains to communicate with tee domain over sockets. This commit thus
      removes tee from the list of temporary exceptions for the socket
      communications prohibition.
      
      Test: mmm system/sepolicy
      Bug: 36714625
      Bug: 36715266
      Change-Id: Iccbd9ea0555b0c9f1cb6c5e0f5a6c0d3f8730b4d
      645abead
  19. Apr 03, 2017
    • Martijn Coenen's avatar
      Add target for vndservice_contexts. · 6676c234
      Martijn Coenen authored
      So we can limit vndservicemanager access to
      just vndservice_contexts.
      
      Bug: 36052864
      Test: servicemanager,vndservicemanager work
      Change-Id: I7b132d4f616ba1edd0daf7be750d4b7174c4e188
      6676c234
    • Alex Klyubin's avatar
      Move TEE rules to vendor image · 304d6536
      Alex Klyubin authored
      "tee" domain is a vendor domain. Hence its rules should live on the
      vendor image.
      
      What's left as public API is that:
      1. tee domain exists and that it is permitted to sys_rawio capability,
      2. tee_device type exists and apps are not permitted to access
         character devices labeled tee_device.
      
      If you were relying on system/sepolicy automatically labeling
      /dev/tf_driver as tee_device or labeling /system/bin/tf_daemon as
      tee_exec, then you need to add these rules to your device-specific
      file_contexts.
      
      Test: mmm system/sepolicy
      Test: bullhead, angler, and sailfish boot up without new denials
      Bug: 36714625
      Bug: 36714625
      Bug: 36720355
      Change-Id: Ie21619ff3c44ef58675c369061b4afdd7e8501c6
      304d6536
  20. Mar 31, 2017
    • Shubang's avatar
      Add sepolicy for tv.input · c76e158c
      Shubang authored
      Test: build, flash; adb shell lshal
      Bug: 36562029
      Change-Id: If8f6d8dbd99d31e6627fa4b7c1fd4faea3b75cf2
      c76e158c
    • Alex Klyubin's avatar
      Tighten restrictions on core <-> vendor socket comms · 2f6151ea
      Alex Klyubin authored
      This futher restricts neverallows for sockets which may be exposed as
      filesystem nodes. This is achieved by labelling all such sockets
      created by core/non-vendor domains using the new coredomain_socket
      attribute, and then adding neverallow rules targeting that attribute.
      
      This has now effect on what domains are permitted to do. This only
      changes neverallow rules.
      
      Test: mmm system/sepolicy
      Bug: 36577153
      
      (cherry picked from commit cf2ffdf0)
      
      Change-Id: Iffeee571a2ff61fb9515fa6849d060649636524e
      2f6151ea
  21. Mar 30, 2017
    • Myles Watson's avatar
      Disallow HAL access to Bluetooth data files · 02d9d21d
      Myles Watson authored
      Devices that store their BT MAC address in /data/misc/bluedroid/ need
      to find another place for that file.
      
      Bug: 36602160
      Test: Restart Bluetooth, check for selinux denials/files in /data/misc
      Change-Id: Ib8d610f201a8c35f95b464c24857c6639205bc66
      Merged-In: Ib8d610f201a8c35f95b464c24857c6639205bc66
      02d9d21d
    • Myles Watson's avatar
      Disallow HAL access to Bluetooth data files · 1317b4ca
      Myles Watson authored
      Devices that store their BT MAC address in /data/misc/bluedroid/ need
      to find another place for that file.
      
      Bug: 36602160
      Test: Restart Bluetooth, check for selinux denials/files in /data/misc
      Change-Id: Ib8d610f201a8c35f95b464c24857c6639205bc66
      1317b4ca
    • Jiyong Park's avatar
      Annotate rild with socket_between_core_and_vendor_violators · 57e9946f
      Jiyong Park authored
      Full treble targets cannot have sockets between framework and vendor
      processes. In theory, this should not affect aosp_arm64_ab where only
      framework binaries are built. However, /system/sepolicy has rild.te
      which is now vendor binary and this causes neverallow conflict when
      building aosp_arm64_ab.
      
      So, we just temporarily annotate the rild with
      socket_between_core_and_vendor_violators so that the neverallow conflict
      can be avoided.
      
      Test: choosecombo 1 aosp_arm64_ab userdebug; m -j 80 The build should
      not break.
      
      Change-Id: I260757cde96857cc3f539d5f82ca69c50653f8c7
      57e9946f
  22. Mar 29, 2017
    • Roshan Pius's avatar
      sepolicy: Add new wifi keystore HAL · 9af7c95f
      Roshan Pius authored
      Moving the wpa_supplicant interaction from the binder keystore service
      to the new wifi keystore HAL.
      
      Denials addressed:
      03-29 00:04:52.075   734   734 E SELinux : avc:  denied  { get } for
      pid=638 uid=1010 scontext=u:r:hal_wifi_keystore_default:s0
      tcontext=u:r:keystore:s0 tclass=keystore_key
      
      Bug: 34603782
      Test: Able to connect to wifi passpoint networks. Denials no longer
      seen.
      Change-Id: I97eb9a4aa9968056a2f1fcc7ce5509ceb62fd41e
      9af7c95f
    • Alex Klyubin's avatar
      tee domain is a vendor domain · 0f6c047d
      Alex Klyubin authored
      As a result, Keymaster and DRM HALs are permitted to talk to tee domain
      over sockets. Unfortunately, the tee domain needs to remain on the
      exemptions list because drmserver, mediaserver, and surfaceflinger are
      currently permitted to talk to this domain over sockets.
      
      We need to figure out why global policy even defines a TEE domain...
      
      Test: mmm system/sepolicy
      Bug: 36601092
      Bug: 36601602
      Bug: 36714625
      Bug: 36715266
      Change-Id: I0b95e23361204bd046ae5ad22f9f953c810c1895
      0f6c047d
  23. Mar 28, 2017
    • Jeff Vander Stoep's avatar
      Ban vendor components access to core data types · 4a478c47
      Jeff Vander Stoep authored
      Vendor and system components are only allowed to share files by
      passing open FDs over HIDL. Ban all directory access and all file
      accesses other than what can be applied to an open file:
      stat/read/write/append.
      
      This commit marks core data types as core_data_file_type and bans
      access to non-core domains with an exemption for apps. A temporary
      exemption is also granted to domains that currently rely on
      access with TODOs and bug number for each exemption.
      
      Bug: 34980020
      Test: Build and boot Marlin. Make phone call, watch youtube video.
            No new denials observed.
      Change-Id: I320dd30f9f0a5bf2f9bb218776b4bccdb529b197
      4a478c47
  24. Mar 27, 2017
    • Alex Klyubin's avatar
      Ban socket connections between core and vendor · 2746ae68
      Alex Klyubin authored
      On PRODUCT_FULL_TREBLE devices, non-vendor domains (coredomain) and
      vendor domain are not permitted to connect to each other's sockets.
      There are two main exceptions: (1) apps are permitted to talk to other
      apps over Unix domain sockets (this is public API in Android
      framework), and (2) domains with network access (netdomain) are
      permitted to connect to netd.
      
      This commit thus:
      * adds neverallow rules restricting socket connection establishment,
      * temporarily exempts the domains which are currently violating this
        rule from this restriction. These domains are grouped using the new
        "socket_between_core_and_vendor_violators" attribute. The attribute
        is needed because the types corresponding to violators are not
        exposed to the public policy where the neverallow rules are.
      
      Test: mmm system/sepolicy
      Bug: 36613996
      Change-Id: I458f5a09a964b06ad2bddb52538ec3a15758b003
      2746ae68
  25. Mar 25, 2017
  26. Mar 24, 2017
    • Alex Klyubin's avatar
      Mark all clients of Allocator HAL · 7cda44f4
      Alex Klyubin authored
      This change associates all domains which are clients of Allocator HAL
      with hal_allocator_client and the, required for all HAL client
      domains, halclientdomain.
      
      This enables this commit to remove the now unnecessary hwallocator_use
      macro because its binder_call(..., hal_allocator_server) is covered by
      binder_call(hal_allocator_client, hal_allocator_server) added in this
      commit.
      
      Unfortunately apps, except isolated app, are clients of Allocator HAL
      as well. This makes it hard to use the hal_client_domain(...,
      hal_allocator) macro because it translates into "typeattribute" which
      currently does not support being provided with a set of types, such as
      { appdomain -isolated_app }. As a workaround, hopefully until
      typeattribute is improved, this commit expresses the necessary
      association operation in CIL. private/technical_debt.cil introduced by
      this commit is appended into the platform policy CIL file, thus
      ensuring that the hack has effect on the final monolithic policy.
      
      P. S. This change also removes Allocator HAL access from isolated_app.
      Isolated app shouldn't have access to this HAL anyway.
      
      Test: Google Play Music plays back radios
      Test: Google Camera records video with sound and that video is then
            successfully played back with sound
      Test: YouTube app plays back clips with sound
      Test: YouTube in Chrome plays back clips with sound
      Bug: 34170079
      Change-Id: Id00bba6fde83e7cf04fb58bc1c353c2f66333f92
      7cda44f4
    • Alex Klyubin's avatar
      Vendor domains must not use Binder · f5446eb1
      Alex Klyubin authored
      On PRODUCT_FULL_TREBLE devices, non-vendor domains (except vendor
      apps) are not permitted to use Binder. This commit thus:
      * groups non-vendor domains using the new "coredomain" attribute,
      * adds neverallow rules restricting Binder use to coredomain and
        appdomain only, and
      * temporarily exempts the domains which are currently violating this
        rule from this restriction. These domains are grouped using the new
        "binder_in_vendor_violators" attribute. The attribute is needed
        because the types corresponding to violators are not exposed to the
        public policy where the neverallow rules are.
      
      Test: mmm system/sepolicy
      Test: Device boots, no new denials
      Test: In Chrome, navigate to ip6.me, play a YouTube video
      Test: YouTube: play a video
      Test: Netflix: play a movie
      Test: Google Camera: take a photo, take an HDR+ photo, record video with
            sound, record slow motion video with sound. Confirm videos play
            back fine and with sound.
      Bug: 35870313
      Change-Id: I0cd1a80b60bcbde358ce0f7a47b90f4435a45c95
      f5446eb1
  27. Mar 23, 2017
    • Martijn Coenen's avatar
      Initial sepolicy for vndservicemanager. · e7d8f4c3
      Martijn Coenen authored
      vndservicemanager is the context manager for binder services
      that are solely registered and accessed from vendor processes.
      
      Bug: 36052864
      Test: vendorservicemanager runs
      Merged-In: Ifbf536932678d0ff13d019635fe6347e185ef387
      Change-Id: I430f1762eb83825f6cd4be939a69d46a8ddc80ff
      e7d8f4c3
  28. Mar 22, 2017
    • Martijn Coenen's avatar
      Initial sepolicy for vndservicemanager. · cba70be7
      Martijn Coenen authored
      vndservicemanager is the context manager for binder services
      that are solely registered and accessed from vendor processes.
      
      Bug: 36052864
      Test: vendorservicemanager runs
      Change-Id: Ifbf536932678d0ff13d019635fe6347e185ef387
      cba70be7
Loading