Skip to content
Snippets Groups Projects
  1. Apr 12, 2017
  2. Apr 11, 2017
  3. Apr 10, 2017
    • Alex Klyubin's avatar
      Grant audioserver access to /system/lib64/hw · 2d704464
      Alex Klyubin authored
      audioserver uses an always-passthrough Allocator HAL (ashmem / mapper)
      whose .so is loaded from /system/lib64/hw.
      
      Test: Modify hal_client_domain macro to not associate client of X HAL
            with hal_x attribute. Play Google Play Movies move -- no denials
            and AV playback works.
      Bug: 37160141
      
      Change-Id: I7b88b222aba5361a6c7f0f6bb89705503255a4b1
      2d704464
    • Sandeep Patil's avatar
      sepolicy: Fix renderscript driver lookup · 3af3a13b
      Sandeep Patil authored
      
      Renderscript drivers are loaded from /vendor/lib64 by following the
      /system/vendor symlink. This change fixes a couple of things.
      - Allows all domains access to follow the symlink
      - Restores app domain permissions for /vendor for non-treble devices
      - Allow app domains to peek into /vendor/lib64, but NOT grant 'execute'
        permissions for everything. Since RS drivers can be loaded into any
        process, their vendor implementation and dependencies have been
        marked as 'same process HALs' already.
      
      Bug: 37169158
      Test: Tested on sailfish (Treble) & Angler (non-treble)
            ./cts-tradefed run cts -m CtsRenderscriptTestCases \
            --skip-device-info --skip-preconditions --skip-connectivity-check \
            --abi arm64-v8a
            Result: Tests Passed: 743 Tests Failed: 0
      
      Change-Id: I36f5523381428629126fc196f615063fc7a50b8e
      Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
      3af3a13b
    • Howard Chen's avatar
      SELinux changes for Treble Loadable Kernel Module · f6931130
      Howard Chen authored
      This change extends the recovery mode modprobe sepolicy
      to support loadable kernel module in normal mode by using
      statement below in init.rc:
      
      exec u:r:modprobe:s0 -- /system/bin/modprobe \
          -d /vendor/lib/modules mod
      
      Bug: b/35653245
      Test: sailfish  with local built kernel and LKM enabled
      Change-Id: I827e2ce387c899db3e0e179da92e79c75d61f5ae
      (cherry picked from commit b638d949)
      f6931130
    • Jiyong Park's avatar
      Rename vndk-stable to vndk-sp (SP=Same-process) · ba23c8fa
      Jiyong Park authored
      The concept of VNDK-stable set is gone because they no longer need to be
      stable across several Android releases. Instead, they are just small set
      of system libraries (other than Low-Level NDK) that can be used by
      same-process HALs. They need to be stable only during an Android release
      as other VNDK libraries. However, since they are eligible for double
      loading, we still need to distinguish those libs from other VNDK
      libraries. So we give them a name vndk-sp, which means VNDK designed for
      same-process HALs.
      
      Bug: 37139956
      Test: booting successful with vndk-sp libs in /vendor/lib(64)?/vndk-sp
      Change-Id: I892c4514deb3c6c8006e3659bed1ad3363420732
      ba23c8fa
  4. Apr 08, 2017
    • Jaekyun Seok's avatar
      Allow zygote to access dir/file under /vendor/overlay · e360791d
      Jaekyun Seok authored
      http://ag/2070347 doesn't allow zygote to read vendor_overlay_file:file
      anymore.
      But zygote isn't transitioned into idmap when executing idmap_exec. So
      we need to allow zygote to access dir/file under /vendor/overlay to
      enable idmap_exec run by zygote to read static RRO.
      
      Test: building succeeded and tested a static RRO on sailfish device.
      Bug: 37173452
      Change-Id: Iec8a6b31d24c225f7819eeb885305f78da73b8e0
      e360791d
  5. Apr 07, 2017
    • Jaesoo Lee's avatar
      allow access to vendor_framework_file to dex2oat and appdomain · 5377be65
      Jaesoo Lee authored
      We should give appdomain the access to the /vendor/framework directory
      since the jar in the directory is not dexopt-ed.AFAIK, jars which are
      not in the bootclasspath are not dexopt-ed by default.
      
      Bug: b/37129319
      Test: built and confirmed that embms.apk not crashed
      
      Change-Id: Ic2b1eef472f2fba53e26403dde8ad9ede8105a03
      5377be65
    • Jiyong Park's avatar
      sepolicy: allow access to vndk-stable libs · a4768fa8
      Jiyong Park authored
      Vndk-stable libs are system libs that are used by same process HALs.
      Since same process HALs can be loaded to any process, so are vndk-stable
      libs.
      
      Bug: 37138502
      Test: none, because the directory is currently empty and thus this is
      no-op. sailfish builds and boots.
      
      Change-Id: I67a2c8c2e4c3517aa30b4a97dc80dc2800e47b5a
      a4768fa8
    • 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
  6. Apr 06, 2017
    • Sandeep Patil's avatar
      sepolicy: restrict /vendor/overlay from most coredomains · 9075699a
      Sandeep Patil authored
      
      The change makes 'vendor_overlay_file' accessible only to few platform
      domains like idmap, system_server, zygote and appdomain.
      
      The overlay files contains RROs (runtime resource overlays)
      
      Bug: 36681210
      Test: Boot sailfish (treble device) from wiped flashall
      Test: Connect to wifi and launch chrome to load few websites.
      Test: Launch camera and record + playback video
      
      Change-Id: I3596ca89ad51d0e7d78c75121f22ea71209ee332
      Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
      9075699a
    • Sandeep Patil's avatar
      sepolicy: restrict /vendor/app from most coredomains · 1b5f81a2
      Sandeep Patil authored
      
      The change makes 'vendor_app_file' accessible only to few platform
      domains like dex2oat, idmap, installd, system_server and appdomain.
      
      Bug: 36681210
      Test: Boot sailfish (treble device) from wiped flashall
      Test: Connect to wifi and launch chrome to load few websites.
      Test: Launch camera and record + playback video
      
      Change-Id: Ib8757fedbf2e19c8381c8cd0f8f2693b2345534b
      Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
      1b5f81a2
    • Martijn Coenen's avatar
      Add new classes and types for (hw|vnd)servicemanager. · bc6d88d2
      Martijn Coenen authored
      Bug: 34454312
      Bug: 36052864
      Test: device boots, works
      Change-Id: If61d9b736a74c5944cef4449de4dfbaf78d9ccfa
      bc6d88d2
    • Dan Cashman's avatar
      Move mapping_sepolicy.cil to /system partition. · 0e9c47c0
      Dan Cashman authored
      This is a necessary first step to finalizing the SELinux policy build
      process.  The mapping_sepolicy.cil file is required to provide backward
      compatibility with the indicated vendor-targeted version.
      
      This still needs to be extended to provide N mapping files and corresponding
      SHA256 outputs, one for each of the N previous platform versions with which
      we're backward-compatible.
      
      Bug: 36783775
      Test: boot device with matching sha256 and non-matching and verify that
      device boots and uses either precompiled or compiled policy as needed. Also
      verify that mapping_sepolicy.cil has moved.
      
      Change-Id: I5692fb87c7ec0f3ae9ca611f76847ccff9182375
      0e9c47c0
    • Mark Salyzyn's avatar
      logcatd: introduce logcatd executable · 36f2eb20
      Mark Salyzyn authored
      logcatd is the same as logcat, except that the -L flag, if supplied,
      runs once, then the command re-runs itself without the -L flag with
      the same argument set.  By introducing a logcatd daemon executable
      we can solve the problem of the longish reads from pstore that
      sometimes occur when the system is excessively busy spinning in a
      foreground task starving this daemon as we absorb the delay in
      an init service, rather than in an init exec.  This would not have
      been efficiently possible without the introduction of liblogcat.
      
      Test: gTest logcat-unit-tests
      Test: Manual check logpersist operations
      Bug: 28788401
      Bug: 30041146
      Bug: 30612424
      Bug: 35326290
      Change-Id: I3454bad666c66663f59ae03bcd72e0fe8426bb0a
      36f2eb20
  7. 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
    • 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
    • Steven Moreland's avatar
      Remove unnecessary adbd permissions. · 97848f05
      Steven Moreland authored
      Test: adbd_test (with and without adb root)
        Note: one test fails without root with and without this change
              because of an unrelated shell selinux denial.
      Test: adb screencap, pull, and verify
      Test: Android Studio screenshot
      Bug: 36643190
      Change-Id: Ib534240bc9bb3a1f32b8865ca66db988902a0f4a
      97848f05
  8. Apr 04, 2017
  9. Apr 03, 2017
    • Jeff Vander Stoep's avatar
      adbd/shell: grant access to sepolicy for cts · 892d1e40
      Jeff Vander Stoep authored
      Test: Test: make cts && \
            cts-tradefed run singleCommand cts --skip-device-info \
            --skip-preconditions --skip-connectivity-check --abi arm64-v8a \
            --module CtsSecurityHostTestCases \
            -t android.security.cts.SELinuxHostTest#testNoExemptionsForBinderInVendorBan
            Fails as expected.
      Bug: 36002573
      
      Change-Id: I298c526789b25734d5f18666c64497e5d1e181d0
      892d1e40
    • 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
      No access to tee domain over Unix domain sockets · f86d54f0
      Alex Klyubin authored
      The tee domain is a vendor domain. Thus it cannot be accessed by
      non-vendor components over Unix domain sockets.
      
      It appears that the rules granting this access are not needed.
      
      Test: Flash a clean build with this change. Confirm that bullhead,
            angler, sailfish, ryu, boot without new denials.
            Confirm that YouTube, Netflix, Google Play Movies play back
            videos without new denials.
      Bug: 36714625
      Bug: 36715266
      
      Change-Id: I639cecd07c9a3cfb257e62622b51b7823613472a
      f86d54f0
    • 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
  10. Apr 01, 2017
  11. 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
    • Jin Qian's avatar
      storaged: allow shell to call dumpsys storaged · a239f30f
      Jin Qian authored
      Test: adb kill-server && adb shell dumpsys storaged
      Bug: 36492915
      Change-Id: I3a1a2ad2f016ddd5770d585cae82c8be69001df9
      a239f30f
    • 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
    • Daniel Nicoara's avatar
      VR: Add sepolicy for VR HWC service · 6907e39a
      Daniel Nicoara authored
      VR HWC is being split out of VR Window Manager. It creates a HW binder
      interface used by SurfaceFlinger which implements the HWComposer HAL and
      a regular binder interface which will be used by a system app to receive
      the SurfaceFlinger output.
      
      Bug: b/36051907
      Test: Ran in permissive mode and ensured no permission errors show in
      logcat.
      
      Change-Id: If1360bc8fa339a80100124c4e89e69c64b29d2ae
      6907e39a
  12. Mar 30, 2017
    • Mathias Agopian's avatar
      update sepolicy for gralloc HAL · 9901ff7c
      Mathias Agopian authored
      the list to update was determined by looking
      at who currently has access to surfaceflinger
      for ipc and FD use.
      
      Test: try some media stuff
      Bug: 36333314
      Change-Id: I474d0c44f8cb3868aad7a64e5a3640cf212d264d
      9901ff7c
    • Nathan Harold's avatar
      Add IpSecService SEPolicy · 00674160
      Nathan Harold authored
      Add a new type and context for IpSec to system SEPolicy
      
      Bug: 35923241
      Test: service starts + talks to NetD
      Change-Id: I69356c8525b426d344fcc4858fc499ab12405b20
      (cherry picked from commit 641b1a7a)
      00674160
  13. Mar 29, 2017
    • Chad Brubaker's avatar
      Add media services to ephemeral_app · b93f0494
      Chad Brubaker authored
      Test: denials go away
      Change-Id: I103cf3ad8d86b461bcba8edce02f6202fd2bcbe8
      b93f0494
    • 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
    • Sandeep Patil's avatar
      mac_permissions: explicitly label all mac_permissions files · bb24f3ab
      Sandeep Patil authored
      
      *mac_permissions.xml files need to be explicitly labeled as they are now split
      cross system and vendor and won't have the generic world readable
      'system_file' or 'rootfs' label.
      
      Bug: 36003167
      Test: no new 'mac_perms_file' denials at boot complete on sailfish
      Test: successfully booted into recovery without denials and sideloaded
            OTA update.
      Test: Launch 'chrome' and succesfully load a website.
      Test: Launch Camera and take a picture.
      Test: Launch Camera and record a video, succesfully playback recorded
            video
      
      Change-Id: I1c882872bb78d1242ba273756ef0dc27487f58fc
      Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
      bb24f3ab
    • Sandeep Patil's avatar
      sepolicy: explicitly label all sepolicy files · 136caa1b
      Sandeep Patil authored
      
      sepolicy files need to be explicitly labeled as they are now split
      cross system and vendor and won't have the generic world readable
      'system_file' or 'rootfs' label.
      
      Bug: 36527360
      Test: no new 'sepolicy_file' denials at boot complete on sailfish
      Test: successfully booted into recovery without denials and sideloaded
            OTA update.
      Test: Launch 'chrome' and succesfully load a website.
      Test: Launch Camera and take a picture.
      Test: Launch Camera and record a video, succesfully playback recorded
            video
      
      Change-Id: I6fe8ba31588c2d75521c6e2b0bf7e6d6eaf80a19
      Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
      136caa1b
    • Sandeep Patil's avatar
      seapp_context: explicitly label all seapp context files · 1e149967
      Sandeep Patil authored
      
      seapp_context files need to be explicitly labeled as they are now split
      cross system and vendor and won't have the generic world readable
      'system_file' label.
      
      Bug: 36002414
      Test: no new 'seapp_context' denials at boot complete on sailfish
      Test: successfully booted into recovery without denials and sideloaded
            OTA update.
      Test: ./cts-tradefed run singleCommand cts --skip-device-info \
            --skip-preconditions --skip-connectivity-check --abi \
            arm64-v8a --module CtsSecurityHostTestCases -t \
            android.security.cts.SELinuxHostTest#testAospSeappContexts
      Test: Launch 'chrome' and succesfully load a website.
      Test: Launch Camera and take a picture.
      Test: Launch Camera and record a video, succesfully playback recorded
            video
      
      Change-Id: I19b3e50c6a7c292713d3e56ef0448acf6e4270f7
      Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
      1e149967
    • Sandeep Patil's avatar
      file_context: explicitly label all file context files · c9cf7361
      Sandeep Patil authored
      
      file_context files need to be explicitly labeled as they are now split
      across system and vendor and won't have the generic world readable
      'system_file' label.
      
      Bug: 36002414
      Test: no new 'file_context' denials at boot complete on sailfish
      Test: successfully booted into recovery without denials and sideloaded
      OTA update.
      Test: ./cts-tradefed run singleCommand cts --skip-device-info \
             --skip-preconditions --skip-connectivity-check --abi \
             arm64-v8a --module CtsSecurityHostTestCases -t \
             android.security.cts.SELinuxHostTest#testAospFileContexts
      
      Change-Id: I603157e9fa7d1de3679d41e343de397631666273
      Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
      c9cf7361
    • Sandeep Patil's avatar
      service_contexts: label service_contexts explicitly · 939d16b5
      Sandeep Patil authored
      
      The label applies to all service_contexts regardless of their location.
      This also lets us track the service_contexts usage and limit access to
      the files for the corresponding object manager alone.
      
      Bug: 36002427
      Test: Boot sailfish and observe no denials for 'serice_contexts'
      Test: cts-tradefed run singleCommand cts --skip-device-info \
                --skip-preconditions --skip-connectivity-check \
                --abi arm64-v8a --module CtsSecurityHostTestCases \
                -t android.security.cts.SELinuxHostTest#testAospServiceContexts
      
      Change-Id: I97fc8b24bc99ca5c00d010fb522cd39a35572858
      Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
      939d16b5
    • Sandeep Patil's avatar
      prop_context: correctly label all property_context files · 54a42001
      Sandeep Patil authored
      
      split property context file in vendor and sytem were left untouched by
      the recent changes. This was working accidentally because they were
      still accessible to all domains as 'system_file'.
      
      Bug: 36002573
      Test: Boot sailfish to observe no new denials.
      Test: 'adb sideload' OTA on sailfish successfully
      
      Change-Id: I5bec058b59db83d2a431e9f7e91c5a09af7d2942
      Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
      54a42001
Loading