Skip to content
Snippets Groups Projects
  1. Mar 11, 2016
  2. Mar 03, 2016
    • Stephen Smalley's avatar
      Update netlink socket classes. · 01d95c23
      Stephen Smalley authored
      
      Define new netlink socket security classes introduced by upstream kernel commit
      6c6d2e9bde1c1c87a7ead806f8f5e2181d41a652 ("selinux: update netlink socket
      classes").  This was merged in Linux 4.2 and is therefore only required
      for Android kernels based on 4.2 or newer (e.g. the android-4.4 branch
      of the kernel/common tree).
      
      Add the new socket classes to socket_class_set.
      Add an initial set of allow rules although further refinement
      will likely be necessary.  Any allow rule previously written
      on :netlink_socket may need to be rewritten or duplicated for
      one or more of the more specific classes.  For now, we retain
      the existing :netlink_socket rules for compatibility on older kernels.
      
      Change-Id: I5040b30edd2d374538490a080feda96dd4bae5bf
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      01d95c23
  3. Feb 10, 2016
  4. Feb 03, 2016
    • Daichi Hirono's avatar
      Fix SELinux warning when passing fuse FD from system server. · 59e3d7b4
      Daichi Hirono authored
      Before applying the CL, Android shows the following error when passing
      FD of /dev/fuse.
      
      > Binder_2: type=1400 audit(0.0:38): avc: denied { getattr } for
      > path="/dev/fuse" dev="tmpfs" ino=9300 scontext=u:r:system_server:s0
      > tcontext=u:object_r:fuse_device:s0 tclass=chr_file permissive=0
      
      Change-Id: I59dec819d79d4e2e1a8e42523b6f521481cb2afd
      59e3d7b4
  5. Jan 26, 2016
    • dcashman's avatar
      Add adbd socket perms to system_server. · b037a6c9
      dcashman authored
      Commit 2fdeab37 added ability to debug
      over adbd for zygote-spawned apps, required by removal of domain_deprecated
      from untrusted_app.  This functionality is a core debugabble component
      of the android runtime, so it is needed by system_server as well.
      
      Bug: 26458796
      Change-Id: I29f5390122b3644449a5c3dcf4db2d0e969f6a9a
      b037a6c9
  6. Jan 19, 2016
    • Rubin Xu's avatar
      SELinux rule for ro.device_owner and persist.logd.security · 0c8286fe
      Rubin Xu authored
      They are introduced for the device owner process logging feature.
      That is, for enterprise-owned devices with device owner app provisioned,
      the device owner may choose to turn on additional device-wide logging for
      auditing and intrusion detection purposes. Logging includes histories of
      app process startup, commands issued over ADB and lockscreen unlocking
      attempts. These logs will available to the device owner for analysis,
      potentially shipped to a remote server if it chooses to.
      
      ro.device_owner will be a master switch to turn off logging, if the device
      has no device owner provisioned. persist.logd.security is a switch that
      device owner can toggle (via DevicePoliyManager) to enable/disable logging.
      Writing to both properties should be only allowed by the system server.
      
      Bug: 22860162
      Change-Id: Iabfe2347b094914813b9d6e0c808877c25ccd038
      0c8286fe
  7. Jan 04, 2016
    • Felipe Leme's avatar
      Creates a new permission for /cache/recovery · 549ccf77
      Felipe Leme authored
      This permission was created mostly for dumpstate (so it can include
      recovery files on bugreports when an OTA fails), but it was applied to
      uncrypt and recovery as well (since it had a wider access before).
      
      Grant access to cache_recovery_file where we previously granted access
      to cache_file. Add auditallow rules to determine if this is really
      needed.
      
      BUG: 25351711
      Change-Id: I07745181dbb4f0bde75694ea31b3ab79a4682f18
      549ccf77
    • dcashman's avatar
      Create sysfs_zram label. · 36f255ff
      dcashman authored
      Address following denials:
      avc: denied { getattr } for path="/sys/devices/virtual/block/zram0/disksize" dev="sysfs" ino=14958 scontext=u:r:init:s0 tcontext=u:object_r:sysfs_zram:s0 tclass=file permissive=0
      avc: denied { search } for name="zram0" dev="sysfs" ino=14903 scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs_zram:s0 tclass=dir permissive=0
      avc: denied { read } for name="mem_used_total" dev="sysfs" ino=14970 scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs_zram:s0 tclass=file permissive=0
      avc: denied { write } for name="uevent" dev="sysfs" ino=14904 scontext=u:r:ueventd:s0 tcontext=u:object_r:sysfs_zram:s0 tclass=file permissive=0
      avc: denied { open } for path="/sys/devices/virtual/block/zram0/uevent" dev="sysfs" ino=14904 scontext=u:r:ueventd:s0 tcontext=u:object_r:sysfs_zram:s0 tclass=file permissive=0
      avc: denied { read } for pid=348 comm="vold" name="zram0" dev="sysfs" ino=15223 scontext=u:r:vold:s0 tcontext=u:object_r:sysfs_zram:s0 tclass=dir permissive=0
      avc: denied { search } for pid=3494 comm="ContactsProvide" name="zram0"dev="sysfs" ino=15223 scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:sysfs_zram:s0 tclass=dir permissive=0
      
      Bug: 22032619
      Change-Id: I40cf918b7cafdba6cb3d42b04b1616a84e4ce158
      36f255ff
  8. Dec 24, 2015
    • Daichi Hirono's avatar
      Add new rules for appfuse. · a20802dd
      Daichi Hirono authored
      The new rules are used to allow to mount FUSE file system for priv-app.
      
      Change-Id: I5ce2d261be501e2b3fef09b7666f1e5d1cddbe52
      a20802dd
  9. Dec 18, 2015
  10. Dec 17, 2015
  11. Nov 24, 2015
  12. Nov 20, 2015
    • Nick Kralevich's avatar
      system_server: allow restorecon /data/system/users/0/fpdata · 4fd21606
      Nick Kralevich authored
      Addresses the following denial:
      
        avc: denied { relabelfrom } for pid=9971 comm="system_server" name="fpdata" dev="dm-0" ino=678683 scontext=u:r:system_server:s0 tcontext=u:object_r:system_data_file:s0 tclass=dir permissive=0
      
      Bug: 25801240
      Change-Id: I043f48f410505acaee4bb97446945316f656a210
      4fd21606
  13. Nov 16, 2015
  14. Nov 11, 2015
    • Calin Juravle's avatar
      Add SElinux rules for /data/misc/trace · f255d775
      Calin Juravle authored
      The directory is to be used in eng/userdebug build to store method
      traces (previously stored in /data/dalvik-cache/profiles).
      
      Bug: 25612377
      
      Change-Id: Ia4365a8d1f13d33ee54115dc5e3bf62786503993
      f255d775
  15. Nov 07, 2015
    • Nick Kralevich's avatar
      system_server: clean up stale rules · 142f97b7
      Nick Kralevich authored
      979adffd added an auditallow
      to see if system_server was relabeling system_data_file.
      The auditallow rule hasn't triggered, so remove the allow rule.
      
      a3c97a76 added an auditallow
      to see if system_server was executing toolbox. The auditallow
      rule hasn't triggered, so remove the allow rule. AFAIK,
      system_server never executes ANY file, so further tightening here
      is feasible.
      
      Change-Id: Ia0a93f3833e32c3e2c898463bd8813701a6dd20a
      142f97b7
  16. Nov 03, 2015
    • Jeff Vander Stoep's avatar
      Create attribute for moving perms out of domain · d22987b4
      Jeff Vander Stoep authored
      Motivation: Domain is overly permissive. Start removing permissions
      from domain and assign them to the domain_deprecated attribute.
      Domain_deprecated and domain can initially be assigned to all
      domains. The goal is to not assign domain_deprecated to new domains
      and to start removing domain_deprecated where it is not required or
      reassigning the appropriate permissions to the inheriting domain
      when necessary.
      
      Bug: 25433265
      Change-Id: I8b11cb137df7bdd382629c98d916a73fe276413c
      d22987b4
  17. Oct 14, 2015
    • Nick Kralevich's avatar
      system_server: (eng builds) remove JIT capabilities · 82bdd796
      Nick Kralevich authored
      23cde877 removed JIT capabilities
      from system_server for user and userdebug builds. Remove the capability
      from eng builds to be consistent across build types.
      
      Add a neverallow rule (compile time assertion + CTS test) to verify
      this doesn't regress on our devices or partner devices.
      
      Bug: 23468805
      Bug: 24915206
      Change-Id: Ib2154255c611b8812aa1092631a89bc59a27514b
      82bdd796
  18. Sep 14, 2015
    • Lorenzo Colitti's avatar
      Allow system_server to bind ping sockets. · 16c36f68
      Lorenzo Colitti authored
      This allows NetworkDiagnostics to send ping packets from specific
      source addresses in order to detect reachability problems on the
      reverse path.
      
      This addresses the following denial:
      
      [  209.744636] type=1400 audit(1441805730.510:14): avc: denied { node_bind } for pid=8347 comm="Thread-202" saddr=2400:xxxx:xxxx:xxxx:40b1:7e:a1d7:b3ae scontext=u:r:system_server:s0 tcontext=u:object_r:node:s0 tclass=rawip_socket permissive=0
      
      Bug: 23661687
      
      (cherry picked from commit c3712143)
      
      Change-Id: Ia93c14bc7fec17e2622e1b48bfbf591029d84be2
      16c36f68
  19. Sep 09, 2015
    • Lorenzo Colitti's avatar
      Allow system_server to bind ping sockets. · c3712143
      Lorenzo Colitti authored
      This allows NetworkDiagnostics to send ping packets from specific
      source addresses in order to detect reachability problems on the
      reverse path.
      
      This addresses the following denial:
      
      [  209.744636] type=1400 audit(1441805730.510:14): avc: denied { node_bind } for pid=8347 comm="Thread-202" saddr=2400:xxxx:xxxx:xxxx:40b1:7e:a1d7:b3ae scontext=u:r:system_server:s0 tcontext=u:object_r:node:s0 tclass=rawip_socket permissive=0
      
      Bug: 23661687
      Change-Id: Ia93c14bc7fec17e2622e1b48bfbf591029d84be2
      c3712143
  20. Sep 01, 2015
    • Jeff Vander Stoep's avatar
      system_server.te: remove policy load permissions · 0243e5cf
      Jeff Vander Stoep authored
      Remove system server's permission to dynamically update SELinux
      policy on the device.
      
      1) This functionality has never been used, so we have no idea if
      it works or not.
      
      2) If system_server is compromised, this functionality allows a
      complete bypass of the SELinux policy on the device. In particular,
      an attacker can force a regression of the following patch
        * https://android-review.googlesource.com/138510
      see also https://code.google.com/p/android/issues/detail?id=181826
      
      3) Dynamic policy update can be used to bypass neverallow protections
      enforced in CTS, by pushing a policy to the device after certification.
      Such an updated policy could bring the device out of compliance or
      deliberately introduce security weaknesses.
      
      Bug: 22885422
      Bug: 8949824
      Change-Id: I3c64d64359060561102e1587531836b69cfeef00
      0243e5cf
  21. 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
  22. Aug 24, 2015
  23. Aug 13, 2015
  24. Jul 29, 2015
  25. Jul 28, 2015
  26. 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
  27. Jun 09, 2015
    • Tao Bao's avatar
      Allow system server and uncrypt to operate pipe file · 51b33ac9
      Tao Bao authored
      System server and uncrypt need to communicate with a named pipe on the
      /cache partition. It will be created and deleted by system server.
      
      Bug: 20012567
      Bug: 20949086
      (cherry picked from commit 70c6dbf0)
      Change-Id: I4ddc523c2a0f4218877dae8f8a9b7fcf3f786625
      51b33ac9
  28. Jun 05, 2015
  29. Jun 04, 2015
  30. May 28, 2015
    • Tao Bao's avatar
      Allow system server and uncrypt to operate pipe file · 70c6dbf0
      Tao Bao authored
      System server and uncrypt need to communicate with a named pipe on the
      /cache partition. It will be created and deleted by system server.
      
      Bug: 20012567
      Bug: 20949086
      Change-Id: I9494a67016c23294e803ca39d377ec321537bca0
      70c6dbf0
  31. May 22, 2015
    • Jim Miller's avatar
      Selinux: Allow system_server to create fpdata dir. · a39b131e
      Jim Miller authored
      Fixes avc errors;
      avc: denied { relabelto } for name="fpdata" dev="mmcblk0p28" ino=586465 scontext=u:r:system_server:s0 tcontext=u:object_r:fingerprintd_data_file:s0 tclass=dir permissive=0
      avc: denied { read } for name="fpdata" dev="mmcblk0p28" ino=586409 scontext=u:r:system_server:s0 tcontext=u:object_r:fingerprintd_data_file:s0 tclass=dir permissive=0
      
      Change-Id: I3ba16af14632d803e09ac1490af9a0b652cba3a6
      a39b131e
  32. May 20, 2015
  33. May 18, 2015
  34. May 14, 2015
  35. May 13, 2015
Loading