Skip to content
Snippets Groups Projects
  1. Jul 16, 2015
  2. 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
  3. 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
  4. Jul 10, 2015
  5. 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
  6. Jul 07, 2015
  7. Jun 30, 2015
  8. Jun 29, 2015
  9. Jun 27, 2015
  10. Jun 25, 2015
    • William Roberts's avatar
      check_seapp: add support for "neverallow" checks · 81e1f90c
      William Roberts authored
      
      Introduce "neverallow" rules for seapp_contexts. A neverallow rule is
      similar to the existing key-value-pair entries but the line begins
      with "neverallow". A neverallow violation is detected when all keys,
      both inputs and outputs are matched. The neverallow rules value
      parameter (not the key) can contain regular expressions to assist in
      matching. Neverallow rules are never output to the generated
      seapp_contexts file.
      
      Also, unless -o is specified, checkseapp runs in silent mode and
      outputs nothing. Specifying - as an argument to -o outputs to stdout.
      
      Sample Output:
      Error: Rule in File "external/sepolicy/seapp_contexts" on line 87: "user=fake domain=system_app type=app_data_file" violates neverallow in File "external/sepolicy/seapp_contexts" on line 57: "user=((?!system).)* domain=system_app"
      
      Change-Id: Ia4dcbf02feb774f2e201bb0c5d4ce385274d8b8d
      Signed-off-by: default avatarWilliam Roberts <william.c.roberts@intel.com>
      81e1f90c
    • Daniel Cashman's avatar
      33edd308
  11. Jun 23, 2015
    • William Roberts's avatar
      check_seapp: mac build memory leak · 7d65b547
      William Roberts authored
      
      rule_map_free() took as a parameter a boolean menu rule_map_switch
      that was used to determine if it should free the key pointer that
      is also in the table. On GLIBC variants, calls to hdestroy do not
      free the key pointer, on NON-GLIBC variants, it does. The original
      patch was meant to correct this, however, it always passes "destroy"
      as the rule_map_switch. On GLIBC variants this is fine, however on
      NON-GLIBC variants, that free was compiled out, and the free() was
      handled by hdestroy. In cases of failure where the rule_map was not
      in the htable, those key's were not properly free'd.
      
      Change-Id: Ifdf616e09862bca642a4d31bf0cb266168170e50
      Signed-off-by: default avatarWilliam Roberts <william.c.roberts@intel.com>
      7d65b547
    • Stephen Smalley's avatar
      neverallow PROT_EXEC stack or heap. · 5328d974
      Stephen Smalley authored
      
      Despite removing these from AOSP policy they seem to still be
      present in device policies.  Prohibit them via neverallow.
      
      We would also like to minimize execmem to only app domains
      and others using ART, but that will first require eliminating it
      from device-specific service domains (which may only have it
      due to prior incorrect handling of text relocations).
      
      Change-Id: Id1f49566779d9877835497d8ec7537abafadadc4
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      5328d974
    • Jeff Vander Stoep's avatar
      Fix grouper build by allowing mknod in recovery · 9c7570ef
      Jeff Vander Stoep authored
      Change-Id: I2aef01ba72cae028d5e05deddbdeff674f9a534d
      9c7570ef
    • Daniel Cashman's avatar
      Merge "Run idmap in its own domain." · 3cba84e2
      Daniel Cashman authored
      3cba84e2
    • Daniel Cashman's avatar
      Merge "drop unused option -s" · e956b315
      Daniel Cashman authored
      e956b315
    • William Roberts's avatar
      drop unused option -s · f26b6d42
      William Roberts authored
      
      Change-Id: I00aa4eeaf569c8108a7b6aab190be68e53b46597
      Signed-off-by: default avatarWilliam Roberts <william.c.roberts@intel.com>
      f26b6d42
    • Nick Kralevich's avatar
      Allow /dev/klog access, drop mknod and __null__ access · 31d88a70
      Nick Kralevich authored
      Allow vold, healthd, slideshow, and watchdogd access to /dev/kmsg.
      These processes log to the kernel dmesg ring buffer, so they need
      write access to that file.
      
      Addresses the following denials:
      
          avc: denied { write } for pid=134 comm="watchdogd" name="kmsg" dev="tmpfs" ino=9248 scontext=u:r:watchdogd:s0 tcontext=u:object_r:kmsg_device:s0 tclass=chr_file permissive=0
          avc: denied { write } for pid=166 comm="healthd" name="kmsg" dev="tmpfs" ino=9248 scontext=u:r:healthd:s0 tcontext=u:object_r:kmsg_device:s0 tclass=chr_file permissive=0
          avc: denied { write } for pid=180 comm="vold" name="kmsg" dev="tmpfs" ino=9248 scontext=u:r:vold:s0 tcontext=u:object_r:kmsg_device:s0 tclass=chr_file permissive=0
      
      These denials were triggered by the change in
      https://android-review.googlesource.com/151209 . Prior to that change,
      any code which called klog_init would (unnecessarily) create the
      device node themselves, rather than using the already existing device
      node.
      
      Drop special /dev/__null__ handling from watchdogd. As of
      https://android-review.googlesource.com/148288 , watchdogd no longer
      creates it's own /dev/null device, so it's unnecessary for us
      to allow for it.
      
      Drop mknod from healthd, slideshow, and watchdogd. healthd and slideshow
      only needed mknod to create /dev/__kmsg__, which is now obsolete.
      watchdogd only needed mknod to create /dev/__kmsg__ and /dev/__null__,
      which again is now obsolete.
      
      (cherry picked from e2651972)
      
      Bug: 21242418
      Change-Id: If01c8001084575e7441253f0fa8b4179ae33f534
      31d88a70
  12. Jun 19, 2015
    • Stephen Smalley's avatar
      Run idmap in its own domain. · b335e384
      Stephen Smalley authored
      
      Run idmap in its own domain rather than leaving it in installd's domain.
      This prevents misuse of installd's permissions by idmap.
      
      zygote also needs to run idmap.  For now, just run it in zygote's
      domain as it was previously since that is what is done for dex2oat
      invocation by zygote.  zygote appears to run idmap with system uid
      while installd runs it with app UIDs, so using different domains
      seems appropriate.
      
      Remove system_file execute_no_trans from both installd and zygote;
      this should no longer be needed with explicit labels for dex2oat and
      idmap.
      
      Change-Id: If47e2c1326b84c20e94a20f5e699300dce12bdfe
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      b335e384
    • William Roberts's avatar
      correct all error messages · 8d3a1b55
      William Roberts authored
      
      When an error occured it was erroneously being indicated that he
      file was the output file, not the input file.
      
      Before:
      Error: Could not find selinux type "fake_app" on line: 51 in file: out/target/product/flo/obj/ETC/seapp_contexts_intermediates/seapp_contexts
      Error: Could not validate
      Error: reading out/target/product/flo/obj/ETC/seapp_contexts_intermediates/seapp_contexts.tmp, line 51, name levelFrom, value user
      
      After:
      Error: Could not find selinux type "fake_app" on line: 51 in file: out/target/product/flo/obj/ETC/seapp_contexts_intermediates/seapp_contexts.tmp
      Error: Could not validate
      Error: reading out/target/product/flo/obj/ETC/seapp_contexts_intermediates/seapp_contexts.tmp, line 51, name levelFrom, value user
      
      Change-Id: Ib0e01f1f0ef563a2a150a0a3b4012e6e15d736bb
      Signed-off-by: default avatarWilliam Roberts <william.c.roberts@intel.com>
      8d3a1b55
  13. Jun 18, 2015
  14. Jun 16, 2015
  15. Jun 15, 2015
  16. Jun 13, 2015
  17. Jun 12, 2015
    • William Roberts's avatar
      check_seapp: Correct output on duplicate entries · 773d4126
      William Roberts authored
      
      If a duplicate entry is found, rule_map_cmp() incorrectly
      assumes that the lengths of the key value pairs should be
      equal, when this is not true. The duplicate detection is
      done on the input parameters, thus the lengths can be
      different. This resulted in a duplicate error string
      message of "do not match", instead of "match on all inputs".
      
      Also, the file name printed that contained the error was
      the output file, not the input file that contained it.
      
      Change-Id: I9b3f99fa4aa3454849de55f18b198b0b56e44320
      Signed-off-by: default avatarWilliam Roberts <william.c.roberts@intel.com>
      773d4126
  18. Jun 11, 2015
  19. Jun 10, 2015
  20. Jun 09, 2015
Loading