1 # IBM Integrity Measurement Architecture
4 bool "Integrity Measurement Architecture(IMA)"
9 select CRYPTO_HASH_INFO
10 select TCG_TPM if HAS_IOMEM && !UML
11 select TCG_TIS if TCG_TPM && X86
12 select TCG_CRB if TCG_TPM && ACPI
13 select TCG_IBMVTPM if TCG_TPM && PPC_PSERIES
14 select INTEGRITY_AUDIT if AUDIT
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.
23 If your system has a TPM chip, then IMA also maintains
24 an aggregate integrity value over this list inside the
25 TPM hardware, so that the TPM can prove to a third party
26 whether or not critical system files have been modified.
27 Read <http://www.usenix.org/events/sec04/tech/sailer.html>
28 to learn more about IMA.
32 bool "Enable carrying the IMA measurement list across a soft boot"
33 depends on IMA && TCG_TPM && HAVE_IMA_KEXEC
36 TPM PCRs are only reset on a hard reboot. In order to validate
37 a TPM's quote after a soft boot, the IMA measurement list of the
38 running kernel must be saved and restored on boot.
40 Depending on the IMA policy, the measurement list can grow to
43 config IMA_MEASURE_PCR_IDX
49 IMA_MEASURE_PCR_IDX determines the TPM PCR register index
50 that IMA uses to maintain the integrity aggregate of the
51 measurement list. If unsure, use the default 10.
55 depends on IMA && AUDIT && (SECURITY_SELINUX || SECURITY_SMACK)
58 Disabling this option will disregard LSM based policy rules.
61 prompt "Default template"
62 default IMA_NG_TEMPLATE
65 Select the default IMA measurement template.
67 The original 'ima' measurement list template contains a
68 hash, defined as 20 bytes, and a null terminated pathname,
69 limited to 255 characters. The 'ima-ng' measurement list
70 template permits both larger hash digests and longer
75 config IMA_NG_TEMPLATE
76 bool "ima-ng (default)"
77 config IMA_SIG_TEMPLATE
81 config IMA_DEFAULT_TEMPLATE
84 default "ima" if IMA_TEMPLATE
85 default "ima-ng" if IMA_NG_TEMPLATE
86 default "ima-sig" if IMA_SIG_TEMPLATE
89 prompt "Default integrity hash algorithm"
90 default IMA_DEFAULT_HASH_SHA1
93 Select the default hash algorithm used for the measurement
94 list, integrity appraisal and audit log. The compiled default
95 hash algorithm can be overwritten using the kernel command
96 line 'ima_hash=' option.
98 config IMA_DEFAULT_HASH_SHA1
100 depends on CRYPTO_SHA1=y
102 config IMA_DEFAULT_HASH_SHA256
104 depends on CRYPTO_SHA256=y && !IMA_TEMPLATE
106 config IMA_DEFAULT_HASH_SHA512
108 depends on CRYPTO_SHA512=y && !IMA_TEMPLATE
110 config IMA_DEFAULT_HASH_WP512
112 depends on CRYPTO_WP512=y && !IMA_TEMPLATE
115 config IMA_DEFAULT_HASH
118 default "sha1" if IMA_DEFAULT_HASH_SHA1
119 default "sha256" if IMA_DEFAULT_HASH_SHA256
120 default "sha512" if IMA_DEFAULT_HASH_SHA512
121 default "wp512" if IMA_DEFAULT_HASH_WP512
123 config IMA_WRITE_POLICY
124 bool "Enable multiple writes to the IMA policy"
128 IMA policy can now be updated multiple times. The new rules get
129 appended to the original policy. Have in mind that the rules are
130 scanned in FIFO order so be careful when you design and add new ones.
134 config IMA_READ_POLICY
135 bool "Enable reading back the current IMA policy"
137 default y if IMA_WRITE_POLICY
138 default n if !IMA_WRITE_POLICY
140 It is often useful to be able to read back the IMA policy. It is
141 even more important after introducing CONFIG_IMA_WRITE_POLICY.
142 This option allows the root user to see the current policy rules.
145 bool "Appraise integrity measurements"
149 This option enables local measurement integrity appraisal.
150 It requires the system to be labeled with a security extended
151 attribute containing the file hash measurement. To protect
152 the security extended attributes from offline attack, enable
155 For more information on integrity appraisal refer to:
156 <http://linux-ima.sourceforge.net>
159 config IMA_APPRAISE_BUILD_POLICY
160 bool "IMA build time configured policy rules"
161 depends on IMA_APPRAISE && INTEGRITY_ASYMMETRIC_KEYS
164 This option defines an IMA appraisal policy at build time, which
165 is enforced at run time without having to specify a builtin
166 policy name on the boot command line. The build time appraisal
167 policy rules persist after loading a custom policy.
169 Depending on the rules configured, this policy may require kernel
170 modules, firmware, the kexec kernel image, and/or the IMA policy
171 to be signed. Unsigned files might prevent the system from
172 booting or applications from working properly.
174 config IMA_APPRAISE_REQUIRE_FIRMWARE_SIGS
175 bool "Appraise firmware signatures"
176 depends on IMA_APPRAISE_BUILD_POLICY
179 This option defines a policy requiring all firmware to be signed,
180 including the regulatory.db. If both this option and
181 CFG80211_REQUIRE_SIGNED_REGDB are enabled, then both signature
182 verification methods are necessary.
184 config IMA_APPRAISE_REQUIRE_KEXEC_SIGS
185 bool "Appraise kexec kernel image signatures"
186 depends on IMA_APPRAISE_BUILD_POLICY
189 Enabling this rule will require all kexec'ed kernel images to
190 be signed and verified by a public key on the trusted IMA
193 Kernel image signatures can not be verified by the original
194 kexec_load syscall. Enabling this rule will prevent its
197 config IMA_APPRAISE_REQUIRE_MODULE_SIGS
198 bool "Appraise kernel modules signatures"
199 depends on IMA_APPRAISE_BUILD_POLICY
202 Enabling this rule will require all kernel modules to be signed
203 and verified by a public key on the trusted IMA keyring.
205 Kernel module signatures can only be verified by IMA-appraisal,
206 via the finit_module syscall. Enabling this rule will prevent
207 the usage of the init_module syscall.
209 config IMA_APPRAISE_REQUIRE_POLICY_SIGS
210 bool "Appraise IMA policy signature"
211 depends on IMA_APPRAISE_BUILD_POLICY
214 Enabling this rule will require the IMA policy to be signed and
215 and verified by a key on the trusted IMA keyring.
217 config IMA_APPRAISE_BOOTPARAM
218 bool "ima_appraise boot parameter"
219 depends on IMA_APPRAISE
222 This option enables the different "ima_appraise=" modes
223 (eg. fix, log) from the boot command line.
225 config IMA_TRUSTED_KEYRING
226 bool "Require all keys on the .ima keyring be signed (deprecated)"
227 depends on IMA_APPRAISE && SYSTEM_TRUSTED_KEYRING
228 depends on INTEGRITY_ASYMMETRIC_KEYS
229 select INTEGRITY_TRUSTED_KEYRING
232 This option requires that all keys added to the .ima
233 keyring be signed by a key on the system trusted keyring.
235 This option is deprecated in favor of INTEGRITY_TRUSTED_KEYRING
237 config IMA_KEYRINGS_PERMIT_SIGNED_BY_BUILTIN_OR_SECONDARY
238 bool "Permit keys validly signed by a built-in or secondary CA cert (EXPERIMENTAL)"
239 depends on SYSTEM_TRUSTED_KEYRING
240 depends on SECONDARY_TRUSTED_KEYRING
241 depends on INTEGRITY_ASYMMETRIC_KEYS
242 select INTEGRITY_TRUSTED_KEYRING
245 Keys may be added to the IMA or IMA blacklist keyrings, if the
246 key is validly signed by a CA cert in the system built-in or
247 secondary trusted keyrings.
249 Intermediate keys between those the kernel has compiled in and the
250 IMA keys to be added may be added to the system secondary keyring,
251 provided they are validly signed by a key already resident in the
252 built-in or secondary trusted keyrings.
254 config IMA_BLACKLIST_KEYRING
255 bool "Create IMA machine owner blacklist keyrings (EXPERIMENTAL)"
256 depends on SYSTEM_TRUSTED_KEYRING
257 depends on IMA_TRUSTED_KEYRING
260 This option creates an IMA blacklist keyring, which contains all
261 revoked IMA keys. It is consulted before any other keyring. If
262 the search is successful the requested operation is rejected and
263 an error is returned to the caller.
266 bool "Load X509 certificate onto the '.ima' trusted keyring"
267 depends on IMA_TRUSTED_KEYRING
270 File signature verification is based on the public keys
271 loaded on the .ima trusted keyring. These public keys are
272 X509 certificates signed by a trusted key on the
273 .system keyring. This option enables X509 certificate
274 loading from the kernel onto the '.ima' trusted keyring.
277 string "IMA X509 certificate path"
278 depends on IMA_LOAD_X509
279 default "/etc/keys/x509_ima.der"
281 This option defines IMA X509 certificate path.
283 config IMA_APPRAISE_SIGNED_INIT
284 bool "Require signed user-space initialization"
285 depends on IMA_LOAD_X509
288 This option requires user-space init to be signed.