Skip to content
Snippets Groups Projects
  1. Jul 08, 2014
  2. Jun 23, 2014
    • Stephen Smalley's avatar
      Align SELinux property policy with init property_perms. · fee49159
      Stephen Smalley authored
      
      Introduce a net_radio_prop type for net. properties that can be
      set by radio or system.
      Introduce a system_radio_prop type for sys. properties that can be
      set by radio or system.
      Introduce a dhcp_prop type for properties that can be set by dhcp or system.
      Drop the rild_prop vs radio_prop distinction; this was an early
      experiment to see if we could separate properties settable by rild
      versus other radio UID processes but it did not pan out.
      
      Remove the ability to set properties from unconfineddomain.
      Allow init to set any property.  Allow recovery to set ctl_default_prop
      to restart adbd.
      
      Change-Id: I5ccafcb31ec4004dfefcec8718907f6b6f3e0dfd
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      fee49159
  3. May 14, 2014
  4. Mar 25, 2014
  5. Mar 10, 2014
    • Stephen Smalley's avatar
      Deduplicate neverallow rules on selinuxfs operations. · 853ffaad
      Stephen Smalley authored
      
      We already have neverallow rules for all domains about
      loading policy, setting enforcing mode, and setting
      checkreqprot, so we can drop redundant ones from netd and appdomain.
      Add neverallow rules to domain.te for setbool and setsecparam
      and exclude them from unconfined to allow fully eliminating
      separate neverallow rules on the :security class from anything
      other than domain.te.
      
      Change-Id: I0122e23ccb2b243f4c5376893e0c894f01f548fc
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      853ffaad
  6. Feb 25, 2014
    • Stephen Smalley's avatar
      Add a domain for mdnsd and allow connecting to it. · 9b3c3661
      Stephen Smalley authored
      
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      
      (cherry picked from commit 96ff4c05)
      
      Change-Id: Idfd734f07687925c1f35d2629d4b59d46822d0d4
      9b3c3661
    • Stephen Smalley's avatar
      Clean up socket rules. · 16011320
      Stephen Smalley authored
      
      Replace * or any permission set containing create with
      create_socket_perms or create_stream_socket_perms.
      
      Add net_domain() to all domains using network sockets and
      delete rules already covered by domain.te or net.te.
      
      For netlink_route_socket, only nlmsg_write needs to be separately
      granted to specific domains that are permitted to modify the routing
      table.   Clarification:  read/write permissions are just ability to
      perform read/recv() or write/send() on the socket, whereas nlmsg_read/
      nlmsg_write permissions control ability to observe or modify the
      underlying kernel state accessed via the socket.
      See security/selinux/nlmsgtab.c in the kernel for the mapping of
      netlink message types to nlmsg_read or nlmsg_write.
      
      Delete legacy rule for b/12061011.
      
      This change does not touch any rules where only read/write were allowed
      to a socket created by another domain (inherited across exec or
      received across socket or binder IPC).  We may wish to rewrite some or all
      of those rules with the rw_socket_perms macro but that is a separate
      change.
      
      Change-Id: Ib0637ab86f6d388043eff928e5d96beb02e5450e
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      16011320
    • Stephen Smalley's avatar
      Add a domain for mdnsd and allow connecting to it. · 96ff4c05
      Stephen Smalley authored
      
      Change-Id: I0a06fa32a46e515671b4e9a6f68e1a3f8b2c21a8
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      96ff4c05
    • Stephen Smalley's avatar
      Remove fsetid from netd. · d581b812
      Stephen Smalley authored
      
      fsetid checks are triggered by chmod on a directory or file owned by
      a group other than one of the groups assigned to the current process
      to see if the setgid bit should be cleared, regardless of whether the
      setgid bit was even set.  We do not appear to truly need this
      capability for netd to operate, so remove it.  Potential dontaudit
      candidate.
      
      Change-Id: I5ab4fbaaa056dcd1c7e60ec28632e7bc06f826bf
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      d581b812
  7. Jan 07, 2014
  8. Dec 16, 2013
  9. Nov 13, 2013
  10. Nov 08, 2013
  11. Sep 17, 2013
    • Geremy Condra's avatar
      Fix long-tail denials in enforcing domains. · 3bb1ccc2
      Geremy Condra authored
      The specific denials we see are:
      
      denied  { getattr } for  pid=169 comm=""installd"" path=""/data/data/com.android.providers.downloads/cache/downloadfile.jpeg"" dev=""mmcblk0p23"" ino=602861 scontext=u:r:installd:s0 tcontext=u:object_r:download_file:s0 tclass=file
      denied  { fsetid } for  pid=598 comm=""netd"" capability=4  scontext=u:r:netd:s0 tcontext=u:r:netd:s0 tclass=capability
      denied  { read } for  pid=209 comm=""installd"" name=""cache"" dev=""mmcblk0p28"" ino=81694 scontext=u:r:installd:s0 tcontext=u:object_r:download_file:s0 tclass=dir
      
      Bug: 10786017
      Change-Id: Ia5d0b6337f3de6a168ac0d5a77df2a1ac419ec29
      3bb1ccc2
  12. Sep 13, 2013
  13. Aug 05, 2013
  14. Jul 13, 2013
    • Nick Kralevich's avatar
      remove "self:process ptrace" from domain, netd neverallow rules · 9a19885c
      Nick Kralevich authored
      Remove "self:process ptrace" from all SELinux enforced domains.
      In general, a process should never need to ptrace itself.
      We can add this back to more narrowly scoped domains as needed.
      
      Add a bunch of neverallow assertions to netd.te, to verify that netd
      never gets unexpected capabilities.
      
      Change-Id: Ie862dc95bec84068536bb64705667e36210c5f4e
      9a19885c
  15. Jul 10, 2013
    • Nick Kralevich's avatar
      netd.te: allow ctl.mdnsd · 4a13f780
      Nick Kralevich authored
      Allow netd to set ctl.* properties. Currently, mdnsd is broken because
      it can't set this property.
      
      Bug: 9777774
      Change-Id: I2f32504d77b651e66e0a0067e65a5ed44b427f5a
      4a13f780
  16. Jun 28, 2013
    • Nick Kralevich's avatar
      Enable SELinux protections for netd. · dbd28d91
      Nick Kralevich authored
      This change does several things:
      
      1) Restore domain.te to the version present at
      cd516a32 . This is the version
      currently being distributed in AOSP.
      
      2) Add "allow domain properties_device:file r_file_perms;" to
      domain.te, to allow all domains to read /dev/__properties__ .
      This change was missing from AOSP.
      
      3) Restore netd.te to the version present at
      80c9ba52 . This is the version
      currently being distributed in AOSP.
      
      4) Remove anything involving module loading from netd.te. CTS
      enforces that Android kernels can't have module loading enabled.
      
      5) Add several new capabilities, plus data file rules, to
      netd.te, since netd needs to write to files owned by wifi.
      
      6) Add a new unconfined domain called dnsmasq.te, and allow
      transitions from netd to that domain. Over time, we'll tighten up
      the dnsmasq.te domain.
      
      7) Add a new unconfined domain called hostapd.te, and allow
      transitions from netd to that domain. Over time, we'll tighten up
      the hostapd.te domain.
      
      The net effect of these changes is to re-enable SELinux protections
      for netd. The policy is FAR from perfect, and allows a lot of wiggle
      room, but we can improve it over time.
      
      Testing: as much as possible, I've exercised networking related
      functionality, including turning on and off wifi, entering airplane
      mode, and enabling tethering and portable wifi hotspots. It's quite
      possible I've missed something, and if we experience problems, I
      can roll back this change.
      
      Bug: 9618347
      Change-Id: I23ff3eebcef629bc7baabcf6962f25f116c4a3c0
      dbd28d91
  17. May 20, 2013
    • repo sync's avatar
      Make all domains unconfined. · 77d4731e
      repo sync authored
      This prevents denials from being generated by the base policy.
      Over time, these rules will be incrementally tightened to improve
      security.
      
      Change-Id: I4be1c987a5d69ac784a56d42fc2c9063c402de11
      77d4731e
  18. May 15, 2013
  19. Apr 05, 2013
  20. Apr 04, 2013
  21. Mar 22, 2013
  22. Jan 06, 2012
  23. Jan 04, 2012
Loading