Skip to content
Snippets Groups Projects
  1. 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
  2. Apr 18, 2017
    • Alex Klyubin's avatar
      surfaceflinger and apps are clients of Configstore HAL · 75ca4832
      Alex Klyubin authored
      This commit marks surfaceflinger and app domain (except isolated_app)
      as clients of Configstore HAL. This cleans up the policy and will make
      it easier to restrict access to HwBinder services later.
      
      Test: Play YouTube clip in YouTube app and YouTube web page in Chrome
      Test: Take an HDR+ photo, a normal photo, a video, and slow motion
            video in Google Camera app. Check that photos show up fine and
            that videos play back with sound.
      Test: Play movie using Google Play Movies
      Test: Google Maps app displays the Android's correct location
      Bug: 34454312
      Change-Id: I0f468a4289132f4eaacfb1d13ce4e61604c2a371
      75ca4832
  3. Apr 17, 2017
    • Alex Klyubin's avatar
      Apps and system_server are gralloc HAL clients · 5007c10a
      Alex Klyubin authored
      This commit marks system_server and app domains (except isolated_app)
      as clients of Graphics Allocator HAL. This makes the policy cleaner
      and prepares ground for restricting access to HwBinder services.
      
      Test: Play video in YouTube app and in Google Chrome YouTube web page
      Test: Using Google Camera app, take an HDR+ photo, a conventional
            photo, record a video with sound and a slow motion video with
            sound, then check that photos look good and videos play back
            fine, including sound.
      Bug: 34454312
      Change-Id: Iea04d38fa5520432f06af94570fa6ce16ed7979a
      5007c10a
  4. Apr 16, 2017
    • Martijn Coenen's avatar
      Remove mediacodec from binder violators. · fc80f480
      Martijn Coenen authored
      The new binder_call() lines had to be added
      because this change removes mediacodec from
      binderservicedomain (on full-treble), hence
      domains that could previously reach mediacodec
      with binder_call(domain, binderservicedomain)
      now need explicit calls instead.
      
      Test: Youtube, Netflix, Maps, Chrome, Music
      Change-Id: I3325ce20d9304bc07659fd435554cbcbacbc9829
      fc80f480
  5. Apr 14, 2017
    • Martijn Coenen's avatar
      Give apps, cameraserver, and system_server access to sync fences. · de2e79c5
      Martijn Coenen authored
      Since hal_graphics_composer_default is now no longer
      a member of binderservicedomain, these domains would
      no longer be able to use filedescriptors from it.
      
      Bug: 36569525
      Bug: 35706331
      Test: marlin boots, YouTube, Maps, Camera, video
      Change-Id: I4c110cf7530983470ae079e4fbc8cf11aa0fab7f
      de2e79c5
    • Jeff Vander Stoep's avatar
      restore permissions to /vendor for non-treble devices · f627e558
      Jeff Vander Stoep authored
      Relabeling /vendor and /system/vendor to vendor_file removed
      previously granted permissions. Restore these for non-treble devices.
      
      Addresses:
      avc: denied { execute_no_trans } for pid=2944 comm="dumpstate"
      path="/system/vendor/bin/wpa_cli" dev="mmcblk0p10" ino=1929
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:vendor_file:s0
      tclass=file
      
      And potentially some other bugs that have yet to surface.
      
      Bug: 37105075
      Test: build Fugu
      Change-Id: I8e7bd9c33819bf8206f7c110cbce72366afbcef8
      f627e558
  6. Apr 10, 2017
    • 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
  7. 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
  8. 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
  9. 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
  10. Mar 23, 2017
  11. Mar 22, 2017
    • Nick Kralevich's avatar
      app.te: prevent locks of files on /system · 92c44a57
      Nick Kralevich authored
      Prevent app domains (processes spawned by zygote) from acquiring
      locks on files in /system. In particular, /system/etc/xtables.lock
      must never be lockable by applications, as it will block future
      iptables commands from running.
      
      Test: device boots and no obvious problems.
      Change-Id: Ifd8dc7b117cf4a622b30fd4fffbcab1b76c4421b
      92c44a57
  12. Mar 21, 2017
    • Chad Brubaker's avatar
      Disallow access to proc_net for ephemeral_app · c4a938e7
      Chad Brubaker authored
      Test: Boots, runs
      Bug: 32713782
      Change-Id: Ia58db3c4c0159482f08e72ef638f3e1736095918
      c4a938e7
    • Jiyong Park's avatar
      Allow app to access configstore HAL · ed4625f3
      Jiyong Park authored
      Apps should be able to access the configstore HAL since framework
      libraries which are loaded into app process can call configstore.
      
      Letting apps have direct access to this HAL is OK because: 
      
      (1) the API of this HAL does not make clients provide any sensitive 
      information to the HAL, which makes it impossible for the HAL to 
      disclose sensitive information of its clients when the HAL is 
      compromised, 
      
      (2) we will require that this HAL is binderized (i.e., does not run 
      inside the process of its clients), 
      
      (3) we will require that this HAL runs in a tight seccomp sandbox 
      (this HAL doesn't need much access, if at all) and,
      
      (4) we'll restrict the HALs powers via neverallows.
      
      Test: apps can use configstore hal.
      
      Change-Id: I04836b7318fbc6ef78deff770a22c68ce7745fa9
      ed4625f3
  13. Mar 16, 2017
  14. Mar 07, 2017
    • Calin Juravle's avatar
      SElinux: Clean up code related to foreign dex use · 2b291121
      Calin Juravle authored
      We simplified the way we track whether or not a dex file is used by
      other apps. DexManager in the framework keeps track of the data and we
      no longer need file markers on disk.
      
      Test: device boots, foreign dex markers are not created anymore
      
      Bug: 32871170
      Change-Id: I464ed6b09439cf0342020ee07596f9aa8ae53b62
      2b291121
  15. Mar 05, 2017
    • Yin-Chia Yeh's avatar
      Camera: hal_camera FD access update · 6824dfd7
      Yin-Chia Yeh authored
      Add FD accessing rules related to media,gralloc and ashmem.
      Also move a few rules to where they belong.
      
      Change-Id: I0bff6f86665a8a049bd767486275740fa369da3d
      6824dfd7
  16. Feb 23, 2017
  17. Feb 21, 2017
    • Chad Brubaker's avatar
      Add new untrusted_v2_app domain · a782a816
      Chad Brubaker authored
      untrusted_v2_app is basically a refinement of untrusted_app with legacy
      capabilities removed and potentially backwards incompatible changes.
      
      This is not currently hooked up to anything.
      
      Bug: 33350220
      Test: builds
      Change-Id: Ic9fad57476bc2b6022b1eaca8667bf6d844753c2
      a782a816
  18. Feb 11, 2017
  19. Feb 09, 2017
  20. Feb 06, 2017
    • Stephen Smalley's avatar
      Remove obsolete netlink_firewall_socket and netlink_ip6fw_socket classes. · 4921085d
      Stephen Smalley authored
      
      The implementation for NETLINK_FIREWALL and NETLINK_IP6_FW protocols
      was removed from the kernel in commit
      d16cf20e2f2f13411eece7f7fb72c17d141c4a84 ("netfilter: remove ip_queue
      support") circa Linux 3.5.  Unless we need to retain compatibility
      for kernels < 3.5, we can drop these classes from the policy altogether.
      
      Possibly the neverallow rule in app.te should be augmented to include
      the newer netlink security classes, similar to webview_zygote, but
      that can be a separate change.
      
      Test: policy builds
      
      Change-Id: Iab9389eb59c96772e5fa87c71d0afc86fe99bb6b
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      4921085d
  21. Jan 31, 2017
    • Calin Juravle's avatar
      Remove SElinux audit to libart_file · 01ee59a7
      Calin Juravle authored
      Since it was introduced it caused quite a few issues and it spams the
      SElinux logs unnecessary.
      
      The end goal of the audit was to whitelist the access to the
      interpreter. However that's unfeasible for now given the complexity.
      
      Test: devices boots and everything works as expected
            no more auditallow logs
      
      Bug: 29795519
      Bug: 32871170
      Change-Id: I9a7a65835e1e1d3f81be635bed2a3acf75a264f6
      01ee59a7
  22. Jan 26, 2017
    • Alex Klyubin's avatar
      Move appdomain policy to private · 8429a331
      Alex Klyubin authored
      This leaves only the existence of appdomain attribute as public API.
      All other rules are implementation details of this attribute's policy
      and are thus now private.
      
      Test: Device boot, apps (untrusted_app, system_app, platform_app,
            priv_app) work fine. No new denials.
      Bug: 31364497
      
      Change-Id: Ie22e35bad3307bb9918318c3d034f1433d51677f
      8429a331
  23. 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
Loading