Kconfig 6.4 KB

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