Skip to content
Snippets Groups Projects
  1. Dec 08, 2016
    • dcashman's avatar
      Restore app_domain macro and move to private use. · 3e8dbf01
      dcashman authored
      app_domain was split up in commit: 2e00e637 to
      enable compilation by hiding type_transition rules from public policy.  These
      rules need to be hidden from public policy because they describe how objects are
      labeled, of which non-platform should be unaware.  Instead of cutting apart the
      app_domain macro, which non-platform policy may rely on for implementing new app
      types, move all app_domain calls to private policy.
      
      (cherry-pick of commit: 76035ea0)
      
      Bug: 33428593
      Test: bullhead and sailfish both boot. sediff shows no policy change.
      Change-Id: I4beead8ccc9b6e13c6348da98bb575756f539665
      3e8dbf01
  2. Dec 07, 2016
    • dcashman's avatar
      Fix build. · 0c8ad1dc
      dcashman authored
      Make all platform tyeps public to start to prevent build breakage in any devices
      that may have device-specific policy using these types.  Future changes will
      need to be carefully made to ensure we properly limit types for use by
      non-platform policy.
      
      Test: Builds
      Change-Id: I7349940d5b5a57357bc7c16f66925dee1d030eb6
      0c8ad1dc
  3. 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
  4. Dec 05, 2016
    • Jeff Sharkey's avatar
      Rules for new installd Binder interface. · e160d14e
      Jeff Sharkey authored
      Most of this CL mirrors what we've already done for the "netd" Binder
      interface, while sorting a few lists alphabetically.
      
      Migrating installd to Binder will allow us to get rid of one of
      the few lingering text-based command protocols, improving system
      maintainability and security.
      
      Test: builds, boots
      Bug: 13758960, 30944031
      Change-Id: I59b89f916fd12e22f9813ace6673be38314c97b7
      e160d14e
    • 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
  5. 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
  6. 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
  7. Nov 21, 2016
    • Nick Kralevich's avatar
      access_vectors: Remove unused permission definitions · 11dc03e5
      Nick Kralevich authored
      Description stolen from
      https://github.com/torvalds/linux/commit/42a9699a9fa179c0054ea3cf5ad3cc67104a6162
      
      Remove unused permission definitions from SELinux.
      Many of these were only ever used in pre-mainline
      versions of SELinux, prior to Linux 2.6.0.  Some of them
      were used in the legacy network or compat_net=1 checks
      that were disabled by default in Linux 2.6.18 and
      fully removed in Linux 2.6.30.
      
      Permissions never used in mainline Linux:
      file swapon
      filesystem transition
      tcp_socket { connectto newconn acceptfrom }
      node enforce_dest
      unix_stream_socket { newconn acceptfrom }
      
      Legacy network checks, removed in 2.6.30:
      socket { recv_msg send_msg }
      node { tcp_recv tcp_send udp_recv udp_send rawip_recv rawip_send dccp_recv dccp_send }
      netif { tcp_recv tcp_send udp_recv udp_send rawip_recv rawip_send dccp_recv dccp_send }
      
      Test: policy compiles and no boot errors (marlin)
      Change-Id: Idaef2567666f80db39c3e3cee70e760e1dac73ec
      11dc03e5
    • 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
  8. 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
  9. 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
  10. Nov 12, 2016
  11. Nov 11, 2016
    • Nick Kralevich's avatar
      property.te: delete security_prop · ee751c33
      Nick Kralevich authored
      This property is never used.
      
      Test: policy compiles
      Change-Id: I43ace92950e1221754db28548031fbbfc0437d7a
      ee751c33
    • 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
  12. Nov 10, 2016
    • Jason Monk's avatar
      Add persist.vendor.overlay. to properties · 0e1cbf56
      Jason Monk authored
      Allow the system_server to change. Allow the zygote to read it as well.
      
      Test: Have system_server set a property
      Change-Id: Ie90eec8b733fa7193861026a3a6e0fb0ba5d5318
      0e1cbf56
  13. Nov 08, 2016
  14. Nov 04, 2016
    • Etan Cohen's avatar
      [NAN-AWARE] Remove NAN service · 43b96aaf
      Etan Cohen authored
      Finish NAN -> Aware rename process. Removes old NAN service.
      
      Bug: 32263750
      Test: device boots and all Wi-Fi unit-tests pass
      Change-Id: I2f0d9595efea2494b56074752194e7a6e66070f2
      43b96aaf
    • Etan Cohen's avatar
      [NAN-AWARE] Add Aware service · 44527cb9
      Etan Cohen authored
      Add Aware service - new name for NAN. But do not remove NAN
      yet. Enables smooth transition.
      
      Bug: 32263750
      Test: device boots and all Wi-Fi unit-tests pass
      Change-Id: Ieb9f1ebf1d2f31ee27f228562b4601023da5282d
      44527cb9
  15. Nov 03, 2016
  16. Nov 01, 2016
  17. 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
  18. Oct 26, 2016
  19. Oct 25, 2016
  20. Oct 21, 2016
  21. 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
  22. 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
  23. Oct 11, 2016
  24. Oct 07, 2016
  25. Oct 06, 2016
    • dcashman's avatar
      Split general policy into public and private components. · cc39f637
      dcashman authored
      Divide policy into public and private components.  This is the first
      step in splitting the policy creation for platform and non-platform
      policies.  The policy in the public directory will be exported for use
      in non-platform policy creation.  Backwards compatibility with it will
      be achieved by converting the exported policy into attribute-based
      policy when included as part of the non-platform policy and a mapping
      file will be maintained to be included with the platform policy that
      maps exported attributes of previous versions to the current platform
      version.
      
      Eventually we would like to create a clear interface between the
      platform and non-platform device components so that the exported policy,
      and the need for attributes is minimal.  For now, almost all types and
      avrules are left in public.
      
      Test: Tested by building policy and running on device.
      
      Change-Id: Idef796c9ec169259787c3f9d8f423edf4ce27f8c
      cc39f637
Loading