Skip to content
Snippets Groups Projects
  1. Aug 25, 2015
    • Stephen Smalley's avatar
      Only allow toolbox exec where /system exec was already allowed. · a3c97a76
      Stephen Smalley authored
      
      When the toolbox domain was introduced, we allowed all domains to exec it
      to avoid breakage.  However, only domains that were previously allowed the
      ability to exec /system files would have been able to do this prior to the
      introduction of the toolbox domain.  Remove the rule from domain.te and add
      rules to all domains that are already allowed execute_no_trans to system_file.
      Requires coordination with device-specific policy changes with the same Change-Id.
      
      Change-Id: Ie46209f0412f9914857dc3d7c6b0917b7031aae5
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      a3c97a76
  2. Aug 24, 2015
  3. Aug 22, 2015
  4. Aug 15, 2015
    • Nick Kralevich's avatar
      allow domain adbd:unix_stream_socket ioctl; · f4d39ca1
      Nick Kralevich authored
      https://android-review.googlesource.com/166419 changed the handling
      of non-interactive adb shells to use a socket instead of a PTY.
      When the stdin/stdout/stderr socket is received by /system/bin/sh,
      the code runs isatty() (ioctl TCGETS) to determine how to handle the
      file descriptor. This is denied by SELinux.
      
      Allow it for all domains.
      
      Addresses the following denial:
      
        avc: denied { ioctl } for pid=4394 comm="sh" path="socket:[87326]" dev="sockfs" ino=87326 ioctlcmd=5401 scontext=u:r:shell:s0 tcontext=u:r:adbd:s0 tclass=unix_stream_socket permissive=0
      
      TODO: When kernels are publicly available which support SELinux ioctl
      filtering, limit this just to ioctl 5401 (TCGETS) instead of all ioctls.
      
      Bug: 21215503
      Change-Id: I5c9394f27b8f198d96df14eac4b0c46ecb9b0898
      f4d39ca1
  5. Aug 14, 2015
    • Nick Kralevich's avatar
      mediaserver: remove /system/bin/toolbox exec access · bf65c7ef
      Nick Kralevich authored
      In Android 5.1, mediaserver couldn't execute any file on
      /system. This slightly regressed due to
      8a0c25ef, which granted mediaserver
      access to execute /system/bin/toolbox and /system/bin/toybox
      
      Revoke that unneeded access and add a neverallow rule to prevent
      regressions.
      
      TODO: Remove toolbox_exec:file execute permissions from domain.te
      and add it back to the specific domains that need it.
      
      Change-Id: Ia7bc6028a9ffb723d4623d91cbe15c8c1bbb2eb9
      bf65c7ef
  6. Aug 13, 2015
  7. Aug 12, 2015
    • Stephen Smalley's avatar
      checkfc: add support for comparing two file_contexts files. · 13b6b7e8
      Stephen Smalley authored
      
      Extend checkfc to support comparing two file_contexts or
      file_contexts.bin files.  This is for use by the CTS
      SELinuxHostTest to compare the AOSP general_file_contexts
      with the device file_contexts.bin file.
      
      Depends on I0fe63e0c7f11ae067b5aac2f468f7842e5d76986.
      
      Change-Id: I2fff2f8cf87690a76219ddf4cf38939650f34782
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      13b6b7e8
    • Richard Haines's avatar
      Update Android.mk to support file_contexts.bin · c2d01914
      Richard Haines authored
      
      This change supports external/libselinux changes to implement
      PCRE formatted binary file_contexts and general_file_contexts.bin
      files.
      
      The $(intermediates) directory will contain the original text file
      (that is no longer used on the device) with a .tmp extension as well
      as the .bin file to aid analysis.
      
      A CleanSpec.mk file is added to remove the old file_contexts file.
      
      Change-Id: I75a781100082c23536f70ce3603f7de42408b5ba
      Signed-off-by: default avatarRichard Haines <richard_c_haines@btinternet.com>
      c2d01914
  8. Aug 11, 2015
    • Dan Willemsen's avatar
      Don't assume ordering of $(wildcard ...) · bc2a49f2
      Dan Willemsen authored
      There are no guarantees on the order of the results from a call to the
      wildcard function. In fact, the order usually changes between make 3.81
      and make 4.0 (and kati).
      
      Instead, sort the results of wildcard in each sepolicy directory, so
      that directory order is preserved, but content ordering is reliable.
      
      Change-Id: I1620f89bbdd2b2902f2e0c40526e893ccf5f7775
      bc2a49f2
  9. Jul 30, 2015
  10. Jul 29, 2015
  11. Jul 28, 2015
  12. Jul 27, 2015
  13. Jul 24, 2015
  14. Jul 17, 2015
    • Colin Cross's avatar
      Use build fingerprint from file · 29a463d5
      Colin Cross authored
      Improve incremental ninja builds by keeping the command line the same
      across builds.
      
      Change-Id: Iedbaa40c9f816f91afc8f073a9ed7f9ffd5d9a53
      29a463d5
  15. Jul 16, 2015
  16. Jul 15, 2015
  17. Jul 14, 2015
    • Evgenii Stepanov's avatar
      Add /data/vendor/lib as a library location under ASan. · 8e16deb9
      Evgenii Stepanov authored
      This is in addition to /data/lib.
      Only affects SANITIZE_TARGET=address builds.
      
      Bug: 21785137
      Change-Id: Id1983cabb9479ae2d38fb23691de3eba236fe9cb
      8e16deb9
    • Nick Kralevich's avatar
      neverallow service_manager / service_manager_type · f2c4e128
      Nick Kralevich authored
      Init never uses / add service manager services. It doesn't make
      sense to allow these rules to init. Adding a rule of this type
      is typically caused by a process inappropriately running in init's
      SELinux domain, and the warning message:
      
        Warning!  Service %s needs a SELinux domain defined; please fix!
      
      is ignored.
      
      In addition, add neverallow rules to domain.te which prevent
      nonsense SELinux service_manager rules from being added.
      
      Change-Id: Id04a50d1826fe451a9ed216aa7ab249d0393cc57
      f2c4e128
  18. Jul 13, 2015
    • dcashman's avatar
      Merge "Allow domains to read tmpfs symlinks." · 10a3a36a
      dcashman authored
      10a3a36a
    • dcashman's avatar
      Allow domains to read tmpfs symlinks. · 2b0b8299
      dcashman authored
      Domains have the ability to read normal tmpfs files but not symlinks.
      Grant this ability.  In particular, allow domains to read /mnt/sdcard.
      
      Addresses the following denial:
      type=1400 audit(0.0:19):avc: denied { read } for comm=4173796E635461736B202333 name="sdcard" dev="tmpfs" ino=7475 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:tmpfs:s0 tclass=lnk_file permissive=0
      
      Bug: 20755029
      Change-Id: I0268eb00e0eb43feb2d5bca1723b87b7a44f31a9
      2b0b8299
    • dcashman's avatar
      Give /proc/iomem a more specific label. · 26cd912e
      dcashman authored
      /proc/iomem is currently given the proc label but contains system information
      which should not be available to all processes.
      
      Bug: 22008387
      Change-Id: I4f1821f40113a743ad986d13d8d130ed8b8abf2f
      26cd912e
  19. Jul 10, 2015
  20. Jul 08, 2015
    • William Roberts's avatar
      neverallow: domain execute data_file_type · 7028bdcc
      William Roberts authored
      
      To help reduce code injection paths, a neverallow is placed
      to prevent domain, sans untrusted_app and shell, execute
      on data_file_type. A few data_file_type's are also exempt
      from this rule as they label files that should be executable.
      
      Additional constraints, on top of the above, are placed on domains
      system_server and zygote. They can only execute data_file_type's
      of type dalvikcache_data_file.
      
      Change-Id: I15dafbce80ba2c85a03c23128eae4725703d5f02
      Signed-off-by: default avatarWilliam Roberts <william.c.roberts@intel.com>
      7028bdcc
Loading