Skip to content
Snippets Groups Projects
  1. Nov 18, 2016
  2. Nov 17, 2016
  3. Nov 16, 2016
    • Nick Kralevich's avatar
      shell.te: revoke syslog(2) access to shell user · c9630dc6
      Nick Kralevich authored
      external/toybox commit a583afc812cf7be74ebab72294c8df485908ff04 started
      having dmesg use /dev/kmsg, which is unreadable to the unprivileged
      shell user. Revoke syslog(2) to the shell user for consistency.
      
      The kernel dmesg log is a source of kernel pointers, which can leak
      kASLR information from the kernel. Restricting access to kernel
      information will make attacks against Android more difficult. Having
      said that, dmesg information is still available from "adb bugreport", so
      this change doesn't completely shutdown kernel info leaks.
      
      This change essentially reverts us to the state we were in between Nov 8
      2011 and May 27 2014. During that almost 3 year period, the unprivileged
      shell user was unable to access dmesg, and there was only one complaint
      during that time.
      
      References:
      * https://android.googlesource.com/platform/system/core/+/f9557fb
      * https://android.googlesource.com/platform/system/sepolicy/+/f821b5a
      
      TODO: Further unify /dev/kmsg permissions with syslog_read permissions.
      
      Test: policy compiles, no dmesg output
      Change-Id: Icfff6f765055bdbbe85f302b781aed2568ef532f
      c9630dc6
  4. Nov 15, 2016
    • Alex Deymo's avatar
      Move boot_control_hal attribute to hal_boot domain · 1f329465
      Alex Deymo authored
      Grant boot_control_hal permissions to the hal_boot service;
      update_engine and update_verifier can call that service rather
      than using those permissions themselves.
      
      Bug: 31864052
      Test: `bootctl set-active-boot-slot 1`
      Change-Id: I5188bc32e7933d4a0f5135b3246df119d3523d69
      1f329465
    • Treehugger Robot's avatar
      Merge "exclude su from app auditallow" · 747c69f4
      Treehugger Robot authored
      747c69f4
    • Nick Kralevich's avatar
      exclude su from app auditallow · e0d5c532
      Nick Kralevich authored
      su is an appdomain, and as such, any auditallow statements applicable to
      appdomain also apply to su. However, su is never enforced, so generating
      SELinux denials for such domains is pointless. Exclude su from
      ion_device auditallow rules.
      
      Addresses the following auditallow spam:
      
        avc: granted { ioctl } for comm="screencap" path="/dev/ion" dev="tmpfs"
        ino=10230 ioctlcmd=4906 scontext=u:r:su:s0
        tcontext=u:object_r:ion_device:s0 tclass=chr_file
      
      Test: policy compiles
      Change-Id: I2e783624b9e53ad365669bd6f2d4db40da475a16
      e0d5c532
    • Nick Kralevich's avatar
      isolated_app: allow access to pre-opened sdcard FDs · c121735f
      Nick Kralevich authored
      Allow isolated apps to read/write/append/lock already open sdcard
      file descriptors passed to it by normal app processes. isolated_apps are
      used by processes like Google drive when handling untrusted content.
      
      Addresses the following denial:
      
        audit(0.0:1508): avc: denied { read } for
        path="/storage/emulated/0/Download/02-corejava.pdf" dev="fuse" ino=310
        scontext=u:r:isolated_app:s0:c512,c768 tcontext=u:object_r:fuse:s0
        tclass=file permissive=0
      
      This partially reverts the tightening added in
      ce4b5eea.
      
      Add a TODO to consider removing isolated_apps ability to write or append
      to files on the sdcard. This limits the damage that can occur should the
      isolated_app process be compromised.
      
      Bug: 32896414
      Test: Policy compiles. Rule add only, so no possibility of breakage.
      Change-Id: Ia128569608fc9c872c90e6c380106b7c81eb7b6f
      c121735f
    • Daichi Hirono's avatar
      Allow apps to search appfuse mount point and open a file on appfuse mount point. · 4c7044e0
      Daichi Hirono authored
      Bug: 29970149
      Test: None
      Change-Id: I59f49f3bf20d93effde5e1a9a3c1ed64fbecb7a8
      4c7044e0
  5. Nov 14, 2016
    • Treehugger Robot's avatar
      41301ab7
    • Connor O'Brien's avatar
      35324445
    • Chad Brubaker's avatar
      Allow ephemeral apps network connections · 4abf491a
      Chad Brubaker authored
      Test: Verify that HTTP and HTTPS connections from ephemeral apps do not
      cause denials.
      Change-Id: I0ce25602906e63ec55d5b5869445f2aec10900cb
      4abf491a
    • 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
  6. Nov 12, 2016
  7. 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
    • Treehugger Robot's avatar
      Merge "property.te: sort entries" · 7da34af8
      Treehugger Robot authored
      7da34af8
    • 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
    • Nick Kralevich's avatar
      property.te: sort entries · 26c6d726
      Nick Kralevich authored
      Sort the entries in property.te. This will make it slightly easier to
      read, and avoids merge conflicts by discouraging the common practice of
      adding entries to the bottom of this file.
      
      Test: policy compiles.
      Change-Id: I87ae96b33156dba73fb7eafc0f9a2a961b689853
      26c6d726
  8. 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
  9. Nov 09, 2016
  10. Nov 08, 2016
    • Nick Kralevich's avatar
      Revert "Restore system_server ioctl socket access." · 58305da9
      Nick Kralevich authored
      The underlying ioctl denial was fixed in device-specific policy.
      It's not needed in core policy.
      
      A search of SELinux denials shows no reported denials, other than the
      ones showing up on marlin.
      
      This reverts commit ec3285cd.
      
      (cherrypicked from commit 863ce3e7)
      
      Test: AndroiTS GPS Test app shows GPS data, no SELinux denials.
      Bug: 32290392
      Change-Id: I1ba7bad43a2cdd7cdebbe1c8543a71eee765621d
      58305da9
    • Nick Kralevich's avatar
      profman/debuggerd: allow libart_file:file r_file_perms · 364fd197
      Nick Kralevich authored
      Addresses the following auditallow spam:
      
      avc: granted { read open } for comm="profman"
      path="/system/lib/libart.so" dev="dm-0" ino=1368 scontext=u:r:profman:s0
      tcontext=u:object_r:libart_file:s0 tclass=file
      
      avc: granted { read open } for comm="debuggerd64"
      path="/system/lib64/libart.so" dev="dm-0" ino=1897
      scontext=u:r:debuggerd:s0 tcontext=u:object_r:libart_file:s0 tclass=file
      
      avc: granted { getattr } for comm="debuggerd64"
      path="/system/lib64/libart.so" dev="dm-0" ino=1837
      scontext=u:r:debuggerd:s0 tcontext=u:object_r:libart_file:s0 tclass=file
      
      Test: Policy compiles. Not a tightening of rules.
      Change-Id: I501b0a6a343c61b3ca6283647a18a9a15deddf2a
      364fd197
    • Polina Bondarenko's avatar
      sepolicy: Add policy for thermal HIDL service · 9785f2ad
      Polina Bondarenko authored
      Bug: 32022261
      Test: manual
      Change-Id: I664a3b5c37f6a3a36e4e5beb91b384a9599c83f8
      9785f2ad
    • Nick Kralevich's avatar
      installd: r_dir_file(installd, system_file) · 68f23364
      Nick Kralevich authored
      Allow installd to read through files, directories, and symlinks
      on /system. This is needed to support installd using files in
      /system/app and /system/priv-app
      
      Addresses the following auditallow spam:
      
      avc: granted { getattr } for comm="installd"
      path="/system/app/Bluetooth/lib/arm/libbluetooth_jni.so"
      dev="mmcblk0p41" ino=19 scontext=u:r:installd:s0
      tcontext=u:object_r:system_file:s0 tclass=lnk_file
      
      avc: granted { getattr } for comm="installd"
      path="/system/priv-app/MtpDocumentsProvider/lib/arm64/libappfuse_jni.so"
      dev="dm-0" ino=2305 scontext=u:r:installd:s0
      tcontext=u:object_r:system_file:s0 tclass=lnk_file
      
      avc: granted { read open } for comm="installd"
      path="/system/priv-app/TelephonyProvider" dev="mmcblk0p43" ino=1839
      scontext=u:r:installd:s0 tcontext=u:object_r:system_file:s0 tclass=dir
      
      avc: granted { read } for comm="installd" name="Velvet" dev="mmcblk0p43"
      ino=1841 scontext=u:r:installd:s0 tcontext=u:object_r:system_file:s0
      tclass=dir
      
      avc: granted { read open } for comm="installd"
      path="/system/priv-app/GoogleOneTimeInitializer" dev="mmcblk0p43"
      ino=1778 scontext=u:r:installd:s0 tcontext=u:object_r:system_file:s0
      tclass=dir
      
      avc: granted { read open } for comm="installd"
      path="/system/app/PlayAutoInstallConfig" dev="mmcblk0p43" ino=112
      scontext=u:r:installd:s0 tcontext=u:object_r:system_file:s0 tclass=dir
      
      Test: policy compiles
      Change-Id: I5d14ea2cd7d281f949d0651b9723d5b7fae2e1f2
      68f23364
  11. Nov 07, 2016
    • Treehugger Robot's avatar
      b0c375d4
    • Roshan Pius's avatar
      wpa.te: Add binder permission back · cec44a61
      Roshan Pius authored
      Adding back the binder permission to access keystore from
      wpa_supplicant. This was removed by mistake in the previous patch
      (commit#: 6caeac) to add hwbinder permissions.
      
      Denials in logs:
      11-03 14:37:54.831  9011  9011 I auditd  : type=1400 audit(0.0:1490):
      avc: denied { call } for comm="wpa_supplicant" scontext=u:r:wpa:s0
      tcontext=u:r:servicemanager:s0 tclass=binder permissive=0
      11-03 14:37:54.831  9011  9011 W wpa_supplicant: type=1400
      audit(0.0:1490): avc: denied { call } for scontext=u:r:wpa:s0
      tcontext=u:r:servicemanager:s0 tclass=binder permissive=0
      11-03 14:37:55.838  9011  9011 I ServiceManager: Waiting for service
      android.security.keystore...
      11-03 14:37:55.834  9011  9011 I auditd  : type=1400 audit(0.0:1491):
      avc: denied { call } for comm="wpa_supplicant" scontext=u:r:wpa:s0
      tcontext=u:r:servicemanager:s0 tclass=binder permissive=0
      11-03 14:37:55.834  9011  9011 W wpa_supplicant: type=1400
      audit(0.0:1491): avc: denied { call } for scontext=u:r:wpa:s0
      tcontext=u:r:servicemanager:s0 tclass=binder permissive=0
      11-03 14:37:56.838  9011  9011 I ServiceManager: Waiting for service
      android.security.keystore...
      11-03 14:37:56.834  9011  9011 I auditd  : type=1400 audit(0.0:1492):
      avc: denied { call } for comm="wpa_supplicant" scontext=u:r:wpa:s0
      tcontext=u:r:servicemanager:s0 tclass=binder permissive=0
      11-03 14:37:56.834  9011  9011 W wpa_supplicant: type=1400
      audit(0.0:1492): avc: denied { call } for scontext=u:r:wpa:s0
      tcontext=u:r:servicemanager:s0 tclass=binder permissive=0
      11-03 14:37:57.839  9011  9011 I ServiceManager: Waiting for service
      android.security.keystore...
      11-03 14:37:57.834  9011  9011 I auditd  : type=1400 audit(0.0:1493):
      avc: denied { call } for comm="wpa_supplicant" scontext=u:r:wpa:s0
      tcontext=u:r:servicemanager:s0 tclass=binder permissive=0
      11-03 14:37:57.834  9011  9011 W wpa_supplicant: type=1400
      audit(0.0:1493): avc: denied { call } for scontext=u:r:wpa:s0
      tcontext=u:r:servicemanager:s0 tclass=binder permissive=0
      
      Bug: 32655747
      Test: Compiles. Will send for integration testing.
      Change-Id: Ic57a5bf0e6ea15770efc0d09f68d04b2db9ec1b8
      cec44a61
  12. Nov 06, 2016
  13. Nov 05, 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
    • dcashman's avatar
      Restore system_server ioctl socket access. · ec3285cd
      dcashman authored
      Bug: 32290392
      Test: Builds.
      Change-Id: I46e8af202b41131cfc9bb280f04a214859c9b0de
      ec3285cd
  15. Nov 03, 2016
  16. Nov 01, 2016
Loading