Skip to content
Snippets Groups Projects
  1. Apr 19, 2017
  2. Apr 16, 2017
  3. Feb 28, 2017
  4. Feb 17, 2017
    • Alex Klyubin's avatar
      Switch DRM HAL policy to _client/_server · 9b718c40
      Alex Klyubin authored
      This switches DRM HAL policy to the design which enables us to
      conditionally remove unnecessary rules from domains which are clients
      of DRM HAL.
      
      Domains which are clients of DRM HAL, such as mediadrmserver domain,
      are granted rules targeting hal_drm only when the DRM HAL runs in
      passthrough mode (i.e., inside the client's process). When the HAL
      runs in binderized mode (i.e., in another process/domain, with
      clients talking to the HAL over HwBinder IPC), rules targeting hal_drm
      are not granted to client domains.
      
      Domains which offer a binderized implementation of DRM HAL, such as
      hal_drm_default domain, are always granted rules targeting hal_drm.
      
      Test: Play movie using Google Play Movies
      Test: Play movie using Netflix
      Bug: 34170079
      Change-Id: I3ab0e84818ccd61e54b90f7ade3509b7dbf86fb9
      9b718c40
  5. Feb 08, 2017
  6. Jan 26, 2017
    • William Roberts's avatar
      te_macros: introduce add_service() macro · 606d2fd6
      William Roberts authored
      
      Introduce the add_service() macro which wraps up add/find
      permissions for the source domain with a neverallow preventing
      others from adding it. Only a particular domain should
      add a particular service.
      
      Use the add_service() macro to automatically add a neverallow
      that prevents other domains from adding the service.
      
      mediadrmserver was adding services labeled mediaserver_service.
      Drop the add permission as it should just need the find
      permission.
      
      Additionally, the macro adds the { add find } permission which
      causes some existing neverallow's to assert. Adjust those
      neverallow's so "self" can always find.
      
      Test: compile and run on hikey and emulator. No new denials were
      found, and all services, where applicable, seem to be running OK.
      
      Change-Id: Ibbd2a5304edd5f8b877bc86852b0694732be993c
      Signed-off-by: default avatarWilliam Roberts <william.c.roberts@intel.com>
      606d2fd6
  7. Jan 25, 2017
    • Alex Klyubin's avatar
      Remove hal_drm from mediadrmserver domain · 5bfda51e
      Alex Klyubin authored
      HAL clients should not be annotated with hal_x and haldomain. This may
      grant them too much access. Instead, the policy needed for using
      in-process HALs should be directly embedded into the client's domain
      rules.
      
      This reverts the moving of rules out of mediadrmserver in commit
      c86f42b9.
      
      Test: YouTube videos play back, no mediadrmserver denials
      Bug: 34715716
      Bug: 32815560
      Change-Id: Ib57ef880bcc306c6e01f2c24c0f3a4298598eb9a
      5bfda51e
    • Jeff Tinker's avatar
      Add sepolicy for drm HALs · c86f42b9
      Jeff Tinker authored
      bug:32815560
      Change-Id: I494141b47fcd2e7e0cc02aa58d8df9a222060b3f
      c86f42b9
    • Ray Essick's avatar
      rename mediaanalytics->mediametrics, wider access · 39185400
      Ray Essick authored
      reflect the change from "mediaanalytics" to "mediametrics"
      
      Also incorporates a broader access to the service -- e.g. anyone.
      This reflects that a number of metrics submissions come from application
      space and not only from our controlled, trusted media related processes.
      The metrics service (in another commit) checks on the source of any
      incoming metrics data and limits what is allowed from unprivileged
      clients.
      
      Bug: 34615027
      Test: clean build, service running and accessible
      Change-Id: I657c343ea1faed536c3ee1940f1e7a178e813a42
      39185400
  8. Dec 22, 2016
    • Alex Klyubin's avatar
      Restrict access to ro.serialno and ro.boot.serialno · 20151072
      Alex Klyubin authored
      This restricts access to ro.serialno and ro.boot.serialno, the two
      system properties which contain the device's serial number, to a
      select few SELinux domains which need the access. In particular, this
      removes access to these properties from Android apps. Apps can access
      the serial number via the public android.os.Build API. System
      properties are not public API for apps.
      
      The reason for the restriction is that serial number is a globally
      unique identifier which cannot be reset by the user. Thus, it can be
      used as a super-cookie by apps. Apps need to wean themselves off of
      identifiers not resettable by the user.
      
      Test: Set up fresh GMS device, install some apps via Play, update some apps, use Chrome
      Test: Access the device via ADB (ADBD exposes serial number)
      Test: Enable MTP over USB, use mtp-detect to confirm that serial number is reported in MTP DeviceInfo
      Bug: 31402365
      Bug: 33700679
      Change-Id: I4713133b8d78dbc63d8272503e80cd2ffd63a2a7
      20151072
  9. 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
  10. Nov 14, 2016
    • Chia-I Wu's avatar
      resolve merge conflicts of 837a6f20 to master · 32436ba2
      Chia-I Wu authored
      Test: make
      Change-Id: Icf77940472c7b7776b731c0ce0c1f53ac8bd198c
      32436ba2
    • 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
  11. 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
  12. Sep 13, 2016
  13. Jul 13, 2016
  14. Mar 31, 2016
  15. Feb 27, 2016
  16. Feb 22, 2016
  17. Feb 13, 2016
    • Jeff Tinker's avatar
      Add mediadrm service · 0d5bac13
      Jeff Tinker authored
      Part of media security hardening
      
      This is an intermediate step toward moving
      mediadrm to a new service separate from mediaserver.
      This first step allows mediadrmservice to run based
      on the system property media.mediadrmservice.enable
      so it can be selectively enabled on devices that
      support using native_handles for secure buffers.
      
      bug: 22990512
      Change-Id: I2208c1e87a6bd8d5bfaed06b1fdcb0509c11cff2
      0d5bac13
Loading