11da177e4SLinus Torvaldsconfig SECURITY_SELINUX 21da177e4SLinus Torvalds bool "NSA SELinux Support" 399f6d61bSStephen Smalley depends on SECURITY_NETWORK && AUDIT && NET && INET 4*4e5ab4cbSJames Morris select NETWORK_SECMARK 51da177e4SLinus Torvalds default n 61da177e4SLinus Torvalds help 71da177e4SLinus Torvalds This selects NSA Security-Enhanced Linux (SELinux). 81da177e4SLinus Torvalds You will also need a policy configuration and a labeled filesystem. 91da177e4SLinus Torvalds You can obtain the policy compiler (checkpolicy), the utility for 101da177e4SLinus Torvalds labeling filesystems (setfiles), and an example policy configuration 111da177e4SLinus Torvalds from <http://www.nsa.gov/selinux/>. 121da177e4SLinus Torvalds If you are unsure how to answer this question, answer N. 131da177e4SLinus Torvalds 141da177e4SLinus Torvaldsconfig SECURITY_SELINUX_BOOTPARAM 151da177e4SLinus Torvalds bool "NSA SELinux boot parameter" 161da177e4SLinus Torvalds depends on SECURITY_SELINUX 171da177e4SLinus Torvalds default n 181da177e4SLinus Torvalds help 191da177e4SLinus Torvalds This option adds a kernel parameter 'selinux', which allows SELinux 201da177e4SLinus Torvalds to be disabled at boot. If this option is selected, SELinux 211da177e4SLinus Torvalds functionality can be disabled with selinux=0 on the kernel 221da177e4SLinus Torvalds command line. The purpose of this option is to allow a single 231da177e4SLinus Torvalds kernel image to be distributed with SELinux built in, but not 241da177e4SLinus Torvalds necessarily enabled. 251da177e4SLinus Torvalds 261da177e4SLinus Torvalds If you are unsure how to answer this question, answer N. 271da177e4SLinus Torvalds 281da177e4SLinus Torvaldsconfig SECURITY_SELINUX_BOOTPARAM_VALUE 291da177e4SLinus Torvalds int "NSA SELinux boot parameter default value" 301da177e4SLinus Torvalds depends on SECURITY_SELINUX_BOOTPARAM 311da177e4SLinus Torvalds range 0 1 321da177e4SLinus Torvalds default 1 331da177e4SLinus Torvalds help 341da177e4SLinus Torvalds This option sets the default value for the kernel parameter 351da177e4SLinus Torvalds 'selinux', which allows SELinux to be disabled at boot. If this 361da177e4SLinus Torvalds option is set to 0 (zero), the SELinux kernel parameter will 371da177e4SLinus Torvalds default to 0, disabling SELinux at bootup. If this option is 381da177e4SLinus Torvalds set to 1 (one), the SELinux kernel parameter will default to 1, 391da177e4SLinus Torvalds enabling SELinux at bootup. 401da177e4SLinus Torvalds 411da177e4SLinus Torvalds If you are unsure how to answer this question, answer 1. 421da177e4SLinus Torvalds 431da177e4SLinus Torvaldsconfig SECURITY_SELINUX_DISABLE 441da177e4SLinus Torvalds bool "NSA SELinux runtime disable" 451da177e4SLinus Torvalds depends on SECURITY_SELINUX 461da177e4SLinus Torvalds default n 471da177e4SLinus Torvalds help 481da177e4SLinus Torvalds This option enables writing to a selinuxfs node 'disable', which 491da177e4SLinus Torvalds allows SELinux to be disabled at runtime prior to the policy load. 501da177e4SLinus Torvalds SELinux will then remain disabled until the next boot. 511da177e4SLinus Torvalds This option is similar to the selinux=0 boot parameter, but is to 521da177e4SLinus Torvalds support runtime disabling of SELinux, e.g. from /sbin/init, for 531da177e4SLinus Torvalds portability across platforms where boot parameters are difficult 541da177e4SLinus Torvalds to employ. 551da177e4SLinus Torvalds 561da177e4SLinus Torvalds If you are unsure how to answer this question, answer N. 571da177e4SLinus Torvalds 581da177e4SLinus Torvaldsconfig SECURITY_SELINUX_DEVELOP 591da177e4SLinus Torvalds bool "NSA SELinux Development Support" 601da177e4SLinus Torvalds depends on SECURITY_SELINUX 611da177e4SLinus Torvalds default y 621da177e4SLinus Torvalds help 631da177e4SLinus Torvalds This enables the development support option of NSA SELinux, 641da177e4SLinus Torvalds which is useful for experimenting with SELinux and developing 651da177e4SLinus Torvalds policies. If unsure, say Y. With this option enabled, the 661da177e4SLinus Torvalds kernel will start in permissive mode (log everything, deny nothing) 671da177e4SLinus Torvalds unless you specify enforcing=1 on the kernel command line. You 681da177e4SLinus Torvalds can interactively toggle the kernel between enforcing mode and 691da177e4SLinus Torvalds permissive mode (if permitted by the policy) via /selinux/enforce. 701da177e4SLinus Torvalds 711da177e4SLinus Torvaldsconfig SECURITY_SELINUX_AVC_STATS 721da177e4SLinus Torvalds bool "NSA SELinux AVC Statistics" 731da177e4SLinus Torvalds depends on SECURITY_SELINUX 741da177e4SLinus Torvalds default y 751da177e4SLinus Torvalds help 761da177e4SLinus Torvalds This option collects access vector cache statistics to 771da177e4SLinus Torvalds /selinux/avc/cache_stats, which may be monitored via 781da177e4SLinus Torvalds tools such as avcstat. 791da177e4SLinus Torvalds 801da177e4SLinus Torvaldsconfig SECURITY_SELINUX_CHECKREQPROT_VALUE 811da177e4SLinus Torvalds int "NSA SELinux checkreqprot default value" 821da177e4SLinus Torvalds depends on SECURITY_SELINUX 831da177e4SLinus Torvalds range 0 1 841da177e4SLinus Torvalds default 1 851da177e4SLinus Torvalds help 861da177e4SLinus Torvalds This option sets the default value for the 'checkreqprot' flag 871da177e4SLinus Torvalds that determines whether SELinux checks the protection requested 881da177e4SLinus Torvalds by the application or the protection that will be applied by the 891da177e4SLinus Torvalds kernel (including any implied execute for read-implies-exec) for 901da177e4SLinus Torvalds mmap and mprotect calls. If this option is set to 0 (zero), 911da177e4SLinus Torvalds SELinux will default to checking the protection that will be applied 921da177e4SLinus Torvalds by the kernel. If this option is set to 1 (one), SELinux will 931da177e4SLinus Torvalds default to checking the protection requested by the application. 941da177e4SLinus Torvalds The checkreqprot flag may be changed from the default via the 951da177e4SLinus Torvalds 'checkreqprot=' boot parameter. It may also be changed at runtime 961da177e4SLinus Torvalds via /selinux/checkreqprot if authorized by policy. 971da177e4SLinus Torvalds 981da177e4SLinus Torvalds If you are unsure how to answer this question, answer 1. 99*4e5ab4cbSJames Morris 100*4e5ab4cbSJames Morrisconfig SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT 101*4e5ab4cbSJames Morris bool "NSA SELinux enable new secmark network controls by default" 102*4e5ab4cbSJames Morris depends on SECURITY_SELINUX 103*4e5ab4cbSJames Morris default n 104*4e5ab4cbSJames Morris help 105*4e5ab4cbSJames Morris This option determines whether the new secmark-based network 106*4e5ab4cbSJames Morris controls will be enabled by default. If not, the old internal 107*4e5ab4cbSJames Morris per-packet controls will be enabled by default, preserving 108*4e5ab4cbSJames Morris old behavior. 109*4e5ab4cbSJames Morris 110*4e5ab4cbSJames Morris If you enable the new controls, you will need updated 111*4e5ab4cbSJames Morris SELinux userspace libraries, tools and policy. Typically, 112*4e5ab4cbSJames Morris your distribution will provide these and enable the new controls 113*4e5ab4cbSJames Morris in the kernel they also distribute. 114*4e5ab4cbSJames Morris 115*4e5ab4cbSJames Morris Note that this option can be overriden at boot with the 116*4e5ab4cbSJames Morris selinux_compat_net parameter, and after boot via 117*4e5ab4cbSJames Morris /selinux/compat_net. See Documentation/kernel-parameters.txt 118*4e5ab4cbSJames Morris for details on this parameter. 119*4e5ab4cbSJames Morris 120*4e5ab4cbSJames Morris If you enable the new network controls, you will likely 121*4e5ab4cbSJames Morris also require the SECMARK and CONNSECMARK targets, as 122*4e5ab4cbSJames Morris well as any conntrack helpers for protocols which you 123*4e5ab4cbSJames Morris wish to control. 124*4e5ab4cbSJames Morris 125*4e5ab4cbSJames Morris If you are unsure what do do here, select N. 126*4e5ab4cbSJames Morris 127