Kconfig 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. #
  2. # Security configuration
  3. #
  4. menu "Security options"
  5. source security/keys/Kconfig
  6. config SECURITY_DMESG_RESTRICT
  7. bool "Restrict unprivileged access to the kernel syslog"
  8. default n
  9. help
  10. This enforces restrictions on unprivileged users reading the kernel
  11. syslog via dmesg(8).
  12. If this option is not selected, no restrictions will be enforced
  13. unless the dmesg_restrict sysctl is explicitly set to (1).
  14. If you are unsure how to answer this question, answer N.
  15. config SECURITY
  16. bool "Enable different security models"
  17. depends on SYSFS
  18. depends on MULTIUSER
  19. help
  20. This allows you to choose different security modules to be
  21. configured into your kernel.
  22. If this option is not selected, the default Linux security
  23. model will be used.
  24. If you are unsure how to answer this question, answer N.
  25. config SECURITYFS
  26. bool "Enable the securityfs filesystem"
  27. help
  28. This will build the securityfs filesystem. It is currently used by
  29. the TPM bios character driver and IMA, an integrity provider. It is
  30. not used by SELinux or SMACK.
  31. If you are unsure how to answer this question, answer N.
  32. config SECURITY_NETWORK
  33. bool "Socket and Networking Security Hooks"
  34. depends on SECURITY
  35. help
  36. This enables the socket and networking security hooks.
  37. If enabled, a security module can use these hooks to
  38. implement socket and networking access controls.
  39. If you are unsure how to answer this question, answer N.
  40. config SECURITY_NETWORK_XFRM
  41. bool "XFRM (IPSec) Networking Security Hooks"
  42. depends on XFRM && SECURITY_NETWORK
  43. help
  44. This enables the XFRM (IPSec) networking security hooks.
  45. If enabled, a security module can use these hooks to
  46. implement per-packet access controls based on labels
  47. derived from IPSec policy. Non-IPSec communications are
  48. designated as unlabelled, and only sockets authorized
  49. to communicate unlabelled data can send without using
  50. IPSec.
  51. If you are unsure how to answer this question, answer N.
  52. config SECURITY_PATH
  53. bool "Security hooks for pathname based access control"
  54. depends on SECURITY
  55. help
  56. This enables the security hooks for pathname based access control.
  57. If enabled, a security module can use these hooks to
  58. implement pathname based access controls.
  59. If you are unsure how to answer this question, answer N.
  60. config INTEL_TXT
  61. bool "Enable Intel(R) Trusted Execution Technology (Intel(R) TXT)"
  62. depends on HAVE_INTEL_TXT
  63. help
  64. This option enables support for booting the kernel with the
  65. Trusted Boot (tboot) module. This will utilize
  66. Intel(R) Trusted Execution Technology to perform a measured launch
  67. of the kernel. If the system does not support Intel(R) TXT, this
  68. will have no effect.
  69. Intel TXT will provide higher assurance of system configuration and
  70. initial state as well as data reset protection. This is used to
  71. create a robust initial kernel measurement and verification, which
  72. helps to ensure that kernel security mechanisms are functioning
  73. correctly. This level of protection requires a root of trust outside
  74. of the kernel itself.
  75. Intel TXT also helps solve real end user concerns about having
  76. confidence that their hardware is running the VMM or kernel that
  77. it was configured with, especially since they may be responsible for
  78. providing such assurances to VMs and services running on it.
  79. See <http://www.intel.com/technology/security/> for more information
  80. about Intel(R) TXT.
  81. See <http://tboot.sourceforge.net> for more information about tboot.
  82. See Documentation/intel_txt.txt for a description of how to enable
  83. Intel TXT support in a kernel boot.
  84. If you are unsure as to whether this is required, answer N.
  85. config LSM_MMAP_MIN_ADDR
  86. int "Low address space for LSM to protect from user allocation"
  87. depends on SECURITY && SECURITY_SELINUX
  88. default 32768 if ARM || (ARM64 && COMPAT)
  89. default 65536
  90. help
  91. This is the portion of low virtual memory which should be protected
  92. from userspace allocation. Keeping a user from writing to low pages
  93. can help reduce the impact of kernel NULL pointer bugs.
  94. For most ia64, ppc64 and x86 users with lots of address space
  95. a value of 65536 is reasonable and should cause no problems.
  96. On arm and other archs it should not be higher than 32768.
  97. Programs which use vm86 functionality or have some need to map
  98. this low address space will need the permission specific to the
  99. systems running LSM.
  100. config HAVE_HARDENED_USERCOPY_ALLOCATOR
  101. bool
  102. help
  103. The heap allocator implements __check_heap_object() for
  104. validating memory ranges against heap object sizes in
  105. support of CONFIG_HARDENED_USERCOPY.
  106. config HAVE_ARCH_HARDENED_USERCOPY
  107. bool
  108. help
  109. The architecture supports CONFIG_HARDENED_USERCOPY by
  110. calling check_object_size() just before performing the
  111. userspace copies in the low level implementation of
  112. copy_to_user() and copy_from_user().
  113. config HARDENED_USERCOPY
  114. bool "Harden memory copies between kernel and userspace"
  115. depends on HAVE_ARCH_HARDENED_USERCOPY
  116. depends on HAVE_HARDENED_USERCOPY_ALLOCATOR
  117. select BUG
  118. help
  119. This option checks for obviously wrong memory regions when
  120. copying memory to/from the kernel (via copy_to_user() and
  121. copy_from_user() functions) by rejecting memory ranges that
  122. are larger than the specified heap object, span multiple
  123. separately allocates pages, are not on the process stack,
  124. or are part of the kernel text. This kills entire classes
  125. of heap overflow exploits and similar kernel memory exposures.
  126. config HARDENED_USERCOPY_PAGESPAN
  127. bool "Refuse to copy allocations that span multiple pages"
  128. depends on HARDENED_USERCOPY
  129. depends on EXPERT
  130. help
  131. When a multi-page allocation is done without __GFP_COMP,
  132. hardened usercopy will reject attempts to copy it. There are,
  133. however, several cases of this in the kernel that have not all
  134. been removed. This config is intended to be used only while
  135. trying to find such users.
  136. source security/selinux/Kconfig
  137. source security/smack/Kconfig
  138. source security/tomoyo/Kconfig
  139. source security/apparmor/Kconfig
  140. source security/loadpin/Kconfig
  141. source security/yama/Kconfig
  142. source security/integrity/Kconfig
  143. choice
  144. prompt "Default security module"
  145. default DEFAULT_SECURITY_SELINUX if SECURITY_SELINUX
  146. default DEFAULT_SECURITY_SMACK if SECURITY_SMACK
  147. default DEFAULT_SECURITY_TOMOYO if SECURITY_TOMOYO
  148. default DEFAULT_SECURITY_APPARMOR if SECURITY_APPARMOR
  149. default DEFAULT_SECURITY_DAC
  150. help
  151. Select the security module that will be used by default if the
  152. kernel parameter security= is not specified.
  153. config DEFAULT_SECURITY_SELINUX
  154. bool "SELinux" if SECURITY_SELINUX=y
  155. config DEFAULT_SECURITY_SMACK
  156. bool "Simplified Mandatory Access Control" if SECURITY_SMACK=y
  157. config DEFAULT_SECURITY_TOMOYO
  158. bool "TOMOYO" if SECURITY_TOMOYO=y
  159. config DEFAULT_SECURITY_APPARMOR
  160. bool "AppArmor" if SECURITY_APPARMOR=y
  161. config DEFAULT_SECURITY_DAC
  162. bool "Unix Discretionary Access Controls"
  163. endchoice
  164. config DEFAULT_SECURITY
  165. string
  166. default "selinux" if DEFAULT_SECURITY_SELINUX
  167. default "smack" if DEFAULT_SECURITY_SMACK
  168. default "tomoyo" if DEFAULT_SECURITY_TOMOYO
  169. default "apparmor" if DEFAULT_SECURITY_APPARMOR
  170. default "" if DEFAULT_SECURITY_DAC
  171. endmenu