423fd19d91
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.
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
(cherry picked from commit 01d95c23ab
)
Change-Id: Ic00a0d474730cda91ba3bc387e0cc14482f82114
110 lines
1.9 KiB
Text
110 lines
1.9 KiB
Text
# 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
|
|
|
|
# Property service
|
|
class property_service # userspace
|
|
|
|
# Service manager
|
|
class service_manager # userspace
|
|
|
|
# Keystore Key
|
|
class keystore_key # userspace
|
|
|
|
# debuggerd service
|
|
class debuggerd # userspace
|
|
|
|
class drmservice # userspace
|
|
# FLASK
|