Skip to content
Snippets Groups Projects
  1. Jan 13, 2017
    • Hridya Valsaraju's avatar
      add selinux policy for GNSS hal · 953c4396
      Hridya Valsaraju authored
      The following are the avc denials that are addressed:
      
      avc: denied { call } for pid=889 comm="system_server"
      scontext=u:r:system_server:s0 tcontext=u:r:hal_gnss_default:s0
      tclass=binder permissive=0
      
      avc: denied { call } for scontext=u:r:hal_gnss_default:s0
      tcontext=u:r:system_server:s0 tclass=binder permissive=0
      
      avc: denied { read } for name="hw" dev="mmcblk0p43" ino=1837
      scontext=u:r:hal_gnss_default:s0 tcontext=u:object_r:system_file:s0
      tclass=dir permissive=0
      
      avc: denied { open } for path="/system/lib64/hw" dev="mmcblk0p43"
      ino=1837 scontext=u:r:hal_gnss_default:s0
      tcontext=u:object_r:system_file:s0 tclass=dir permissive=0
      
      Bug:31974439
      
      Test: Checked that there no more related avc denial messages related to
      the GNSS HAL in dmesg.
      
      Change-Id: I5b43dc088017a5568dd8e442726d2bf52e95b1d5
      953c4396
    • Max Bires's avatar
      Auditing init and ueventd access to chr device files. · 9e7a5b0a
      Max Bires authored
      It seems likely that there is no reason to keep around a number of
      devices that are configured to be included into the pixel kernels. Init
      and ueventd should be the only processes with r/w access to these
      devices, so auditallow rules have been added to ensure that they aren't
      actually used.
      
      /dev/keychord was given its own type since it's one of the few character
      devices that's actually legitimately used and would cause log spam in
      the auditallow otherwise.
      
      Bug: 33347297
      Test: The phone boots without any apparent log spam.
      
      Change-Id: I3dd9557df8a9218b8c802e33ff549d15849216fb
      9e7a5b0a
  2. Jan 12, 2017
  3. Jan 11, 2017
  4. Jan 10, 2017
  5. Jan 09, 2017
  6. Jan 07, 2017
    • ynwang's avatar
      Storaged permission setting · 9fa8823c
      ynwang authored
      Allowing storaged for reading from pseudo filesystems and debugfs.
      
      Bug: 32221677
      
      Change-Id: I837cead9a68f0b399703b64d724cb9c4b205c335
      9fa8823c
  7. Jan 05, 2017
    • dcashman's avatar
      Split file_contexts for on-device compilation. · d225b697
      dcashman authored
      
      Simulate platform and non-platform split by compiling two different
      file_contexts files and loading them together on-device.  Leave the existing
      file_contexts.bin in place until we're ready to build images based on the new
      files.
      
      Bug: 31363362
      Test: Builds and boots without additional denials.
      Change-Id: I7248f876e2230cee3b3cbf386422063da1e3dde0
      
      Bring back file_contexts.bin.
      
      Change-Id: Ifec2c363579151080fdec48e8bc46bbbc8c97674
      Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
      d225b697
  8. Jan 03, 2017
  9. Dec 29, 2016
  10. Dec 28, 2016
  11. Dec 22, 2016
  12. Dec 17, 2016
  13. Dec 16, 2016
    • Steven Moreland's avatar
      Add hal_dumpstate attribute. · d86a30a2
      Steven Moreland authored
      - Also allow dumpstate to talk to hal_dumpstate.
      
      Bug: 31982882
      Test: compiles
      Change-Id: Ib9cf0027ee7e71fa40b9ccc29fc8dccea6977e5c
      d86a30a2
    • Sandeep Patil's avatar
      health: add sepolicy for health hal service · 60e8886c
      Sandeep Patil authored
      
      Test: tested with default health HAL on angler running as service.
      Bug: b/32754732
      
      Change-Id: Ie0b70d43cb23cd0878e1b7b99b9bebdbd70d17c7
      Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
      (cherry picked from commit ef62fd91)
      60e8886c
    • Sandeep Patil's avatar
      healthd: create SEPolicy for 'charger' and reduce healthd's scope · dc08245c
      Sandeep Patil authored
      
      healthd is being split into 'charger' and 'healthd' processes, that
      will never run together. 'charger' is to be run only in charge-only
      and recovery, while healthd runs with Android.
      
      While they both share much of battery monitoring code, they both now
      have reduced scope. E.g. 'charger', doesn't need to use binder anymore
      and healthd doesn't need to do charging ui animation. So, amend the
      SEPolicy for healthd to reduce it's scope and add a new one for charger.
      
      Test: Tested all modes {recovery, charger-only, android} with new policy
      
      Change-Id: If7f81875c605f7f07da4d23a313f308b9dde9ce8
      Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
      (cherry picked from commit c73d0022)
      dc08245c
  14. Dec 14, 2016
  15. Dec 13, 2016
  16. Dec 09, 2016
    • Jeff Sharkey's avatar
      installd has moved on to Binder; goodbye socket! · 8b1d4520
      Jeff Sharkey authored
      After a series of recent commits, installd has fully migrated over
      to Binder, and all socket-based communication has been removed.
      
      Test: builds, boots, apps install fine, pre-OTA dexopt works
      Bug: 13758960, 30944031
      Change-Id: Ia67b6260de58240d057c99b1bbd782b44376dfb5
      8b1d4520
  17. Dec 05, 2016
    • Max's avatar
      /dev/port does not seem to be used, adding in rules to confirm. · c27c23fb
      Max authored
      Only init and ueventd have any access to /dev/port, and neither should
      have any use for it. As it stands, leaving port in just represents
      additional attack surface with no useful functionality, so it should be
      removed if possible, not only from Pixel devices, but from all Android
      devices.
      
      Test: The phone boots successfully
      
      Bug:33301618
      Change-Id: Iedc51590f1ffda02444587d647889ead9bdece3f
      c27c23fb
  18. Dec 03, 2016
    • Ray Essick's avatar
      Allow access to mediaanalytics service · 090f4a4d
      Ray Essick authored
      media framework analytics are gathered in a separate service.
      define a context for this new service, allow various
      media-related services and libraries to access this new service.
      
      Bug: 30267133
      Test: ran media CTS, watched for selinux denials.
      Change-Id: I5aa5aaa5aa9e82465b8024f87ed32d6ba4db35ca
      090f4a4d
  19. Nov 22, 2016
    • Nick Kralevich's avatar
      label /bugreports · d314376d
      Nick Kralevich authored
      /data/bugreports is moving to /bugreports
      
      Bug: 27262109
      Bug: 27204904
      Bug: 32799236
      Test: new symlink is in /bugreports and is labeled correctly
      Change-Id: Ib6a492fba8388bf43debad28cfc851679f8c6151
      d314376d
  20. Nov 21, 2016
    • Nick Kralevich's avatar
      Collapse urandom_device into random_device · 5eadcb8c
      Nick Kralevich authored
      urandom_device and random_device have the exact same security
      properties. Collapse them into one type.
      
      Test: device boots and /dev/urandom is labeled correctly.
      Change-Id: I12da30749291bc5e37d99bc9422bb86cb58cec41
      5eadcb8c
  21. Nov 18, 2016
    • dcashman's avatar
      Move hal_light to attribute. · 3319d5ee
      dcashman authored
      HAL policy defines how the platform and a given HAL interact, but not how the
      HAL is implemented.  This policy should be represented as an attribute that all
      processes implementing the HAL can include.
      
      Bug: 32123421
      Test: Builds.
      Change-Id: I17e5612c0835773c28e14f09e2ce7bdc3f210c15
      3319d5ee
  22. Nov 14, 2016
    • Chia-I Wu's avatar
      Add sepolicy for hwcomposer HAL · fb08872a
      Chia-I Wu authored
      Allow SurfaceFlinger to call into IComposer, and vice versa for
      IComposerCallback.
      
      Specifically,
      
      hwbinder_use(...) for
      avc: denied { call } for scontext=u:r:hal_graphics_composer:s0 tcontext=u:r:hwservicemanager:s0 tclass=binder permissive=1
      avc: denied { transfer } for scontext=u:r:hal_graphics_composer:s0 tcontext=u:r:hwservicemanager:s0 tclass=binder permissive=1
      
      binder_call(..., surfaceflinger) for
      avc: denied { call } for scontext=u:r:hal_graphics_composer:s0 tcontext=u:r:surfaceflinger:s0 tclass=binder permissive=1
      
      allow ... gpu_device:chr_file rw_file_perms for
      avc: denied { read write } for name="kgsl-3d0" dev="tmpfs" ino=14956 scontext=u:r:hal_graphics_composer:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file permissive=1
      avc: denied { open } for path="/dev/kgsl-3d0" dev="tmpfs" ino=14956 scontext=u:r:hal_graphics_composer:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file permissive=1
      avc: denied { ioctl } for path="/dev/kgsl-3d0" dev="tmpfs" ino=14956 ioctlcmd=940 scontext=u:r:hal_graphics_composer:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file permissive=1
      
      allow ... ion_device:chr_file r_file_perms for
      avc: denied { ioctl } for path="/dev/ion" dev="tmpfs" ino=15014 ioctlcmd=4900 scontext=u:r:hal_graphics_composer:s0 tcontext=u:object_r:ion_device:s0 tclass=chr_file permissive=1
      
      allow ... graphics_device ... for
      avc: denied { ioctl } for path="/dev/graphics/fb0" dev="tmpfs" ino=15121 ioctlcmd=5380 scontext=u:r:hal_graphics_composer:s0 tcontext=u:object_r:graphics_device:s0 tclass=chr_file permissive=1
      
      allow ... ...:fd use for
      avc: denied { use } for path="anon_inode:dmabuf" dev="anon_inodefs" ino=12794 scontext=u:r:hal_graphics_composer:s0 tcontext=u:r:hal_graphics_allocator_service:s0 tclass=fd permissive=1
      avc: denied { use } for path="anon_inode:sync_fence" dev="anon_inodefs" ino=12794 scontext=u:r:hal_graphics_composer:s0 tcontext=u:r:bootanim:s0 tclass=fd permissive=1
      avc: denied { use } for path="anon_inode:sync_fence" dev="anon_inodefs" ino=12794 scontext=u:r:hal_graphics_composer:s0 tcontext=u:r:surfaceflinger:s0 tclass=fd permissive=1
      avc: denied { use } for path="anon_inode:sync_fence" dev="anon_inodefs" ino=12794 scontext=u:r:hal_graphics_composer:s0 tcontext=u:r:platform_app:s0:c512,c768 tclass=fd permissive=1
      
      binder_call(surfaceflinger, ...) for
      avc: denied { call } for scontext=u:r:surfaceflinger:s0 tcontext=u:r:hal_graphics_composer:s0 tclass=binder permissive=1
      avc: denied { transfer } for scontext=u:r:surfaceflinger:s0 tcontext=u:r:hal_graphics_composer:s0 tclass=binder permissive=1
      avc: denied { use } for path="anon_inode:sync_fence" dev="anon_inodefs" ino=12794 ioctlcmd=3e02 scontext=u:r:surfaceflinger:s0 tcontext=u:r:hal_graphics_composer:s0 tclass=fd permissive=1
      avc: denied { use } for path="anon_inode:sync_fence" dev="anon_inodefs" ino=12794 scontext=u:r:surfaceflinger:s0 tcontext=u:r:hal_graphics_composer:s0 tclass=fd permissive=1
      
      allow bootanim ...:fd use for
      avc: denied { use } for path="anon_inode:sync_fence" dev="anon_inodefs" ino=11947 scontext=u:r:bootanim:s0 tcontext=u:r:hal_graphics_composer:s0 tclass=fd permissive=1
      
      Bug: 32021609
      Test: make bootimage
      Change-Id: I036cdbebf0c619fef7559f294f1865f381b17588
      fb08872a
    • Chia-I Wu's avatar
      Add sepolicy for gralloc-alloc HAL · dd958e5a
      Chia-I Wu authored
      Allow SurfaceFlinger to call into IAllocator, and allow everyone to access
      IAllocator's fd.
      
      Specifically,
      
      hwbinder_use(...) for
      avc: denied { call } for scontext=u:r:hal_graphics_allocator:s0 tcontext=u:r:hwservicemanager:s0 tclass=binder permissive=1
      avc: denied { transfer } for scontext=u:r:hal_graphics_allocator:s0 tcontext=u:r:hwservicemanager:s0 tclass=binder permissive=1
      
      allow ... ion_device:chr_file r_file_perms for
      avc: denied { read } for name="ion" dev="tmpfs" ino=15014 scontext=u:r:hal_graphics_allocator:s0 tcontext=u:object_r:ion_device:s0 tclass=chr_file permissive=1
      avc: denied { open } for path="/dev/ion" dev="tmpfs" ino=15014 scontext=u:r:hal_graphics_allocator:s0 tcontext=u:object_r:ion_device:s0 tclass=chr_file permissive=1
      avc: denied { ioctl } for path="/dev/ion" dev="tmpfs" ino=15014 ioctlcmd=4900 scontext=u:r:hal_graphics_allocator:s0 tcontext=u:object_r:ion_device:s0 tclass=chr_file permissive=1
      
      allow ... gpu_device:chr_file rw_file_perms; for
      avc: denied { read write } for name="kgsl-3d0" dev="tmpfs" ino=14956 scontext=u:r:hal_graphics_allocator:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file permissive=1
      avc: denied { open } for path="/dev/kgsl-3d0" dev="tmpfs" ino=14956 scontext=u:r:hal_graphics_allocator:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file permissive=1
      avc: denied { ioctl } for path="/dev/kgsl-3d0" dev="tmpfs" ino=14956 ioctlcmd=940 scontext=u:r:hal_graphics_allocator:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file permissive=1
      
      binder_call(surfaceflinger, ...) for
      avc: denied { call } for scontext=u:r:surfaceflinger:s0 tcontext=u:r:hal_graphics_allocator:s0 tclass=binder permissive=1
      
      allow ... ...:fd use for
      avc: denied { use } for path="anon_inode:dmabuf" dev="anon_inodefs" ino=12794 scontext=u:r:surfaceflinger:s0 tcontext=u:r:hal_graphics_allocator:s0 tclass=fd permissive=1
      
      Bug: 32021161
      Test: make bootimage
      Change-Id: Ie7700142313407ac438c43dd1a85544dc4c67f13
      dd958e5a
  23. Nov 12, 2016
  24. Nov 11, 2016
    • Robert Sesek's avatar
      Add the "webview_zygote" domain. · dc43f7cd
      Robert Sesek authored
      The webview_zygote is a new unprivileged zygote and has its own sockets for
      listening to fork requests. However the webview_zygote does not run as root
      (though it does require certain capabilities) and only allows dyntransition to
      the isolated_app domain.
      
      Test: m
      Test: angler boots
      
      Bug: 21643067
      Change-Id: I89a72ffe6dcb983c4a44048518efd7efb7ed8e83
      dc43f7cd
  25. Nov 08, 2016
  26. Nov 03, 2016
  27. Nov 01, 2016
  28. Oct 28, 2016
    • Roshan Pius's avatar
      wifi_hal: Rename to 'hal_wifi' · 8224596a
      Roshan Pius authored
      Renaming the wifi HIDL implementation to 'hal_wifi' from 'wifi_hal_legacy'
      to conform with HIDL style guide.
      
      Denials:
      01-01 21:55:23.896  2865  2865 I android.hardware.wifi@1.0-service:
      wifi_hal_legacy is starting up...
      01-01 21:55:23.898  2865  2865 W android.hardware.wifi@1.0-service:
      /odm/lib64/hw/ does not exit.
      01-01 21:55:23.899  2865  2865 F android.hardware.wifi@1.0-service:
      service.cpp:59] Check failed: service->registerAsService("wifi") ==
      android::NO_ERROR (service->registerAsService("wifi")=-2147483646,
      android::NO_ERROR=0) Failed to register wifi HAL
      01-01 21:55:23.899  2865  2865 F libc    : Fatal signal 6 (SIGABRT),
      code -6 in tid 2865 (android.hardwar)
      01-01 21:55:23.901   377   377 W         : debuggerd: handling request:
      pid=2865 uid=2000 gid=2000 tid=2865
      01-01 21:55:23.907  2867  2867 E         : debuggerd: Unable to connect
      to activity manager (connect failed: Connection refused)
      01-01 21:55:23.908  2867  2867 F DEBUG   : *** *** *** *** *** *** ***
      *** *** *** *** *** *** *** *** ***
      01-01 21:55:23.908  2867  2867 F DEBUG   : Build fingerprint:
      'Android/aosp_angler/angler:7.0/NYC/rpius10031052:userdebug/test-keys'
      01-01 21:55:23.908  2867  2867 F DEBUG   : Revision: '0'
      01-01 21:55:23.908  2867  2867 F DEBUG   : ABI: 'arm64'
      01-01 21:55:23.908  2867  2867 F DEBUG   : pid: 2865, tid: 2865, name:
      android.hardwar  >>> /system/bin/hw/android.hardware.wifi@1.0-service
      <<<
      01-01 21:55:23.909  2867  2867 F DEBUG   : signal 6 (SIGABRT), code -6
      (SI_TKILL), fault addr --------
      01-01 21:55:23.910  2867  2867 F DEBUG   : Abort message:
      'service.cpp:59] Check failed: service->registerAsService("wifi") ==
      android::NO_ERROR (service->registerAsService("wifi")=-2147483646,
      android::NO_ERROR=0) Failed to register wifi HAL'
      
      Bug: 31821133
      Test: Compiled and ensured that the selinux denials are no longer
      present in logs.
      Change-Id: I5bbbcad307e9bb9e59fff87e2926751b3aecc813
      8224596a
  29. Oct 26, 2016
  30. Oct 25, 2016
  31. Oct 21, 2016
  32. Oct 19, 2016
    • Prashant Malani's avatar
      Cleanup and renaming of vibrator HAL sepolicy · 2d9d3e6d
      Prashant Malani authored
      Renaming vibrator sepolicy to remove the version number.
      Also moving the related binder_call() to maintain alphabetical order.
      
      Bug: 32123421
      Change-Id: I2bfa835085519ed10f61ddf74e7e668dd12bda04
      Test: booted, and checked vibrate on keypress on bullhead
      2d9d3e6d
  33. Oct 13, 2016
    • Prashant Malani's avatar
      sepolicy: Add policy for vibrator HIDL service · b32b4a11
      Prashant Malani authored
      Fixes the following denials:
      avc: denied { open } for pid=7530 comm="android.hardwar" path="/sys/devices/virtual/timed_output/vibrator/enable" dev="sysfs" ino=20519 scontext=u:r:android_hardware_vibrator_1_0_service:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
      avc: denied { call } for pid=9173 comm="Binder:7735_C" scontext=u:r:system_server:s0 tcontext=u:r:android_hardware_vibrator_1_0_service:s0 tclass=binder permissive=1
      
      Test: m
      Bug: 32021191
      Change-Id: I243a86b449794e3c2f0abf91ddcf405eff548d0c
      b32b4a11
Loading