Kconfig 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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_MEASURE_PCR_IDX
  30. int
  31. depends on IMA
  32. range 8 14
  33. default 10
  34. help
  35. IMA_MEASURE_PCR_IDX determines the TPM PCR register index
  36. that IMA uses to maintain the integrity aggregate of the
  37. measurement list. If unsure, use the default 10.
  38. config IMA_LSM_RULES
  39. bool
  40. depends on IMA && AUDIT && (SECURITY_SELINUX || SECURITY_SMACK)
  41. default y
  42. help
  43. Disabling this option will disregard LSM based policy rules.
  44. choice
  45. prompt "Default template"
  46. default IMA_NG_TEMPLATE
  47. depends on IMA
  48. help
  49. Select the default IMA measurement template.
  50. The original 'ima' measurement list template contains a
  51. hash, defined as 20 bytes, and a null terminated pathname,
  52. limited to 255 characters. The 'ima-ng' measurement list
  53. template permits both larger hash digests and longer
  54. pathnames.
  55. config IMA_TEMPLATE
  56. bool "ima"
  57. config IMA_NG_TEMPLATE
  58. bool "ima-ng (default)"
  59. config IMA_SIG_TEMPLATE
  60. bool "ima-sig"
  61. endchoice
  62. config IMA_DEFAULT_TEMPLATE
  63. string
  64. depends on IMA
  65. default "ima" if IMA_TEMPLATE
  66. default "ima-ng" if IMA_NG_TEMPLATE
  67. default "ima-sig" if IMA_SIG_TEMPLATE
  68. choice
  69. prompt "Default integrity hash algorithm"
  70. default IMA_DEFAULT_HASH_SHA1
  71. depends on IMA
  72. help
  73. Select the default hash algorithm used for the measurement
  74. list, integrity appraisal and audit log. The compiled default
  75. hash algorithm can be overwritten using the kernel command
  76. line 'ima_hash=' option.
  77. config IMA_DEFAULT_HASH_SHA1
  78. bool "SHA1 (default)"
  79. depends on CRYPTO_SHA1
  80. config IMA_DEFAULT_HASH_SHA256
  81. bool "SHA256"
  82. depends on CRYPTO_SHA256 && !IMA_TEMPLATE
  83. config IMA_DEFAULT_HASH_SHA512
  84. bool "SHA512"
  85. depends on CRYPTO_SHA512 && !IMA_TEMPLATE
  86. config IMA_DEFAULT_HASH_WP512
  87. bool "WP512"
  88. depends on CRYPTO_WP512 && !IMA_TEMPLATE
  89. endchoice
  90. config IMA_DEFAULT_HASH
  91. string
  92. depends on IMA
  93. default "sha1" if IMA_DEFAULT_HASH_SHA1
  94. default "sha256" if IMA_DEFAULT_HASH_SHA256
  95. default "sha512" if IMA_DEFAULT_HASH_SHA512
  96. default "wp512" if IMA_DEFAULT_HASH_WP512
  97. config IMA_APPRAISE
  98. bool "Appraise integrity measurements"
  99. depends on IMA
  100. default n
  101. help
  102. This option enables local measurement integrity appraisal.
  103. It requires the system to be labeled with a security extended
  104. attribute containing the file hash measurement. To protect
  105. the security extended attributes from offline attack, enable
  106. and configure EVM.
  107. For more information on integrity appraisal refer to:
  108. <http://linux-ima.sourceforge.net>
  109. If unsure, say N.
  110. config IMA_TRUSTED_KEYRING
  111. bool "Require all keys on the .ima keyring be signed"
  112. depends on IMA_APPRAISE && SYSTEM_TRUSTED_KEYRING
  113. depends on INTEGRITY_ASYMMETRIC_KEYS
  114. default y
  115. help
  116. This option requires that all keys added to the .ima
  117. keyring be signed by a key on the system trusted keyring.
  118. config IMA_LOAD_X509
  119. bool "Load X509 certificate onto the '.ima' trusted keyring"
  120. depends on IMA_TRUSTED_KEYRING
  121. default n
  122. help
  123. File signature verification is based on the public keys
  124. loaded on the .ima trusted keyring. These public keys are
  125. X509 certificates signed by a trusted key on the
  126. .system keyring. This option enables X509 certificate
  127. loading from the kernel onto the '.ima' trusted keyring.
  128. config IMA_X509_PATH
  129. string "IMA X509 certificate path"
  130. depends on IMA_LOAD_X509
  131. default "/etc/keys/x509_ima.der"
  132. help
  133. This option defines IMA X509 certificate path.
  134. config IMA_APPRAISE_SIGNED_INIT
  135. bool "Require signed user-space initialization"
  136. depends on IMA_LOAD_X509
  137. default n
  138. help
  139. This option requires user-space init to be signed.