Kconfig 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. # IBM Integrity Measurement Architecture
  2. #
  3. config IMA
  4. bool "Integrity Measurement Architecture(IMA)"
  5. select SECURITYFS
  6. select CRYPTO
  7. select CRYPTO_HMAC
  8. select CRYPTO_MD5
  9. select CRYPTO_SHA1
  10. select CRYPTO_HASH_INFO
  11. select TCG_TPM if HAS_IOMEM && !UML
  12. select TCG_TIS if TCG_TPM && X86
  13. select TCG_CRB if TCG_TPM && ACPI
  14. select TCG_IBMVTPM if TCG_TPM && PPC_PSERIES
  15. help
  16. The Trusted Computing Group(TCG) runtime Integrity
  17. Measurement Architecture(IMA) maintains a list of hash
  18. values of executables and other sensitive system files,
  19. as they are read or executed. If an attacker manages
  20. to change the contents of an important system file
  21. being measured, we can tell.
  22. If your system has a TPM chip, then IMA also maintains
  23. an aggregate integrity value over this list inside the
  24. TPM hardware, so that the TPM can prove to a third party
  25. whether or not critical system files have been modified.
  26. Read <http://www.usenix.org/events/sec04/tech/sailer.html>
  27. to learn more about IMA.
  28. If unsure, say N.
  29. config IMA_KEXEC
  30. bool "Enable carrying the IMA measurement list across a soft boot"
  31. depends on IMA && TCG_TPM && HAVE_IMA_KEXEC
  32. default n
  33. help
  34. TPM PCRs are only reset on a hard reboot. In order to validate
  35. a TPM's quote after a soft boot, the IMA measurement list of the
  36. running kernel must be saved and restored on boot.
  37. Depending on the IMA policy, the measurement list can grow to
  38. be very large.
  39. config IMA_MEASURE_PCR_IDX
  40. int
  41. depends on IMA
  42. range 8 14
  43. default 10
  44. help
  45. IMA_MEASURE_PCR_IDX determines the TPM PCR register index
  46. that IMA uses to maintain the integrity aggregate of the
  47. measurement list. If unsure, use the default 10.
  48. config IMA_LSM_RULES
  49. bool
  50. depends on IMA && AUDIT && (SECURITY_SELINUX || SECURITY_SMACK)
  51. default y
  52. help
  53. Disabling this option will disregard LSM based policy rules.
  54. choice
  55. prompt "Default template"
  56. default IMA_NG_TEMPLATE
  57. depends on IMA
  58. help
  59. Select the default IMA measurement template.
  60. The original 'ima' measurement list template contains a
  61. hash, defined as 20 bytes, and a null terminated pathname,
  62. limited to 255 characters. The 'ima-ng' measurement list
  63. template permits both larger hash digests and longer
  64. pathnames.
  65. config IMA_TEMPLATE
  66. bool "ima"
  67. config IMA_NG_TEMPLATE
  68. bool "ima-ng (default)"
  69. config IMA_SIG_TEMPLATE
  70. bool "ima-sig"
  71. endchoice
  72. config IMA_DEFAULT_TEMPLATE
  73. string
  74. depends on IMA
  75. default "ima" if IMA_TEMPLATE
  76. default "ima-ng" if IMA_NG_TEMPLATE
  77. default "ima-sig" if IMA_SIG_TEMPLATE
  78. choice
  79. prompt "Default integrity hash algorithm"
  80. default IMA_DEFAULT_HASH_SHA1
  81. depends on IMA
  82. help
  83. Select the default hash algorithm used for the measurement
  84. list, integrity appraisal and audit log. The compiled default
  85. hash algorithm can be overwritten using the kernel command
  86. line 'ima_hash=' option.
  87. config IMA_DEFAULT_HASH_SHA1
  88. bool "SHA1 (default)"
  89. depends on CRYPTO_SHA1=y
  90. config IMA_DEFAULT_HASH_SHA256
  91. bool "SHA256"
  92. depends on CRYPTO_SHA256=y && !IMA_TEMPLATE
  93. config IMA_DEFAULT_HASH_SHA512
  94. bool "SHA512"
  95. depends on CRYPTO_SHA512=y && !IMA_TEMPLATE
  96. config IMA_DEFAULT_HASH_WP512
  97. bool "WP512"
  98. depends on CRYPTO_WP512=y && !IMA_TEMPLATE
  99. endchoice
  100. config IMA_DEFAULT_HASH
  101. string
  102. depends on IMA
  103. default "sha1" if IMA_DEFAULT_HASH_SHA1
  104. default "sha256" if IMA_DEFAULT_HASH_SHA256
  105. default "sha512" if IMA_DEFAULT_HASH_SHA512
  106. default "wp512" if IMA_DEFAULT_HASH_WP512
  107. config IMA_WRITE_POLICY
  108. bool "Enable multiple writes to the IMA policy"
  109. depends on IMA
  110. default n
  111. help
  112. IMA policy can now be updated multiple times. The new rules get
  113. appended to the original policy. Have in mind that the rules are
  114. scanned in FIFO order so be careful when you design and add new ones.
  115. If unsure, say N.
  116. config IMA_READ_POLICY
  117. bool "Enable reading back the current IMA policy"
  118. depends on IMA
  119. default y if IMA_WRITE_POLICY
  120. default n if !IMA_WRITE_POLICY
  121. help
  122. It is often useful to be able to read back the IMA policy. It is
  123. even more important after introducing CONFIG_IMA_WRITE_POLICY.
  124. This option allows the root user to see the current policy rules.
  125. config IMA_APPRAISE
  126. bool "Appraise integrity measurements"
  127. depends on IMA
  128. default n
  129. help
  130. This option enables local measurement integrity appraisal.
  131. It requires the system to be labeled with a security extended
  132. attribute containing the file hash measurement. To protect
  133. the security extended attributes from offline attack, enable
  134. and configure EVM.
  135. For more information on integrity appraisal refer to:
  136. <http://linux-ima.sourceforge.net>
  137. If unsure, say N.
  138. config IMA_APPRAISE_BOOTPARAM
  139. bool "ima_appraise boot parameter"
  140. depends on IMA_APPRAISE
  141. default y
  142. help
  143. This option enables the different "ima_appraise=" modes
  144. (eg. fix, log) from the boot command line.
  145. config IMA_TRUSTED_KEYRING
  146. bool "Require all keys on the .ima keyring be signed (deprecated)"
  147. depends on IMA_APPRAISE && SYSTEM_TRUSTED_KEYRING
  148. depends on INTEGRITY_ASYMMETRIC_KEYS
  149. select INTEGRITY_TRUSTED_KEYRING
  150. default y
  151. help
  152. This option requires that all keys added to the .ima
  153. keyring be signed by a key on the system trusted keyring.
  154. This option is deprecated in favor of INTEGRITY_TRUSTED_KEYRING
  155. config IMA_KEYRINGS_PERMIT_SIGNED_BY_BUILTIN_OR_SECONDARY
  156. bool "Permit keys validly signed by a built-in or secondary CA cert (EXPERIMENTAL)"
  157. depends on SYSTEM_TRUSTED_KEYRING
  158. depends on SECONDARY_TRUSTED_KEYRING
  159. depends on INTEGRITY_ASYMMETRIC_KEYS
  160. select INTEGRITY_TRUSTED_KEYRING
  161. default n
  162. help
  163. Keys may be added to the IMA or IMA blacklist keyrings, if the
  164. key is validly signed by a CA cert in the system built-in or
  165. secondary trusted keyrings.
  166. Intermediate keys between those the kernel has compiled in and the
  167. IMA keys to be added may be added to the system secondary keyring,
  168. provided they are validly signed by a key already resident in the
  169. built-in or secondary trusted keyrings.
  170. config IMA_BLACKLIST_KEYRING
  171. bool "Create IMA machine owner blacklist keyrings (EXPERIMENTAL)"
  172. depends on SYSTEM_TRUSTED_KEYRING
  173. depends on IMA_TRUSTED_KEYRING
  174. default n
  175. help
  176. This option creates an IMA blacklist keyring, which contains all
  177. revoked IMA keys. It is consulted before any other keyring. If
  178. the search is successful the requested operation is rejected and
  179. an error is returned to the caller.
  180. config IMA_LOAD_X509
  181. bool "Load X509 certificate onto the '.ima' trusted keyring"
  182. depends on IMA_TRUSTED_KEYRING
  183. default n
  184. help
  185. File signature verification is based on the public keys
  186. loaded on the .ima trusted keyring. These public keys are
  187. X509 certificates signed by a trusted key on the
  188. .system keyring. This option enables X509 certificate
  189. loading from the kernel onto the '.ima' trusted keyring.
  190. config IMA_X509_PATH
  191. string "IMA X509 certificate path"
  192. depends on IMA_LOAD_X509
  193. default "/etc/keys/x509_ima.der"
  194. help
  195. This option defines IMA X509 certificate path.
  196. config IMA_APPRAISE_SIGNED_INIT
  197. bool "Require signed user-space initialization"
  198. depends on IMA_LOAD_X509
  199. default n
  200. help
  201. This option requires user-space init to be signed.