Skip to content
Snippets Groups Projects
  1. Nov 04, 2016
  2. Nov 03, 2016
  3. Nov 01, 2016
  4. Oct 31, 2016
  5. Oct 29, 2016
    • Nick Kralevich's avatar
      system_server: allow appendable file descriptors · 8044129f
      Nick Kralevich authored
      system_server is currently allowed write (but not open) access to
      various app file descriptor types, to allow it to perform write
      operations on file descriptors passed to it from Android processes.
      However, system_server was not allowed to handle file descriptors
      open only for append operations.
      
      Write operations are a superset of that allowed by appendable
      operations, so it makes no sense to deny system_server the use of
      appendable file descriptors. Allow it for app data types, as well as a
      few other types (for robustness).
      
      Addresses the following denial generated when adb bugreport is run:
      
        type=1400 audit(0.0:12): avc: denied { append } for
        path="/data/user_de/0/com.android.shell/files/bugreports/bugreport-MASTER-2016-10-29-08-13-50-dumpstate_log-6214.txt"
        dev="dm-2" ino=384984 scontext=u:r:system_server:s0
        tcontext=u:object_r:shell_data_file:s0 tclass=file permissive=0
      
      Bug: 32246161
      Test: policy compiles
      Test: No more append denials when running adb shell am bug-report --progress
      Change-Id: Ia4e81cb0b3c3580fa9130952eedaed9cab3e8487
      8044129f
    • Nick Kralevich's avatar
      Get rid of more auditallow spam · 2c8ea36a
      Nick Kralevich authored
      Addresses the following audit messages:
      
      [    7.984957] type=1400 audit(33873666.610:40): avc: granted { getattr
      } for pid=1 comm="init" name="system@framework@boot-ext.art" dev="dm-2"
      ino=106324 scontext=u:r:init:s0
      tcontext=u:object_r:dalvikcache_data_file:s0 tclass=file
      
      [   65.528068] type=1400 audit(1477751916.508:96): avc: granted { search
      } for pid=6330 comm="main" name="/" dev="cgroup" ino=12428
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:cgroup:s0 tclass=dir
      
      [   65.530425] type=1400 audit(1477751916.508:97): avc: granted { search
      } for pid=6330 comm="main" name="/" dev="cgroup" ino=12428
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:cgroup:s0 tclass=dir
      
      [   65.530487] type=1400 audit(1477751916.508:98): avc: granted { open }
      for pid=6330 comm="main" path="/dev/cpuctl/tasks" dev="cgroup" ino=12429
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:cgroup:s0 tclass=file
      
      [   65.530800] type=1400 audit(1477751916.508:98): avc: granted { open }
      for pid=6330 comm="main" path="/dev/cpuctl/tasks" dev="cgroup" ino=12429
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:cgroup:s0 tclass=file
      
      [   65.530842] type=1400 audit(1477751916.508:99): avc: granted { search
      } for pid=6330 comm="main" name="/" dev="cgroup" ino=12428
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:cgroup:s0 tclass=dir
      
      [   65.531138] type=1400 audit(1477751916.508:99): avc: granted { search
      } for pid=6330 comm="main" name="/" dev="cgroup" ino=12428
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:cgroup:s0 tclass=dir
      
      [   65.531176] type=1400 audit(1477751916.508:100): avc: granted {
      search } for pid=6330 comm="main" name="bg_non_interactive" dev="cgroup"
      ino=12444 scontext=u:r:dumpstate:s0 tcontext=u:object_r:cgroup:s0
      tclass=dir
      
      [   65.531465] type=1400 audit(1477751916.508:100): avc: granted {
      search } for pid=6330 comm="main" name="bg_non_interactive" dev="cgroup"
      ino=12444 scontext=u:r:dumpstate:s0 tcontext=u:object_r:cgroup:s0
      tclass=dir
      
      [   65.531502] type=1400 audit(1477751916.508:101): avc: granted { open
      } for pid=6330 comm="main" path="/dev/cpuctl/bg_non_interactive/tasks"
      dev="cgroup" ino=12445 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:cgroup:s0 tclass=file
      
      [   65.531789] type=1400 audit(1477751916.508:101): avc: granted { open
      } for pid=6330 comm="main" path="/dev/cpuctl/bg_non_interactive/tasks"
      dev="cgroup" ino=12445 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:cgroup:s0 tclass=file
      
      [   65.531827] type=1400 audit(1477751916.508:102): avc: granted {
      search } for pid=6330 comm="main" name="/" dev="cgroup" ino=12459
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:cgroup:s0 tclass=dir
      
      [   65.713056] type=1400 audit(1477751916.508:102): avc: granted {
      search } for pid=6330 comm="main" name="/" dev="cgroup" ino=12459
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:cgroup:s0 tclass=dir
      
      Bug: 32246161
      Test: policy compiles
      Test: dumpstate no longer generates the audit messages above.
      Change-Id: Id5afe2ebeb24f8a7407aac1a0a09806b1521b0e4
      2c8ea36a
  6. Oct 28, 2016
    • Treehugger Robot's avatar
      Merge changes I5bbbcad3,Ifa4630ed · ece32729
      Treehugger Robot authored
      * changes:
        wifi_hal: Rename to 'hal_wifi'
        wpa: Add permissions for hwbinder
      ece32729
    • Nick Kralevich's avatar
      Get rid of auditallow spam. · 79a08e13
      Nick Kralevich authored
      Fixes the following SELinux messages when running adb bugreport:
      
      avc: granted { read } for name="libart.so" dev="dm-0" ino=1886
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:libart_file:s0 tclass=file
      
      avc: granted { read open } for path="/system/lib64/libart.so" dev="dm-0"
      ino=1886 scontext=u:r:dumpstate:s0 tcontext=u:object_r:libart_file:s0
      tclass=file
      
      avc: granted { getattr } for path="/system/lib64/libart.so" dev="dm-0"
      ino=1886 scontext=u:r:dumpstate:s0 tcontext=u:object_r:libart_file:s0
      tclass=file
      
      avc: granted { read } for path="/system/lib64/libart.so" dev="dm-0"
      ino=1886 scontext=u:r:dumpstate:s0 tcontext=u:object_r:libart_file:s0
      tclass=file
      
      avc: granted { read } for path="/system/lib64/libart.so" dev="dm-0"
      ino=1886 scontext=u:r:dumpstate:s0 tcontext=u:object_r:libart_file:s0
      tclass=file
      
      avc: granted { read } for path="/system/lib64/libart.so" dev="dm-0"
      ino=1886 scontext=u:r:dumpstate:s0 tcontext=u:object_r:libart_file:s0
      tclass=file
      
      avc: granted { read } for path="/system/lib64/libart.so" dev="dm-0"
      ino=1886 scontext=u:r:dumpstate:s0 tcontext=u:object_r:libart_file:s0
      tclass=file
      
      avc: granted { read execute } for path="/system/lib64/libart.so"
      dev="dm-0" ino=1886 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:libart_file:s0 tclass=file
      
      avc: granted { read } for path="/system/lib64/libart.so" dev="dm-0"
      ino=1886 scontext=u:r:dumpstate:s0 tcontext=u:object_r:libart_file:s0
      tclass=file
      
      avc: granted { read } for path="/system/lib64/libart.so" dev="dm-0"
      ino=1886 scontext=u:r:dumpstate:s0 tcontext=u:object_r:libart_file:s0
      tclass=file
      
      avc: granted { search } for name="dalvik-cache" dev="dm-2" ino=106289
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:dalvikcache_data_file:s0
      tclass=dir
      
      avc: granted { getattr } for path="/data/dalvik-cache/arm64" dev="dm-2"
      ino=106290 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:dalvikcache_data_file:s0 tclass=dir
      
      avc: granted { search } for name="dalvik-cache" dev="dm-2" ino=106289
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:dalvikcache_data_file:s0
      tclass=dir
      
      avc: granted { search } for name="arm64" dev="dm-2" ino=106290
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:dalvikcache_data_file:s0
      tclass=dir
      
      avc: granted { getattr } for
      path="/data/dalvik-cache/arm64/system@framework@boot.art" dev="dm-2"
      ino=106318 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:dalvikcache_data_file:s0 tclass=file
      
      avc: granted { search } for name="dalvik-cache" dev="dm-2" ino=106289
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:dalvikcache_data_file:s0
      tclass=dir
      
      avc: granted { search } for name="arm64" dev="dm-2" ino=106290
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:dalvikcache_data_file:s0
      tclass=dir
      
      avc: granted { read } for name="system@framework@boot.art" dev="dm-2"
      ino=106318 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:dalvikcache_data_file:s0 tclass=file
      
      avc: granted { read open } for
      path="/data/dalvik-cache/arm64/system@framework@boot.art" dev="dm-2"
      ino=106318 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:dalvikcache_data_file:s0 tclass=file
      
      avc: granted { search } for name="dalvik-cache" dev="dm-2" ino=106289
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:dalvikcache_data_file:s0
      tclass=dir
      
      [  169.349480] type=1400 audit(1477679159.734:129): avc: granted { read
      } for pid=6413 comm="main" name="ipv6_route" dev="proc" ino=4026535947
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.350030] type=1400 audit(1477679159.734:130): avc: granted { read
      open } for pid=6413 comm="main" path="/proc/6413/net/ipv6_route"
      dev="proc" ino=4026535947 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.350361] type=1400 audit(1477679159.734:130): avc: granted { read
      open } for pid=6413 comm="main" path="/proc/6413/net/ipv6_route"
      dev="proc" ino=4026535947 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.350399] type=1400 audit(1477679159.734:131): avc: granted {
      getattr } for pid=6413 comm="main" path="/proc/6413/net/ipv6_route"
      dev="proc" ino=4026535947 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.350963] type=1400 audit(1477679159.734:131): avc: granted {
      getattr } for pid=6413 comm="main" path="/proc/6413/net/ipv6_route"
      dev="proc" ino=4026535947 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.351002] type=1400 audit(1477679159.734:132): avc: granted { read
      } for pid=6413 comm="main" name="if_inet6" dev="proc" ino=4026535946
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.351330] type=1400 audit(1477679159.734:132): avc: granted { read
      } for pid=6413 comm="main" name="if_inet6" dev="proc" ino=4026535946
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.351366] type=1400 audit(1477679159.734:133): avc: granted { read
      open } for pid=6413 comm="main" path="/proc/6413/net/if_inet6"
      dev="proc" ino=4026535946 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.351861] type=1400 audit(1477679159.734:133): avc: granted { read
      open } for pid=6413 comm="main" path="/proc/6413/net/if_inet6"
      dev="proc" ino=4026535946 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.351910] type=1400 audit(1477679159.734:134): avc: granted {
      getattr } for pid=6413 comm="main" path="/proc/6413/net/if_inet6"
      dev="proc" ino=4026535946 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.353105] type=1400 audit(1477679159.734:134): avc: granted {
      getattr } for pid=6413 comm="main" path="/proc/6413/net/if_inet6"
      dev="proc" ino=4026535946 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.353186] type=1400 audit(1477679159.734:135): avc: granted { read
      } for pid=6413 comm="main" name="if_inet6" dev="proc" ino=4026535946
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.353594] type=1400 audit(1477679159.734:135): avc: granted { read
      } for pid=6413 comm="main" name="if_inet6" dev="proc" ino=4026535946
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.353636] type=1400 audit(1477679159.734:136): avc: granted { read
      open } for pid=6413 comm="main" path="/proc/6413/net/if_inet6"
      dev="proc" ino=4026535946 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.354230] type=1400 audit(1477679159.734:136): avc: granted { read
      open } for pid=6413 comm="main" path="/proc/6413/net/if_inet6"
      dev="proc" ino=4026535946 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.354437] type=1400 audit(1477679159.734:137): avc: granted {
      getattr } for pid=6413 comm="main" path="/proc/6413/net/if_inet6"
      dev="proc" ino=4026535946 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.395359] type=1400 audit(1477679159.734:137): avc: granted {
      getattr } for pid=6413 comm="main" path="/proc/6413/net/if_inet6"
      dev="proc" ino=4026535946 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      Test: policy compiles
      Test: adb bugreport runs without auditallow messages above.
      Bug: 32246161
      Change-Id: Ie0ab2ed3c6babc1f93d3b8ae47c92dd905ebc93a
      79a08e13
    • 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
  7. Oct 27, 2016
  8. Oct 26, 2016
    • Roshan Pius's avatar
      wpa: Add permissions for hwbinder · 6caeac7b
      Roshan Pius authored
      Modify permissions for wpa_supplicant to use hwbinder (for HIDL),
      instead of binder.
      
      Denials:
      01-15 14:31:58.573   541   541 W wpa_supplicant: type=1400
      audit(0.0:10): avc: denied { call } for scontext=u:r:wpa:s0
      tcontext=u:r:hwservicemanager:s0 tclass=binder permissive=0
      01-15 14:31:58.573   541   541 W wpa_supplicant: type=1400
      audit(0.0:11): avc: denied { call } for scontext=u:r:wpa:s0
      tcontext=u:r:hwservicemanager:s0 tclass=binder permissive=0
      
      BUG: 31365276
      Test: Compiled and ensured that the selinux denials are no longer
      present in logs.
      
      Change-Id: Ifa4630edea6ec5a916b3940f9a03ef9dc6fc9af2
      6caeac7b
    • Treehugger Robot's avatar
      70591fed
    • Jeff Vander Stoep's avatar
      Rename macros for (non)binderized HALs · f579ef15
      Jeff Vander Stoep authored
      Test: builds
      Bug: 32243668
      Change-Id: I1ad4b53003462e932cf80b6972db1520dc66d735
      f579ef15
    • Jeff Vander Stoep's avatar
      clean up hal types · 27ae545a
      Jeff Vander Stoep authored
      Bug: 32123421
      Test: build Hikey
      Change-Id: Iaf02626f3f3a94104c0f9d746c3cf5f20751a27d
      27ae545a
  9. Oct 25, 2016
  10. Oct 24, 2016
  11. Oct 21, 2016
  12. Oct 20, 2016
  13. Oct 19, 2016
  14. Oct 18, 2016
    • Prashant Malani's avatar
      Add sysfs rule for vibrator in system_server · c86eb96f
      Prashant Malani authored
      Helps fix vibrator HAL open issue
      
      avc: denied { write } for pid=907 comm="system_server" name="enable" dev="sysfs" ino=20423 scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs_vibrator:s0 tclass=file permissive=0
      
      Bug: 32209928
      Bug: 32225232
      
      Test: m, booted, tested keypad to make sure vibrator works
      Change-Id: I4977c42b7fac0c9503be04b6520487f2d6cbc903
      c86eb96f
Loading