Skip to content
Snippets Groups Projects
  1. 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
    • Jeff Vander Stoep's avatar
      Verify correct application of labels and attributes · bdfc0301
      Jeff Vander Stoep authored
      With project Treble, we're relying heavily on attributes for
      permission inheritance and enforcement of separation between
      platform and vendor components.
      
      We neead tests that verify those attributes are correctly applied.
      This change adds the framework for those tests including a wrapper
      around libsepol for loading and querying policy, and a python module
      for running tests on policy and file_contexts.
      
      Included with the testing framework is a test asserting that the
      coredomain attribute is only applied to core processes. This
      verification is done using the following rules:
      1. Domain's entrypoint is on /system - coredomain
      2. Domain's entrypoint is on /vendor - not coredomain
      3. Domain belongs to a whitelist of known coredomains - coredomain
      
      In a subsequent commit these tests will be applied at build time.
      However, I first need to fix existing Treble violations exposed by
      this test. These tests will also be applied during CTS.
      
      Test: LD_PRELOAD=$ANDROID_HOST_OUT/lib64/libsepolwrap.so python \
          treble.py -p $OUT/vendor/etc/selinux/precompiled_sepolicy \
          -f $OUT/vendor/etc/selinux/nonplat_file_contexts \
          -f $OUT/system/etc/selinux/plat_file_contexts
      Bug: 37008075
      Change-Id: I7825f5c2909a5801deaccf2bef2bfd227adb0ae9
      (cherry picked from commit 0366afdf)
      bdfc0301
  2. Jun 03, 2017
  3. Jun 02, 2017
  4. Jun 01, 2017
  5. May 31, 2017
  6. May 30, 2017
  7. May 26, 2017
  8. May 25, 2017
    • Andy Hung's avatar
    • TreeHugger Robot's avatar
    • Dan Cashman's avatar
      Restrict BOARD_PLAT_[PUBLIC|PRIVATE]_SEPOLICY_DIRS to one dir. · 51455fe9
      Dan Cashman authored
      These directories were added to allow for partner extensions to the
      android framework without needing to add changes to the AOSP global
      sepolicy.  There should only ever be one owner of the framework and
      corresponding updates, so enforce this restriction to prevent
      accidental accrual of policy in the system image.
      
      Bug: 36467375
      Test: Add public and private files to policy and verify that they are
      added to the appropriate policy files.  Also test that specifying
      multiple directories for public or private results in an error.
      
      Change-Id: I397ca4e7d6c8233d1aefb2a23e7b44315052678f
      Merged-In: I397ca4e7d6c8233d1aefb2a23e7b44315052678f
      (cherry picked from commit 1633da06)
      51455fe9
    • Dan Cashman's avatar
      Add BOARD_PLAT_[PUBLIC|PRIVATE]_SEPOLICY_DIRS · 1b0a71f3
      Dan Cashman authored
      Add new build variables for partner customization (additions) to platform sepolicy.
      This allows partners to add their own policy without having to touch the AOSP sepolicy
      directories and potentially disrupting compatibility with an AOSP system image.
      
      Bug: 36467375
      Test: Add public and private files to sailfish policy and verify that they are
      added to the appropriate policy files, but that the policy is otherwise identical.
      Also add private/mapping/*.cil files in both locations and change the BOARD_SEPOLICY_VERS
      to trigger use of prebuilt mapping files and verify that they are appropriately
      combined and built in policy.
      
      Change-Id: I38efe2248520804a123603bb050bba75563fe45c
      Merged-In: I38efe2248520804a123603bb050bba75563fe45c
      (cherry picked from commit f893700c)
      1b0a71f3
    • Josh Gao's avatar
  9. May 24, 2017
    • Sandeep Patil's avatar
      Allow init to run vendor toybox for modprobe · d46b5d35
      Sandeep Patil authored
      
      vendor implementations need to be able to run modprobe as part of
      init.rc scripts.  They cannot do so because of the strict neverallow
      currently in place that disallows all coredomains (including init)
      to execute vendor toybox.
      
      Fix this by adding init to the exception list for the neverallow so
      vendors can then run modprobe from .rc scripts and also add the rule to
      allow init to transition to modprobe domain using vendor_toolbox.
      
      Bug: b/38212864
      Test: Boot sailfish
      
      Change-Id: Ib839246954e9002859f3ba986094f206bfead137
      Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
      d46b5d35
    • Michael Schwartz's avatar
    • Josh Gao's avatar
      Let fallback crash dumping write to dumpstate pipes. · 8ba3138a
      Josh Gao authored
      Fix the following denial:
          avc: denied { append } for pid=1093 comm="mediaextractor" path="pipe:[68438]" dev="pipefs" ino=68438 scontext=u:r:mediaextractor:s0 tcontext=u:r:dumpstate:s0 tclass=fifo_file permissive=1 ppid=1 pcomm="init" pgid=1 pgcomm="init"
      
      Bug: http://b/38444258
      Test: none
      Change-Id: I58162e3a28b744a58396e77d6b0e2becb5633d6a
      (cherry picked from commit 5efadd91)
      8ba3138a
    • Andy Hung's avatar
      MediaExtractor: Allow reading of app data files. · ec5f80cb
      Andy Hung authored
      Needed to allow lower power Play Music of downloaded files.
      
          05-24 10:12:49.331 24025 24025 W generic : type=1400
                audit(0.0:1259): avc: denied { read } for
                path="/data/data/com.google.android.music/files/music/925.mp3"
                dev="sda35" ino=2179256 scontext=u:r:mediaextractor:s0
                tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file
                permissive=0
      
      Test: Play Music
      Bug: 62059834
      
      Change-Id: I97bdb1d175dba8f7a8ec6cd9084323cfcd3660bd
      ec5f80cb
  10. May 23, 2017
    • pkanwar's avatar
      SE Policy for Tether Offload HAL · c67fa9bf
      pkanwar authored
      Update SE Policy to allow calls to and callbacks for the Tether Offload HAL
      HIDL binderized service.
      
      Bug: 38417260
      Test: New functionality. So we don't have any tests.
      Change-Id: I2c95b290523c55c081afa1bca091f368559c9125
      (cherry picked from commit 722249b3)
      c67fa9bf
  11. May 22, 2017
  12. May 19, 2017
    • Steven Moreland's avatar
      Fix graphics composer denial. · f30a82ef
      Steven Moreland authored
      Right now, the hwcomposer hidl hal is unable to figure out where
      to get the hidl mapper implementation.
      
      It is expected that all graphics composer objects will need this
      permission. The interfaces are written to work together with the
      "IMapper" being the same-process ("sphal") component and the
      "IComposer" interface being the binderized compoenent.
      
      10-09 00:24:38.900   457   457 E SELinux : avc:  denied  { find } for
      interface=android.hardware.graphics.mapper::IMapper pid=495
      scontext=u:r:hal_graphics_composer_default:s0
      tcontext=u:object_r:hal_graphics_mapper_hwservice:s0 tclass=hwservice_manager
      
      Test: boot marlin, denial no longer present.
      Bug: 38415912
      Change-Id: I1b274be10e115fa7b53fb81e85be8827da05997e
      f30a82ef
    • TreeHugger Robot's avatar
  13. May 18, 2017
    • Wyatt Riley's avatar
      Removing UDP access for hal_gnss · 799c2349
      Wyatt Riley authored
      Underlying data services setup no longer needs this
      
      Bug: 35757613
      Bug: 36085168
      Test: GPS, XTRA & avc denial checks
      Change-Id: I679ee70f65f34d5a7d1fc1f1fe92af6a92ec92c5
      799c2349
    • 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
  14. May 17, 2017
    • TreeHugger Robot's avatar
      ffb8fb1b
    • Steven Moreland's avatar
      Add fwk_display_hwservice. · e8ab0020
      Steven Moreland authored
      This hidl service provides information about vsync and hotplug
      to vendor services which is required by at least some camera
      hal implementations.
      
      Test: VtsFwkDisplayServiceV1_0TargetTest
      Test: no denials
      Bug: 38311538
      Change-Id: I64f0321e2832facf987057f0d48940e269d8e2d9
      e8ab0020
    • TreeHugger Robot's avatar
    • Jiyong Park's avatar
      sepolicy: allow apps to execute libs embedded inside vendor apk · 86539031
      Jiyong Park authored
      Currently, some jni libs in /vendor/lib are allowed to be executed
      in java process by labelling them as same_process_hal_file. This is
      wrong because those jni libs are not in fact same process HALs.
      
      After b/37481404, those jni libs for vendor apks are embedded inside the
      apk just like downloaded apks.
      
      In order to make this possible, appdomain is allowed to execute
      vendor_app_file. Note that allowing this is not a Treble violation because
      vendor_app_file is Java and JNI code only. Native libraries in
      /vendor/lib are still prevented from being loaded in apps except for
      those are labeled as same_process_hal_file AND are loaded via the
      'sphal' namespace.
      
      Bug: 37481404
      Test: Phone application does not crash.
      Change-Id: Ifaece2f05d0b20e28c4b1c0847f5ea0bb28ade02
      86539031
  15. May 16, 2017
Loading