Skip to content
Snippets Groups Projects
  1. May 07, 2015
    • William Roberts's avatar
      Replace unix_socket_connect() and explicit property sets with macro · 625a3526
      William Roberts authored
      
      A common source of mistakes when authoring sepolicy is properly
      setting up property sets. This is a 3 part step of:
      1. Allowing the unix domain connection to the init/property service
      2. Allowing write on the property_socket file
      3. Allowing the set on class property_service
      
      The macro unix_socket_connect() handled 1 and 2, but could be
      confusing for first time policy authors. 3 had to be explicitly
      added.
      
      To correct this, we introduce a new macros:
      set_prop(sourcedomain, targetprop)
      
      This macro handles steps 1, 2 and 3.
      
      No difference in sediff is expected.
      
      Change-Id: I630ba0178439c935d08062892990d43a3cc1239e
      Signed-off-by: default avatarWilliam Roberts <william.c.roberts@linux.intel.com>
      625a3526
  2. Apr 09, 2015
    • dcashman's avatar
      Enforce more specific service access. · bd7f5803
      dcashman authored
      Move the remaining services from tmp_system_server_service to appropriate
      attributes and remove tmp_system_server and associated logging:
      
      registry
      restrictions
      rttmanager
      scheduling_policy
      search
      sensorservice
      serial
      servicediscovery
      statusbar
      task
      textservices
      telecom_service
      trust_service
      uimode
      updatelock
      usagestats
      usb
      user
      vibrator
      voiceinteraction
      wallpaper
      webviewupdate
      wifip2p
      wifi
      window
      
      Bug: 18106000
      Change-Id: Ia0a6d47099d82c53ba403af394537db6fbc71ca0
      bd7f5803
  3. Apr 08, 2015
    • dcashman's avatar
      Enforce more specific service access. · 03a6f64f
      dcashman authored
      Move the following services from tmp_system_server_service to appropriate
      attributes:
      
      network_management
      network_score
      notification
      package
      permission
      persistent
      power
      print
      processinfo
      procstats
      
      Bug: 18106000
      Change-Id: I9dfb41fa41cde72ef0059668410a2e9eb1af491c
      03a6f64f
  4. Apr 03, 2015
    • dcashman's avatar
      Add system_api_service and app_api_service attributes. · d12993f0
      dcashman authored
      System services differ in designed access level.  Add attributes reflecting this
      distinction and label services appropriately.  Begin moving access to the newly
      labeled services by removing them from tmp_system_server_service into the newly
      made system_server_service attribute.  Reflect the move of system_server_service
      from a type to an attribute by removing access to system_server_service where
      appropriate.
      
      Change-Id: I7fd06823328daaea6d6f96e4d6bd00332382230b
      d12993f0
  5. Jan 17, 2015
    • dcashman's avatar
      Record service accesses. · 566e8fe2
      dcashman authored
      Reduce logspam and record further observed service connections.
      
      Bug: 18106000
      Change-Id: I9a57e4bb8f1c8e066861719fb208c691498842a8
      566e8fe2
  6. Jan 16, 2015
    • dcashman's avatar
      Record surfaceflinger power_service access. · 7d1deec4
      dcashman authored
      Address the following log entry:
      SELinux : avc:  granted  { find } for service=power scontext=u:r:surfaceflinger:s0 tcontext=u:object_r:power_service:s0 tclass=service_manager
      
      Change-Id: Id750ba9f99c622351fb3206ad007eae8a713adea
      7d1deec4
  7. Jan 14, 2015
    • dcashman's avatar
      Make system_server_service an attribute. · 4a89cdfa
      dcashman authored
      Temporarily give every system_server_service its own
      domain in preparation for splitting it and identifying
      special services or classes of services.
      
      Change-Id: I81ffbdbf5eea05e0146fd7fd245f01639b1ae0ef
      4a89cdfa
  8. Dec 15, 2014
    • dcashman's avatar
      Restrict service_manager find and list access. · cd82557d
      dcashman authored
      All domains are currently granted list and find service_manager
      permissions, but this is not necessary.  Pare the permissions
      which did not trigger any of the auditallow reporting.
      
      Bug: 18106000
      Change-Id: Ie0ce8de2af8af2cbe4ce388a2dcf4534694c994a
      cd82557d
  9. Jul 25, 2014
    • Nick Kralevich's avatar
      Resync lmp-dev-plus-aosp with master · d065f048
      Nick Kralevich authored
      A DO NOT MERGE change merged from lmp-dev to lmp-dev-plus-aosp.
      This is expected, but it's causing unnecessary merge conflicts
      when handling AOSP contributions.
      
      Resolve those conflicts.
      
      This is essentially a revert of bf696327
      for lmp-dev-plus-aosp only.
      
      Change-Id: Icc66def7113ab45176ae015f659cb442d53bce5c
      d065f048
  10. Jul 18, 2014
  11. Jul 15, 2014
    • Riley Spahn's avatar
      Add access control for each service_manager action. · 344fc109
      Riley Spahn authored
      Add SELinux MAC for the service manager actions list
      and find. Add the list and find verbs to the
      service_manager class. Add policy requirements for
      service_manager to enforce policies to binder_use
      macro.
      
      (cherry picked from commit b8511e0d)
      
      Change-Id: I980d4a8acf6a0c6e99a3a7905961eb5564b1be15
      344fc109
  12. Jul 14, 2014
    • Riley Spahn's avatar
      Add access control for each service_manager action. · b8511e0d
      Riley Spahn authored
      Add SELinux MAC for the service manager actions list
      and find. Add the list and find verbs to the
      service_manager class. Add policy requirements for
      service_manager to enforce policies to binder_use
      macro.
      
      Change-Id: I224b1c6a6e21e3cdeb23badfc35c82a37558f964
      b8511e0d
  13. Jun 12, 2014
    • Riley Spahn's avatar
      Add SELinux rules for service_manager. · f90c41f6
      Riley Spahn authored
      Add a service_mananger class with the verb add.
      Add a type that groups the services for each of the
      processes that is allowed to start services in service.te
      and an attribute for all services controlled by the service
      manager. Add the service_contexts file which maps service
      name to target label.
      
      Bug: 12909011
      Change-Id: I017032a50bc90c57b536e80b972118016d340c7d
      f90c41f6
  14. Jun 09, 2014
  15. Jun 04, 2014
  16. May 16, 2014
  17. May 07, 2014
    • Greg Hackmann's avatar
      Add policies for Atomic Display Framework · 7004789d
      Greg Hackmann authored
      
      ADF is a modern replacement for fbdev.
      
      ADF's device nodes (/dev/adf[X]), interface nodes
      (/dev/adf-interface[X].[Y]), and overlay engine nodes
      (/dev/adf-overlay-engine[X].[Y]) are collectively used in similar
      contexts as fbdev nodes.  Vendor HW composers (via SurfaceFlinger) and
      healthd will need to send R/W ioctls to these nodes to prepare and
      update the display.
      
      Ordinary apps should not talk to ADF directly.
      
      Change-Id: Ic0a76b1e82c0cc1e8f240f219928af1783e79343
      Signed-off-by: default avatarGreg Hackmann <ghackmann@google.com>
      7004789d
  18. Apr 16, 2014
    • Nick Kralevich's avatar
      Allow surfaceflinger to make binder call to bootanim · fd352f11
      Nick Kralevich authored
      When SurfaceFlinger -- or any BufferQueue consumer -- releases a buffer, the
      BufferQueue calls back into the producer side in case the producer cares.
      This results in a notification from surfaceflinger to bootanim.
      
      This callback started in d1c103655533321b5c74fbefff656838a8196153.
      
      Addresses the following denial:
      
      6.164348   type=1400 audit(1397612702.010:5): avc:  denied  { call } for  pid=128 comm="surfaceflinger" scontext=u:r:surfaceflinger:s0 tcontext=u:r:bootanim:s0 tclass=binder
      
      Change-Id: I6f2d62a3ed81fde45150d2ae3ff05822bfda33fe
      fd352f11
  19. Mar 25, 2014
  20. Mar 21, 2014
  21. Mar 13, 2014
    • Stephen Smalley's avatar
      Get rid of separate platform_app_data_file type. · dc88dca1
      Stephen Smalley authored
      
      The original concept was to allow separation between /data/data/<pkgdir>
      files of "platform" apps (signed by one of the four build keys) and
      untrusted apps.  But we had to allow read/write to support passing of
      open files via Binder or local socket for compatibilty, and it seems
      that direct open by pathname is in fact used in Android as well,
      only passing the pathname via Binder or local socket.  So there is no
      real benefit to keeping it as a separate type.
      
      Retain a type alias for platform_app_data_file to app_data_file until
      restorecon /data/data support is in place to provide compatibility.
      
      Change-Id: Ic15066f48765322ad40500b2ba2801bb3ced5489
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      dc88dca1
  22. Mar 10, 2014
    • Stephen Smalley's avatar
      Address surfaceflinger denials. · 244aa02a
      Stephen Smalley authored
      
      Resolves denials such as:
      
      avc:  denied  { call } for  pid=257 comm="Binder_2" scontext=u:r:surfaceflinger:s0 tcontext=u:r:adbd:s0 tclass=binder
      
      avc:  denied  { call } for  pid=1002 comm="Binder_4" scontext=u:r:surfaceflinger:s0 tcontext=u:r:platform_app:s0 tclass=binder
      
      avc:  denied  { open } for  pid=1468 comm="Binder_1" name="cmdline" dev="proc" ino=10222 scontext=u:r:surfaceflinger:s0 tcontext=u:r:mediaserver:s0 tclass=file
      
      avc:  denied  { open } for  pid=1275 comm="Binder_5" name="cmdline" dev="proc" ino=38036 scontext=u:r:surfaceflinger:s0 tcontext=u:r:system_app:s0 tclass=file
      
      Change-Id: I92147a1636b44a851d0e0e059f70ec8267cecf08
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      244aa02a
  23. Feb 25, 2014
    • Stephen Smalley's avatar
      Clean up socket rules. · 16011320
      Stephen Smalley authored
      
      Replace * or any permission set containing create with
      create_socket_perms or create_stream_socket_perms.
      
      Add net_domain() to all domains using network sockets and
      delete rules already covered by domain.te or net.te.
      
      For netlink_route_socket, only nlmsg_write needs to be separately
      granted to specific domains that are permitted to modify the routing
      table.   Clarification:  read/write permissions are just ability to
      perform read/recv() or write/send() on the socket, whereas nlmsg_read/
      nlmsg_write permissions control ability to observe or modify the
      underlying kernel state accessed via the socket.
      See security/selinux/nlmsgtab.c in the kernel for the mapping of
      netlink message types to nlmsg_read or nlmsg_write.
      
      Delete legacy rule for b/12061011.
      
      This change does not touch any rules where only read/write were allowed
      to a socket created by another domain (inherited across exec or
      received across socket or binder IPC).  We may wish to rewrite some or all
      of those rules with the rw_socket_perms macro but that is a separate
      change.
      
      Change-Id: Ib0637ab86f6d388043eff928e5d96beb02e5450e
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      16011320
  24. Feb 06, 2014
    • rpcraig's avatar
      Address screenrecord denials. · e21871c8
      rpcraig authored
      
      Steps to reproduce across devices.
        adb shell screenrecord --bit-rate 8000000 --time-limit 10 /data/local/tmp/test.mp4
      
      * Allow surfaceflinger to talk to mediaserver
         avc:  denied  { call } for  pid=122 comm="surfaceflinger" scontext=u:r:surfaceflinger:s0 tcontext=u:r:mediaserver:s0 tclass=binder
      
      * Give mediaserver access to gpu_device
         avc:  denied  { read write } for  pid=2793 comm="VideoEncMsgThre" name="kgsl-3d0" dev="tmpfs" ino=6556 scontext=u:r:mediaserver:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file
         avc:  denied  { open } for  pid=2793 comm="VideoEncMsgThre" name="kgsl-3d0" dev="tmpfs" ino=6556 scontext=u:r:mediaserver:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file
         avc:  denied  { ioctl } for  pid=2793 comm="VideoEncMsgThre" path="/dev/kgsl-3d0" dev="tmpfs" ino=6556 scontext=u:r:mediaserver:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file
      
      Change-Id: Id1812ec95662f4b2433e2989f5fccce6a85c3a41
      Signed-off-by: default avatarrpcraig <rpcraig@tycho.ncsc.mil>
      e21871c8
  25. Feb 05, 2014
    • Nick Kralevich's avatar
      am 75922a0a: am 629c98c2: Fix NFC image transfer · d7346da7
      Nick Kralevich authored
      * commit '75922a0a':
        Fix NFC image transfer
      d7346da7
    • Nick Kralevich's avatar
      Fix NFC image transfer · 3fe65bab
      Nick Kralevich authored
      Image transfer over NFC is broken.
      
        STEPS TO REPRODUCE:
        -----------------------------------------
        1. Launch Gallery and open any picture
        2. Keep two devices close each other
        3. Tap on 'Touch to Beam' option on sender device and observe receiver device
      
        OBSERVED RESULTS:
        'Beam did not complete' message showing in Notification window.
      
        EXPECTED RESULTS:
        Beam should complete successfully and able to share picture through Beam
      
        ADDITIONAL INFORMATION :
        Device : Hammerhead
        Reproducibility : 3/3
      
      Addresses the following denials:
      
      <5>[ 3030.955024] type=1400 audit(1391625834.066:72): avc:  denied  { call } for  pid=311 comm="Binder_2" scontext=u:r:surfaceflinger:s0 tcontext=u:r:nfc:s0 tclass=binder
      <5>[ 3049.606559] type=1400 audit(1391625852.716:74): avc:  denied  { write } for  pid=26850 comm="id.nfc:handover" name="0" dev="fuse" ino=3086221568 scontext=u:r:nfc:s0 tcontext=u:object_r:sdcard_internal:s0 tclass=dir
      <5>[ 3049.606802] type=1400 audit(1391625852.716:75): avc:  denied  { add_name } for  pid=26850 comm="id.nfc:handover" name="beam" scontext=u:r:nfc:s0 tcontext=u:object_r:sdcard_internal:s0 tclass=dir
      <5>[ 3049.607068] type=1400 audit(1391625852.716:76): avc:  denied  { create } for  pid=26850 comm="id.nfc:handover" name="beam" scontext=u:r:nfc:s0 tcontext=u:object_r:sdcard_internal:s0 tclass=dir
      <5>[ 3049.610602] type=1400 audit(1391625852.716:77): avc:  denied  { remove_name } for  pid=26850 comm="id.nfc:handover" name="IMG_20140205_104344.jpg" dev="fuse" ino=3086246328 scontext=u:r:nfc:s0 tcontext=u:object_r:sdcard_internal:s0 tclass=dir
      <5>[ 3049.610870] type=1400 audit(1391625852.716:78): avc:  denied  { rename } for  pid=26850 comm="id.nfc:handover" name="IMG_20140205_104344.jpg" dev="fuse" ino=3086246328 scontext=u:r:nfc:s0 tcontext=u:object_r:sdcard_internal:s0 tclass=file
      
      Bug: 12891504
      
      (cherry picked from commit 629c98c2)
      
      Change-Id: I7832cc2b66c88092b05581503e338cf8b6e1c0ec
      3fe65bab
    • Nick Kralevich's avatar
      Fix NFC image transfer · 629c98c2
      Nick Kralevich authored
      Image transfer over NFC is broken.
      
        STEPS TO REPRODUCE:
        -----------------------------------------
        1. Launch Gallery and open any picture
        2. Keep two devices close each other
        3. Tap on 'Touch to Beam' option on sender device and observe receiver device
      
        OBSERVED RESULTS:
        'Beam did not complete' message showing in Notification window.
      
        EXPECTED RESULTS:
        Beam should complete successfully and able to share picture through Beam
      
        ADDITIONAL INFORMATION :
        Device : Hammerhead
        Reproducibility : 3/3
      
      Addresses the following denials:
      
      <5>[ 3030.955024] type=1400 audit(1391625834.066:72): avc:  denied  { call } for  pid=311 comm="Binder_2" scontext=u:r:surfaceflinger:s0 tcontext=u:r:nfc:s0 tclass=binder
      <5>[ 3049.606559] type=1400 audit(1391625852.716:74): avc:  denied  { write } for  pid=26850 comm="id.nfc:handover" name="0" dev="fuse" ino=3086221568 scontext=u:r:nfc:s0 tcontext=u:object_r:sdcard_internal:s0 tclass=dir
      <5>[ 3049.606802] type=1400 audit(1391625852.716:75): avc:  denied  { add_name } for  pid=26850 comm="id.nfc:handover" name="beam" scontext=u:r:nfc:s0 tcontext=u:object_r:sdcard_internal:s0 tclass=dir
      <5>[ 3049.607068] type=1400 audit(1391625852.716:76): avc:  denied  { create } for  pid=26850 comm="id.nfc:handover" name="beam" scontext=u:r:nfc:s0 tcontext=u:object_r:sdcard_internal:s0 tclass=dir
      <5>[ 3049.610602] type=1400 audit(1391625852.716:77): avc:  denied  { remove_name } for  pid=26850 comm="id.nfc:handover" name="IMG_20140205_104344.jpg" dev="fuse" ino=3086246328 scontext=u:r:nfc:s0 tcontext=u:object_r:sdcard_internal:s0 tclass=dir
      <5>[ 3049.610870] type=1400 audit(1391625852.716:78): avc:  denied  { rename } for  pid=26850 comm="id.nfc:handover" name="IMG_20140205_104344.jpg" dev="fuse" ino=3086246328 scontext=u:r:nfc:s0 tcontext=u:object_r:sdcard_internal:s0 tclass=file
      
      Bug: 12891504
      Change-Id: I10dc964db9249f53a2b4d8fe871ad9a036c423a2
      629c98c2
  26. Jan 21, 2014
    • Nick Kralevich's avatar
      Address bug report denials. · 2e7a301f
      Nick Kralevich authored
      Triggering a bug report via
      Settings > Developer Options > Take bug report
      generates a number of denials.
      
      Two bugs here:
      
      1) According to the "allowed" list in
      frameworks/native/cmds/servicemanager/service_manager.c ,
      media apps, nfc, radio, and apps with system/root UIDs can register
      as a binder service. However, they were not placed into the
      binder_service domain. Fix them.
      
      2) The bugreport mechanism queries all the services and java
      programs and asks them to write to a shell owned file. Grant the
      corresponding SELinux capability.
      
      Addresses the following denials:
      
      <5>[  149.342181] type=1400 audit(1389419775.872:17): avc:  denied  { write } for  pid=4023 comm="dumpsys" path="/data/data/com.android.shell/files/bugreports/bugreport-2014-01-10-21-55-46.txt.tmp" dev="mmcblk0p28" ino=82094 scontext=u:r:keystore:s0 tcontext=u:object_r:shell_data_file:s0 tclass=file
      <5>[  149.371844] type=1400 audit(1389419775.902:18): avc:  denied  { write } for  pid=4023 comm="dumpsys" path="/data/data/com.android.shell/files/bugreports/bugreport-2014-01-10-21-55-46.txt.tmp" dev="mmcblk0p28" ino=82094 scontext=u:r:healthd:s0 tcontext=u:object_r:shell_data_file:s0 tclass=file
      <5>[  149.980161] type=1400 audit(1389419776.512:22): avc:  denied  { write } for  pid=4023 comm="dumpsys" path="/data/data/com.android.shell/files/bugreports/bugreport-2014-01-10-21-55-46.txt.tmp" dev="mmcblk0p28" ino=82094 scontext=u:r:drmserver:s0 tcontext=u:object_r:shell_data_file:s0 tclass=file
      <5>[  150.095066] type=1400 audit(1389419776.622:23): avc:  denied  { write } for  pid=1514 comm="Binder_C" path="/data/data/com.android.shell/files/bugreports/bugreport-2014-01-10-21-55-46.txt.tmp" dev="mmcblk0p28" ino=82094 scontext=u:r:system_app:s0 tcontext=u:object_r:shell_data_file:s0 tclass=file
      <5>[  150.096748] type=1400 audit(1389419776.632:24): avc:  denied  { getattr } for  pid=3178 comm="Binder_3" path="/data/data/com.android.shell/files/bugreports/bugreport-2014-01-10-21-55-46.txt.tmp" dev="mmcblk0p28" ino=82094 scontext=u:r:system_app:s0 tcontext=u:object_r:shell_data_file:s0 tclass=file
      <5>[  150.097090] type=1400 audit(1389419776.632:25): avc:  denied  { write } for  pid=1514 comm="Binder_C" path="/data/data/com.android.shell/files/bugreports/bugreport-2014-01-10-21-55-46.txt.tmp" dev="mmcblk0p28" ino=82094 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:shell_data_file:s0 tclass=file
      <5>[  154.545583] type=1400 audit(1389419781.072:43): avc:  denied  { write } for  pid=1423 comm="Binder_A" path="/data/data/com.android.shell/files/bugreports/bugreport-2014-01-10-21-55-46.txt.tmp" dev="mmcblk0p28" ino=82094 scontext=u:r:media_app:s0 tcontext=u:object_r:shell_data_file:s0 tclass=file
      <5>[  156.000877] type=1400 audit(1389419782.532:44): avc:  denied  { write } for  pid=1423 comm="Binder_A" path="/data/data/com.android.shell/files/bugreports/bugreport-2014-01-10-21-55-46.txt.tmp" dev="mmcblk0p28" ino=82094 scontext=u:r:radio:s0 tcontext=u:object_r:shell_data_file:s0 tclass=file
      <5>[  156.022567] type=1400 audit(1389419782.552:45): avc:  denied  { write } for  pid=1423 comm="Binder_A" path="/data/data/com.android.shell/files/bugreports/bugreport-2014-01-10-21-55-46.txt.tmp" dev="mmcblk0p28" ino=82094 scontext=u:r:radio:s0 tcontext=u:object_r:shell_data_file:s0 tclass=file
      <5>[  156.043463] type=1400 audit(1389419782.572:46): avc:  denied  { write } for  pid=1423 comm="Binder_A" path="/data/data/com.android.shell/files/bugreports/bugreport-2014-01-10-21-55-46.txt.tmp" dev="mmcblk0p28" ino=82094 scontext=u:r:nfc:s0 tcontext=u:object_r:shell_data_file:s0 tclass=file
      <5>[  156.062550] type=1400 audit(1389419782.592:47): avc:  denied  { write } for  pid=1423 comm="Binder_A" path="/data/data/com.android.shell/files/bugreports/bugreport-2014-01-10-21-55-46.txt.tmp" dev="mmcblk0p28" ino=82094 scontext=u:r:radio:s0 tcontext=u:object_r:shell_data_file:s0 tclass=file
      
      Change-Id: I365d530c38ce176617e48b620c05c4aae01324d3
      2e7a301f
  27. Jan 11, 2014
    • Nick Kralevich's avatar
      Support forcing permissive domains to unconfined. · 623975fa
      Nick Kralevich authored
      Permissive domains are only intended for development.
      When a device launches, we want to ensure that all
      permissive domains are in, at a minimum, unconfined+enforcing.
      
      Add FORCE_PERMISSIVE_TO_UNCONFINED to Android.mk. During
      development, this flag is false, and permissive domains
      are allowed. When SELinux new feature development has been
      frozen immediately before release, this flag will be flipped
      to true. Any previously permissive domains will move into
      unconfined+enforcing.
      
      This will ensure that all SELinux domains have at least a
      minimal level of protection.
      
      Unconditionally enable this flag for all user builds.
      
      Change-Id: I1632f0da0022c80170d8eb57c82499ac13fd7858
      623975fa
  28. Jan 08, 2014
    • Nick Kralevich's avatar
      address denials when playing protected content. · e45603d3
      Nick Kralevich authored
      When playing protected content on manta, surfaceflinger would crash.
      
        STEPS TO REPRODUCE:
        1. Launch Play Movies & TV
        2. Play any movie and observe
      
        OBSERVED RESULTS:
        Device reboot while playing movies
      
        EXPECTED RESULTS:
        No device reboot
      
      Even though this only reproduces on manta, this seems appropriate
      for a general policy.
      
      Addresses the following denials:
      
      <5>[   36.066819] type=1400 audit(1389141624.471:9): avc:  denied  { write } for  pid=1855 comm="TimedEventQueue" name="tlcd_sock" dev="mmcblk0p9" ino=627097 scontext=u:r:mediaserver:s0 tcontext=u:object_r:drmserver_socket:s0 tclass=sock_file
      <5>[   36.066985] type=1400 audit(1389141624.471:10): avc:  denied  { connectto } for  pid=1855 comm="TimedEventQueue" path="/data/app/tlcd_sock" scontext=u:r:mediaserver:s0 tcontext=u:r:drmserver:s0 tclass=unix_stream_socket
      <5>[   41.379708] type=1400 audit(1389141629.786:15): avc:  denied  { connectto } for  pid=120 comm="surfaceflinger" path=006D636461656D6F6E scontext=u:r:surfaceflinger:s0 tcontext=u:r:tee:s0 tclass=unix_stream_socket
      <5>[   41.380051] type=1400 audit(1389141629.786:16): avc:  denied  { read write } for  pid=120 comm="surfaceflinger" name="mobicore-user" dev="tmpfs" ino=4117 scontext=u:r:surfaceflinger:s0 tcontext=u:object_r:tee_device:s0 tclass=chr_file
      <5>[   41.380209] type=1400 audit(1389141629.786:17): avc:  denied  { open } for  pid=120 comm="surfaceflinger" name="mobicore-user" dev="tmpfs" ino=4117 scontext=u:r:surfaceflinger:s0 tcontext=u:object_r:tee_device:s0 tclass=chr_file
      <5>[   41.380779] type=1400 audit(1389141629.786:18): avc:  denied  { ioctl } for  pid=120 comm="surfaceflinger" path="/dev/mobicore-user" dev="tmpfs" ino=4117 scontext=u:r:surfaceflinger:s0 tcontext=u:object_r:tee_device:s0 tclass=chr_file
      
      Change-Id: I20286ec2a6cf0d190a84ad74e88e94468bab9fdb
      Bug: 12434847
      e45603d3
  29. Jan 07, 2014
    • Nick Kralevich's avatar
      Revert "Make surfaceflinger domain enforcing." · 58327026
      Nick Kralevich authored
      There are continued complaints about not being able to generate
      bug reports and surfaceflinger crashes. Move surfaceflinger
      out of enforcing until I can resolve this.
      
      Here are some denials I'm seeing. I'm not sure what binder service is
      running in the shell domain... Need to do more digging.
      
      nnk@nnk:~/Downloads$ grep "avc: " screenshot_runtime_restart.txt  | grep surfaceflinger
      <5>[    5.182699] type=1400 audit(1389111729.860:9): avc:  denied  { search } for  pid=186 comm="surfaceflinger" name="tmp" dev="mmcblk0p28" ino=627090 scontext=u:r:surfaceflinger:s0 tcontext=u:object_r:shell_data_file:s0 tclass=dir
      <5>[  744.988702] type=1400 audit(1389112469.578:188): avc:  denied  { call } for  pid=596 comm="Binder_3" scontext=u:r:surfaceflinger:s0 tcontext=u:r:shell:s0 tclass=binder
      
      This reverts commit a11c56e1.
      
      Bug: 12416329
      Change-Id: I7b72608c760c4087f73047ad751a5bd069fa2ec7
      58327026
    • Stephen Smalley's avatar
      Fix denials triggered by adb shell screencap. · e5be3a6b
      Stephen Smalley authored
      
      Change-Id: Ief925f1f49a6579d5a7a1035f3732834238fa590
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      e5be3a6b
    • Stephen Smalley's avatar
      Fix denials triggered by adb shell screencap. · a5066135
      Stephen Smalley authored
      
      Change-Id: Ief925f1f49a6579d5a7a1035f3732834238fa590
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      a5066135
    • Nick Kralevich's avatar
      Revert "Make surfaceflinger domain enforcing." · 5f290264
      Nick Kralevich authored
      There are continued complaints about not being able to generate
      bug reports and surfaceflinger crashes. Move surfaceflinger
      out of enforcing until I can resolve this.
      
      Here are some denials I'm seeing. I'm not sure what binder service is
      running in the shell domain... Need to do more digging.
      
      nnk@nnk:~/Downloads$ grep "avc: " screenshot_runtime_restart.txt  | grep surfaceflinger
      <5>[    5.182699] type=1400 audit(1389111729.860:9): avc:  denied  { search } for  pid=186 comm="surfaceflinger" name="tmp" dev="mmcblk0p28" ino=627090 scontext=u:r:surfaceflinger:s0 tcontext=u:object_r:shell_data_file:s0 tclass=dir
      <5>[  744.988702] type=1400 audit(1389112469.578:188): avc:  denied  { call } for  pid=596 comm="Binder_3" scontext=u:r:surfaceflinger:s0 tcontext=u:r:shell:s0 tclass=binder
      
      This reverts commit a11c56e1.
      
      Bug: 12416329
      Change-Id: I7b72608c760c4087f73047ad751a5bd069fa2ec7
      5f290264
    • Nick Kralevich's avatar
      fix mediaserver selinux denials. · 740ce654
      Nick Kralevich authored
      mediaserver needs the ability to read media_rw_data_file files.
      Allow it. Similarly, this is also needed for drmserver. Addresses
      the following denials:
      
      <5>[   22.812859] type=1400 audit(1389041093.955:17): avc:  denied  { read } for  pid=1655 comm="MediaScannerSer" path="/data/media/0/DCIM/Camera/VID_20140106_124115.mp4" dev="mmcblk0p28" ino=122204 scontext=u:r:mediaserver:s0 tcontext=u:object_r:media_rw_data_file:s0 tclass=file
      <5>[   22.813103] type=1400 audit(1389041093.955:18): avc:  denied  { getattr } for  pid=849 comm="Binder_2" path="/data/media/0/DCIM/Camera/VID_20140106_124115.mp4" dev="mmcblk0p28" ino=122204 scontext=u:r:mediaserver:s0 tcontext=u:object_r:media_rw_data_file:s0 tclass=file
      <5>[   22.832041] type=1400 audit(1389041093.975:19): avc:  denied  { read } for  pid=849 comm="Binder_2" path="/data/media/0/DCIM/Camera/VID_20140106_124115.mp4" dev="mmcblk0p28" ino=122204 scontext=u:r:drmserver:s0 tcontext=u:object_r:media_rw_data_file:s0 tclass=file
      <5>[   52.357470] type=1400 audit(1389041123.494:29): avc:  denied  { read } for  pid=2757 comm="ImageLoader" path="/data/media/0/DCIM/Camera/VID_20140106_124520.mp4" dev="mmcblk0p28" ino=122211 scontext=u:r:mediaserver:s0 tcontext=u:object_r:media_rw_data_file:s0 tclass=file
      <5>[   52.357717] type=1400 audit(1389041123.494:30): avc:  denied  { getattr } for  pid=849 comm="Binder_2" path="/data/media/0/DCIM/Camera/VID_20140106_124520.mp4" dev="mmcblk0p28" ino=122211 scontext=u:r:mediaserver:s0 tcontext=u:object_r:media_rw_data_file:s0 tclass=file
      <5>[   52.382276] type=1400 audit(1389041123.524:31): avc:  denied  { read } for  pid=849 comm="Binder_2" path="/data/media/0/DCIM/Camera/VID_20140106_124520.mp4" dev="mmcblk0p28" ino=122211 scontext=u:r:drmserver:s0 tcontext=u:object_r:media_rw_data_file:s0 tclass=file
      
      Allow anyone who has access to video_device:chr_file to also
      have read access to video_device:dir. Otherwise, the
      chracter devices may not be reachable.
      
      Bug: 12416198
      Change-Id: I649cd52ec7f1a25afb3aea479482e3f270bfe074
      740ce654
    • Nick Kralevich's avatar
      surfaceflinger: fix bugreport screenshot functionality · 8decca39
      Nick Kralevich authored
      When a bugreport is triggered using the device keys,
      it generates a screenshot and places it into
      /data/data/com.android.shell/files/bugreports. SELinux is denying
      those writes.
      
      Addresses the following denials:
      
      <5> type=1400 audit(1389047451.385:23): avc:  denied  { call } for  pid=267 comm="Binder_1" scontext=u:r:surfaceflinger:s0 tcontext=u:r:dumpstate:s0 tclass=binder
      <5> type=1400 audit(1389046083.780:37): avc:  denied  { write } for  pid=4191 comm="dumpsys" path="/data/data/com.android.shell/files/bugreports/bugreport-2014-01-06-14-07-35.txt.tmp" dev="mmcblk0p28" ino=81874 scontext=u:r:surfaceflinger:s0 tcontext=u:object_r:shell_data_file:s0 tclass=file
      
      Bug: 12416329
      Change-Id: I318145591cda500094d98103d30b784df48a67be
      8decca39
  30. Jan 06, 2014
    • Nick Kralevich's avatar
      surfaceflinger: fix bugreport screenshot functionality · 3d770d25
      Nick Kralevich authored
      When a bugreport is triggered using the device keys,
      it generates a screenshot and places it into
      /data/data/com.android.shell/files/bugreports. SELinux is denying
      those writes.
      
      Addresses the following denials:
      
      <5> type=1400 audit(1389047451.385:23): avc:  denied  { call } for  pid=267 comm="Binder_1" scontext=u:r:surfaceflinger:s0 tcontext=u:r:dumpstate:s0 tclass=binder
      <5> type=1400 audit(1389046083.780:37): avc:  denied  { write } for  pid=4191 comm="dumpsys" path="/data/data/com.android.shell/files/bugreports/bugreport-2014-01-06-14-07-35.txt.tmp" dev="mmcblk0p28" ino=81874 scontext=u:r:surfaceflinger:s0 tcontext=u:object_r:shell_data_file:s0 tclass=file
      
      Bug: 12416329
      Change-Id: I318145591cda500094d98103d30b784df48a67be
      3d770d25
    • Nick Kralevich's avatar
      fix mediaserver selinux denials. · 37339c76
      Nick Kralevich authored
      mediaserver needs the ability to read media_rw_data_file files.
      Allow it. Similarly, this is also needed for drmserver. Addresses
      the following denials:
      
      <5>[   22.812859] type=1400 audit(1389041093.955:17): avc:  denied  { read } for  pid=1655 comm="MediaScannerSer" path="/data/media/0/DCIM/Camera/VID_20140106_124115.mp4" dev="mmcblk0p28" ino=122204 scontext=u:r:mediaserver:s0 tcontext=u:object_r:media_rw_data_file:s0 tclass=file
      <5>[   22.813103] type=1400 audit(1389041093.955:18): avc:  denied  { getattr } for  pid=849 comm="Binder_2" path="/data/media/0/DCIM/Camera/VID_20140106_124115.mp4" dev="mmcblk0p28" ino=122204 scontext=u:r:mediaserver:s0 tcontext=u:object_r:media_rw_data_file:s0 tclass=file
      <5>[   22.832041] type=1400 audit(1389041093.975:19): avc:  denied  { read } for  pid=849 comm="Binder_2" path="/data/media/0/DCIM/Camera/VID_20140106_124115.mp4" dev="mmcblk0p28" ino=122204 scontext=u:r:drmserver:s0 tcontext=u:object_r:media_rw_data_file:s0 tclass=file
      <5>[   52.357470] type=1400 audit(1389041123.494:29): avc:  denied  { read } for  pid=2757 comm="ImageLoader" path="/data/media/0/DCIM/Camera/VID_20140106_124520.mp4" dev="mmcblk0p28" ino=122211 scontext=u:r:mediaserver:s0 tcontext=u:object_r:media_rw_data_file:s0 tclass=file
      <5>[   52.357717] type=1400 audit(1389041123.494:30): avc:  denied  { getattr } for  pid=849 comm="Binder_2" path="/data/media/0/DCIM/Camera/VID_20140106_124520.mp4" dev="mmcblk0p28" ino=122211 scontext=u:r:mediaserver:s0 tcontext=u:object_r:media_rw_data_file:s0 tclass=file
      <5>[   52.382276] type=1400 audit(1389041123.524:31): avc:  denied  { read } for  pid=849 comm="Binder_2" path="/data/media/0/DCIM/Camera/VID_20140106_124520.mp4" dev="mmcblk0p28" ino=122211 scontext=u:r:drmserver:s0 tcontext=u:object_r:media_rw_data_file:s0 tclass=file
      
      Allow anyone who has access to video_device:chr_file to also
      have read access to video_device:dir. Otherwise, the
      chracter devices may not be reachable.
      
      Bug: 12416198
      Change-Id: I649cd52ec7f1a25afb3aea479482e3f270bfe074
      37339c76
  31. Dec 12, 2013
Loading