Mimi Zohar | 3323eec | 2009-02-04 09:06:58 -0500 | [diff] [blame] | 1 | # IBM Integrity Measurement Architecture |
| 2 | # |
| 3 | config IMA |
| 4 | bool "Integrity Measurement Architecture(IMA)" |
Mimi Zohar | 3323eec | 2009-02-04 09:06:58 -0500 | [diff] [blame] | 5 | select SECURITYFS |
| 6 | select CRYPTO |
| 7 | select CRYPTO_HMAC |
| 8 | select CRYPTO_MD5 |
| 9 | select CRYPTO_SHA1 |
Dmitry Kasatkin | c7c8bb2 | 2013-04-25 10:43:56 +0300 | [diff] [blame] | 10 | select CRYPTO_HASH_INFO |
Fabio Estevam | f4a0391 | 2012-01-05 12:49:54 -0200 | [diff] [blame] | 11 | select TCG_TPM if HAS_IOMEM && !UML |
Randy Dunlap | a69f158 | 2012-02-24 11:28:05 -0800 | [diff] [blame] | 12 | select TCG_TIS if TCG_TPM && X86 |
Michael Ellerman | 63a0eb7 | 2014-12-03 17:04:50 +1100 | [diff] [blame] | 13 | select TCG_IBMVTPM if TCG_TPM && PPC_PSERIES |
Mimi Zohar | 3323eec | 2009-02-04 09:06:58 -0500 | [diff] [blame] | 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 | |
| 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 | |
| 30 | config IMA_MEASURE_PCR_IDX |
| 31 | int |
| 32 | depends on IMA |
| 33 | range 8 14 |
| 34 | default 10 |
| 35 | help |
| 36 | IMA_MEASURE_PCR_IDX determines the TPM PCR register index |
| 37 | that IMA uses to maintain the integrity aggregate of the |
| 38 | measurement list. If unsure, use the default 10. |
| 39 | |
Mimi Zohar | 4af4662 | 2009-02-04 09:07:00 -0500 | [diff] [blame] | 40 | config IMA_LSM_RULES |
| 41 | bool |
Randy Dunlap | b53fab9 | 2009-02-12 09:54:14 -0800 | [diff] [blame] | 42 | depends on IMA && AUDIT && (SECURITY_SELINUX || SECURITY_SMACK) |
Mimi Zohar | 4af4662 | 2009-02-04 09:07:00 -0500 | [diff] [blame] | 43 | default y |
| 44 | help |
Randy Dunlap | b53fab9 | 2009-02-12 09:54:14 -0800 | [diff] [blame] | 45 | Disabling this option will disregard LSM based policy rules. |
Mimi Zohar | 2fe5d6d | 2012-02-13 10:15:05 -0500 | [diff] [blame] | 46 | |
Mimi Zohar | 4286587 | 2013-06-07 12:16:34 +0200 | [diff] [blame] | 47 | choice |
| 48 | prompt "Default template" |
| 49 | default IMA_NG_TEMPLATE |
| 50 | depends on IMA |
| 51 | help |
| 52 | Select the default IMA measurement template. |
| 53 | |
| 54 | The original 'ima' measurement list template contains a |
| 55 | hash, defined as 20 bytes, and a null terminated pathname, |
| 56 | limited to 255 characters. The 'ima-ng' measurement list |
| 57 | template permits both larger hash digests and longer |
| 58 | pathnames. |
| 59 | |
| 60 | config IMA_TEMPLATE |
| 61 | bool "ima" |
| 62 | config IMA_NG_TEMPLATE |
| 63 | bool "ima-ng (default)" |
Mimi Zohar | bcbc9b0 | 2013-07-23 11:15:00 -0400 | [diff] [blame] | 64 | config IMA_SIG_TEMPLATE |
| 65 | bool "ima-sig" |
Mimi Zohar | 4286587 | 2013-06-07 12:16:34 +0200 | [diff] [blame] | 66 | endchoice |
| 67 | |
| 68 | config IMA_DEFAULT_TEMPLATE |
| 69 | string |
| 70 | depends on IMA |
| 71 | default "ima" if IMA_TEMPLATE |
| 72 | default "ima-ng" if IMA_NG_TEMPLATE |
Mimi Zohar | bcbc9b0 | 2013-07-23 11:15:00 -0400 | [diff] [blame] | 73 | default "ima-sig" if IMA_SIG_TEMPLATE |
Mimi Zohar | 4286587 | 2013-06-07 12:16:34 +0200 | [diff] [blame] | 74 | |
Mimi Zohar | e7a2ad7 | 2013-06-07 12:16:37 +0200 | [diff] [blame] | 75 | choice |
| 76 | prompt "Default integrity hash algorithm" |
| 77 | default IMA_DEFAULT_HASH_SHA1 |
| 78 | depends on IMA |
| 79 | help |
| 80 | Select the default hash algorithm used for the measurement |
| 81 | list, integrity appraisal and audit log. The compiled default |
| 82 | hash algorithm can be overwritten using the kernel command |
| 83 | line 'ima_hash=' option. |
| 84 | |
| 85 | config IMA_DEFAULT_HASH_SHA1 |
| 86 | bool "SHA1 (default)" |
| 87 | depends on CRYPTO_SHA1 |
| 88 | |
| 89 | config IMA_DEFAULT_HASH_SHA256 |
| 90 | bool "SHA256" |
| 91 | depends on CRYPTO_SHA256 && !IMA_TEMPLATE |
| 92 | |
| 93 | config IMA_DEFAULT_HASH_SHA512 |
| 94 | bool "SHA512" |
| 95 | depends on CRYPTO_SHA512 && !IMA_TEMPLATE |
| 96 | |
| 97 | config IMA_DEFAULT_HASH_WP512 |
| 98 | bool "WP512" |
| 99 | depends on CRYPTO_WP512 && !IMA_TEMPLATE |
| 100 | endchoice |
| 101 | |
| 102 | config IMA_DEFAULT_HASH |
| 103 | string |
| 104 | depends on IMA |
| 105 | default "sha1" if IMA_DEFAULT_HASH_SHA1 |
| 106 | default "sha256" if IMA_DEFAULT_HASH_SHA256 |
| 107 | default "sha512" if IMA_DEFAULT_HASH_SHA512 |
| 108 | default "wp512" if IMA_DEFAULT_HASH_WP512 |
| 109 | |
Petko Manolov | 38d859f | 2015-12-02 17:47:54 +0200 | [diff] [blame] | 110 | config IMA_WRITE_POLICY |
| 111 | bool "Enable multiple writes to the IMA policy" |
| 112 | depends on IMA |
| 113 | default n |
| 114 | help |
| 115 | IMA policy can now be updated multiple times. The new rules get |
| 116 | appended to the original policy. Have in mind that the rules are |
| 117 | scanned in FIFO order so be careful when you design and add new ones. |
| 118 | |
| 119 | If unsure, say N. |
| 120 | |
Petko Manolov | 80eae20 | 2015-12-02 17:47:56 +0200 | [diff] [blame^] | 121 | config IMA_READ_POLICY |
| 122 | bool "Enable reading back the current IMA policy" |
| 123 | depends on IMA |
| 124 | default y if IMA_WRITE_POLICY |
| 125 | default n if !IMA_WRITE_POLICY |
| 126 | help |
| 127 | It is often useful to be able to read back the IMA policy. It is |
| 128 | even more important after introducing CONFIG_IMA_WRITE_POLICY. |
| 129 | This option allows the root user to see the current policy rules. |
| 130 | |
Mimi Zohar | 2fe5d6d | 2012-02-13 10:15:05 -0500 | [diff] [blame] | 131 | config IMA_APPRAISE |
| 132 | bool "Appraise integrity measurements" |
| 133 | depends on IMA |
| 134 | default n |
| 135 | help |
| 136 | This option enables local measurement integrity appraisal. |
| 137 | It requires the system to be labeled with a security extended |
| 138 | attribute containing the file hash measurement. To protect |
| 139 | the security extended attributes from offline attack, enable |
| 140 | and configure EVM. |
| 141 | |
| 142 | For more information on integrity appraisal refer to: |
| 143 | <http://linux-ima.sourceforge.net> |
| 144 | If unsure, say N. |
Mimi Zohar | 7d2ce23 | 2013-08-13 08:47:43 -0400 | [diff] [blame] | 145 | |
| 146 | config IMA_TRUSTED_KEYRING |
Dmitry Kasatkin | f4dc377 | 2015-10-22 21:26:10 +0300 | [diff] [blame] | 147 | bool "Require all keys on the .ima keyring be signed (deprecated)" |
Mimi Zohar | 7d2ce23 | 2013-08-13 08:47:43 -0400 | [diff] [blame] | 148 | depends on IMA_APPRAISE && SYSTEM_TRUSTED_KEYRING |
| 149 | depends on INTEGRITY_ASYMMETRIC_KEYS |
Dmitry Kasatkin | f4dc377 | 2015-10-22 21:26:10 +0300 | [diff] [blame] | 150 | select INTEGRITY_TRUSTED_KEYRING |
Mimi Zohar | 7d2ce23 | 2013-08-13 08:47:43 -0400 | [diff] [blame] | 151 | default y |
| 152 | help |
| 153 | This option requires that all keys added to the .ima |
| 154 | keyring be signed by a key on the system trusted keyring. |
Dmitry Kasatkin | fd5f4e90 | 2014-11-05 17:01:14 +0200 | [diff] [blame] | 155 | |
Dmitry Kasatkin | f4dc377 | 2015-10-22 21:26:10 +0300 | [diff] [blame] | 156 | This option is deprecated in favor of INTEGRITY_TRUSTED_KEYRING |
| 157 | |
Petko Manolov | 41c89b6 | 2015-12-02 17:47:55 +0200 | [diff] [blame] | 158 | config IMA_MOK_KEYRING |
| 159 | bool "Create IMA machine owner keys (MOK) and blacklist keyrings" |
| 160 | depends on SYSTEM_TRUSTED_KEYRING |
| 161 | depends on IMA_TRUSTED_KEYRING |
| 162 | default n |
| 163 | help |
| 164 | This option creates IMA MOK and blacklist keyrings. IMA MOK is an |
| 165 | intermediate keyring that sits between .system and .ima keyrings, |
| 166 | effectively forming a simple CA hierarchy. To successfully import a |
| 167 | key into .ima_mok it must be signed by a key which CA is in .system |
| 168 | keyring. On turn any key that needs to go in .ima keyring must be |
| 169 | signed by CA in either .system or .ima_mok keyrings. IMA MOK is empty |
| 170 | at kernel boot. |
| 171 | |
| 172 | IMA blacklist keyring contains all revoked IMA keys. It is consulted |
| 173 | before any other keyring. If the search is successful the requested |
| 174 | operation is rejected and error is returned to the caller. |
| 175 | |
Dmitry Kasatkin | fd5f4e90 | 2014-11-05 17:01:14 +0200 | [diff] [blame] | 176 | config IMA_LOAD_X509 |
| 177 | bool "Load X509 certificate onto the '.ima' trusted keyring" |
| 178 | depends on IMA_TRUSTED_KEYRING |
| 179 | default n |
| 180 | help |
| 181 | File signature verification is based on the public keys |
| 182 | loaded on the .ima trusted keyring. These public keys are |
| 183 | X509 certificates signed by a trusted key on the |
| 184 | .system keyring. This option enables X509 certificate |
| 185 | loading from the kernel onto the '.ima' trusted keyring. |
| 186 | |
| 187 | config IMA_X509_PATH |
| 188 | string "IMA X509 certificate path" |
| 189 | depends on IMA_LOAD_X509 |
| 190 | default "/etc/keys/x509_ima.der" |
| 191 | help |
| 192 | This option defines IMA X509 certificate path. |
Dmitry Kasatkin | c57782c | 2014-11-05 17:01:16 +0200 | [diff] [blame] | 193 | |
| 194 | config IMA_APPRAISE_SIGNED_INIT |
| 195 | bool "Require signed user-space initialization" |
| 196 | depends on IMA_LOAD_X509 |
| 197 | default n |
| 198 | help |
| 199 | This option requires user-space init to be signed. |