Kconfig 7.4 KB

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