Kconfig 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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 && PPC64
  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_APPRAISE
  97. bool "Appraise integrity measurements"
  98. depends on IMA
  99. default n
  100. help
  101. This option enables local measurement integrity appraisal.
  102. It requires the system to be labeled with a security extended
  103. attribute containing the file hash measurement. To protect
  104. the security extended attributes from offline attack, enable
  105. and configure EVM.
  106. For more information on integrity appraisal refer to:
  107. <http://linux-ima.sourceforge.net>
  108. If unsure, say N.
  109. config IMA_TRUSTED_KEYRING
  110. bool "Require all keys on the .ima keyring be signed"
  111. depends on IMA_APPRAISE && SYSTEM_TRUSTED_KEYRING
  112. depends on INTEGRITY_ASYMMETRIC_KEYS
  113. select KEYS_DEBUG_PROC_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.