Skip to content
Snippets Groups Projects
  1. May 30, 2014
  2. May 29, 2014
    • Stephen Smalley's avatar
      Clean up kernel, init, and recovery domains. · eb1bbf26
      Stephen Smalley authored
      
      Narrow the relabelto rules to a more specific type set
      for each domain.
      
      Drop mount permissions from the kernel domain since mounting
      occurs after switching to the init domain.  This was likely
      a residual of when all processes were left in the kernel domain
      on a recovery boot due to the missing setcon statement in the
      recovery init.rc.
      
      Be consistent with unlabeled filesystems (i.e. filesystems
      without any matching fs_use or genfs_contexts entry) so
      that we can also unmount them.
      
      Add comments to note the reason for various rules.
      
      Change-Id: I269a1744ed7bf8c6be899494c5dc97847e5a994d
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      eb1bbf26
    • Nick Kralevich's avatar
      Remove /system write from unconfined · 03ce5120
      Nick Kralevich authored
      Don't allow writes to /system from unconfined domains.
      /system is always mounted read-only, and no process should
      ever need to write there.
      
      Allow recovery to write to /system. This is needed to apply OTA
      images.
      
      Change-Id: I11aa8bd0c3b7f53ebe83806a0547ab8d5f25f3c9
      03ce5120
  3. May 23, 2014
    • Stephen Smalley's avatar
      Restrict requesting contexts other than policy-defined defaults. · 356f4be6
      Stephen Smalley authored
      
      Writing to the /proc/self/attr files (encapsulated by the libselinux
      set*con functions) enables a program to request a specific security
      context for various operations instead of the policy-defined defaults.
      The security context specified using these calls is checked by an
      operation-specific permission, e.g. dyntransition for setcon,
      transition for setexeccon, create for setfscreatecon or
      setsockcreatecon, but the ability to request a context at all
      is controlled by a process permission.  Omit these permissions from
      domain.te and only add them back where required so that only specific
      domains can even request a context other than the default defined by
      the policy.
      
      Change-Id: I6a2fb1279318625a80f3ea8e3f0932bdbe6df676
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      356f4be6
  4. May 14, 2014
    • Stephen Smalley's avatar
      Drop unused rules for raw I/O and mknod. · c2c91bba
      Stephen Smalley authored
      
      We added these rules to the recovery domain when we removed them
      from unconfined to ensure that we did not break anything. But we
      have seen no uses of these rules by the recovery domain.  Tested
      wiping userdata and cache from the recovery and performing an
      adb sideload of an ota zip file.
      
      Change-Id: I261cb1124130f73e98b87f3e5a31d6d7f521ff11
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      c2c91bba
  5. May 09, 2014
  6. Feb 12, 2014
  7. Feb 11, 2014
  8. Jan 30, 2014
    • Stephen Smalley's avatar
      Remove MAC capabilities from unconfined domains. · 04ee5dfb
      Stephen Smalley authored
      
      Linux defines two capabilities for Mandatory Access Control (MAC)
      security modules, CAP_MAC_OVERRIDE (override MAC access restrictions)
      and CAP_MAC_ADMIN (allow MAC configuration or state changes).
      SELinux predates these capabilities and did not originally use them,
      but later made use of CAP_MAC_ADMIN as a way to control the ability
      to set security context values unknown to the currently loaded
      SELinux policy on files.  That facility is used in Linux for e.g.
      livecd creation where a file security context that is being set
      on a generated filesystem is not known to the build host policy.
      Internally, files with such labels are treated as having the unlabeled
      security context for permission checking purposes until/unless the
      context is later defined through a policy reload.
      
      CAP_MAC_OVERRIDE is never checked by SELinux, so it never needs
      to be allowed.  CAP_MAC_ADMIN is only checked if setting an
      unknown security context value; the only legitimate use I can see
      in Android is the recovery console, where a context may need to be set
      on /system that is not defined in the recovery policy.
      
      Remove these capabilities from unconfined domains, allow
      mac_admin for the recovery domain, and add neverallow rules.
      
      Change-Id: Ief673e12bc3caf695f3fb67cabe63e68f5f58150
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      04ee5dfb
  9. Jan 13, 2014
Loading