Skip to content
Snippets Groups Projects
Select Git revision
  • 60eff1f278b359d2775758ee5907ffac67fbf7aa
  • master default protected
  • android-7.1.2_r28_klist
  • pie-cts-release
  • pie-vts-release
  • pie-cts-dev
  • oreo-mr1-iot-release
  • sdk-release
  • oreo-m6-s4-release
  • oreo-m4-s12-release
  • pie-release
  • pie-r2-release
  • pie-r2-s1-release
  • oreo-vts-release
  • oreo-cts-release
  • oreo-dev
  • oreo-mr1-dev
  • pie-gsi
  • pie-platform-release
  • pie-dev
  • oreo-cts-dev
  • android-o-mr1-iot-release-1.0.4
  • android-9.0.0_r8
  • android-9.0.0_r7
  • android-9.0.0_r6
  • android-9.0.0_r5
  • android-8.1.0_r46
  • android-8.1.0_r45
  • android-n-iot-release-smart-display-r2
  • android-vts-8.1_r5
  • android-cts-8.1_r8
  • android-cts-8.0_r12
  • android-cts-7.1_r20
  • android-cts-7.0_r24
  • android-o-mr1-iot-release-1.0.3
  • android-cts-9.0_r1
  • android-8.1.0_r43
  • android-8.1.0_r42
  • android-n-iot-release-smart-display
  • android-p-preview-5
  • android-9.0.0_r3
41 results

security_classes

Blame
    • 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>
    security_classes 1.94 KiB
    # FLASK
    
    #
    # Define the security object classes
    #
    
    # Classes marked as userspace are classes
    # for userspace object managers
    
    class security
    class process
    class system
    class capability
    
    # file-related classes
    class filesystem
    class file
    class dir
    class fd
    class lnk_file
    class chr_file
    class blk_file
    class sock_file
    class fifo_file
    
    # network-related classes
    class socket
    class tcp_socket
    class udp_socket
    class rawip_socket
    class node
    class netif
    class netlink_socket
    class packet_socket
    class key_socket
    class unix_stream_socket
    class unix_dgram_socket
    
    # sysv-ipc-related classes
    class sem
    class msg
    class msgq
    class shm
    class ipc
    
    # extended netlink sockets
    class netlink_route_socket
    class netlink_firewall_socket
    class netlink_tcpdiag_socket
    class netlink_nflog_socket
    class netlink_xfrm_socket
    class netlink_selinux_socket
    class netlink_audit_socket
    class netlink_ip6fw_socket
    class netlink_dnrt_socket
    
    # IPSec association
    class association
    
    # Updated Netlink class for KOBJECT_UEVENT family.
    class netlink_kobject_uevent_socket
    
    class appletalk_socket
    
    class packet
    
    # Kernel access key retention
    class key
    
    class dccp_socket
    
    class memprotect
    
    # network peer labels
    class peer
    
    # Capabilities >= 32
    class capability2
    
    # kernel services that need to override task security, e.g. cachefiles
    class kernel_service
    
    class tun_socket
    
    class binder
    
    # Updated netlink classes for more recent netlink protocols.
    class netlink_iscsi_socket
    class netlink_fib_lookup_socket
    class netlink_connector_socket
    class netlink_netfilter_socket
    class netlink_generic_socket
    class netlink_scsitransport_socket
    class netlink_rdma_socket
    class netlink_crypto_socket
    
    # Capability checks when on a non-init user namespace
    class cap_userns
    class cap2_userns
    
    # Property service
    class property_service          # userspace
    
    # Service manager
    class service_manager           # userspace
    
    # Keystore Key
    class keystore_key              # userspace
    
    class drmservice                # userspace
    # FLASK