Skip to content
Snippets Groups Projects
  • Stephen Smalley's avatar
    8a003607
    Define the user namespace capability classes and access vectors. · 8a003607
    Stephen Smalley authored
    
    Kernel commit 8e4ff6f228e4722cac74db716e308d1da33d744f
    (selinux: distinguish non-init user namespace capability checks)
    introduced support for distinguishing capability
    checks against a target associated with the init user namespace
    versus capability checks against a target associated with a non-init
    user namespace by defining and using separate security classes for the
    latter.  This support is needed on Linux to support e.g. Chrome usage of
    user namespaces for the Chrome sandbox without needing to allow Chrome to
    also exercise capabilities on targets in the init user namespace.
    
    Define the new security classes and access vectors for the Android policy.
    Refactor the original capability and capability2 access vector definitions
    as common declarations to allow reuse by the new cap_userns and cap2_userns
    classes.
    
    This change does not allow use of the new classes by any domain; that
    is deferred to future changes as needed if/when Android enables user
    namespaces and the Android version of Chrome starts using them.
    
    The kernel support went upstream in Linux 4.7.
    
    Based on the corresponding refpolicy patch by Chris PeBenito, but
    reworked for the Android policy.
    
    Test: policy builds
    
    Change-Id: I71103d39e93ee0e8c24816fca762944d047c2235
    Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
    8a003607
    History
    Define the user namespace capability classes and access vectors.
    Stephen Smalley authored
    
    Kernel commit 8e4ff6f228e4722cac74db716e308d1da33d744f
    (selinux: distinguish non-init user namespace capability checks)
    introduced support for distinguishing capability
    checks against a target associated with the init user namespace
    versus capability checks against a target associated with a non-init
    user namespace by defining and using separate security classes for the
    latter.  This support is needed on Linux to support e.g. Chrome usage of
    user namespaces for the Chrome sandbox without needing to allow Chrome to
    also exercise capabilities on targets in the init user namespace.
    
    Define the new security classes and access vectors for the Android policy.
    Refactor the original capability and capability2 access vector definitions
    as common declarations to allow reuse by the new cap_userns and cap2_userns
    classes.
    
    This change does not allow use of the new classes by any domain; that
    is deferred to future changes as needed if/when Android enables user
    namespaces and the Android version of Chrome starts using them.
    
    The kernel support went upstream in Linux 4.7.
    
    Based on the corresponding refpolicy patch by Chris PeBenito, but
    reworked for the Android policy.
    
    Test: policy builds
    
    Change-Id: I71103d39e93ee0e8c24816fca762944d047c2235
    Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>