blob: 81a27971d884215bc20e71d756f6778893ae1d67 [file] [log] [blame]
Mimi Zohar3323eec92009-02-04 09:06:58 -05001# IBM Integrity Measurement Architecture
2#
3config IMA
4 bool "Integrity Measurement Architecture(IMA)"
Mimi Zohar6c21a7f2009-10-22 17:30:13 -04005 depends on SECURITY
Mimi Zoharf381c272011-03-09 14:13:22 -05006 select INTEGRITY
Mimi Zohar3323eec92009-02-04 09:06:58 -05007 select SECURITYFS
8 select CRYPTO
9 select CRYPTO_HMAC
10 select CRYPTO_MD5
11 select CRYPTO_SHA1
Dmitry Kasatkinc7c8bb22013-04-25 10:43:56 +030012 select CRYPTO_HASH_INFO
Fabio Estevamf4a03912012-01-05 12:49:54 -020013 select TCG_TPM if HAS_IOMEM && !UML
Randy Dunlapa69f1582012-02-24 11:28:05 -080014 select TCG_TIS if TCG_TPM && X86
Kent Yoder20328b52012-08-22 15:01:47 -050015 select TCG_IBMVTPM if TCG_TPM && PPC64
Mimi Zohar3323eec92009-02-04 09:06:58 -050016 help
17 The Trusted Computing Group(TCG) runtime Integrity
18 Measurement Architecture(IMA) maintains a list of hash
19 values of executables and other sensitive system files,
20 as they are read or executed. If an attacker manages
21 to change the contents of an important system file
22 being measured, we can tell.
23
24 If your system has a TPM chip, then IMA also maintains
25 an aggregate integrity value over this list inside the
26 TPM hardware, so that the TPM can prove to a third party
27 whether or not critical system files have been modified.
28 Read <http://www.usenix.org/events/sec04/tech/sailer.html>
29 to learn more about IMA.
30 If unsure, say N.
31
32config IMA_MEASURE_PCR_IDX
33 int
34 depends on IMA
35 range 8 14
36 default 10
37 help
38 IMA_MEASURE_PCR_IDX determines the TPM PCR register index
39 that IMA uses to maintain the integrity aggregate of the
40 measurement list. If unsure, use the default 10.
41
Mimi Zohar4af46622009-02-04 09:07:00 -050042config IMA_LSM_RULES
43 bool
Randy Dunlapb53fab92009-02-12 09:54:14 -080044 depends on IMA && AUDIT && (SECURITY_SELINUX || SECURITY_SMACK)
Mimi Zohar4af46622009-02-04 09:07:00 -050045 default y
46 help
Randy Dunlapb53fab92009-02-12 09:54:14 -080047 Disabling this option will disregard LSM based policy rules.
Mimi Zohar2fe5d6d2012-02-13 10:15:05 -050048
Mimi Zohar42865872013-06-07 12:16:34 +020049choice
50 prompt "Default template"
51 default IMA_NG_TEMPLATE
52 depends on IMA
53 help
54 Select the default IMA measurement template.
55
56 The original 'ima' measurement list template contains a
57 hash, defined as 20 bytes, and a null terminated pathname,
58 limited to 255 characters. The 'ima-ng' measurement list
59 template permits both larger hash digests and longer
60 pathnames.
61
62 config IMA_TEMPLATE
63 bool "ima"
64 config IMA_NG_TEMPLATE
65 bool "ima-ng (default)"
Mimi Zoharbcbc9b02013-07-23 11:15:00 -040066 config IMA_SIG_TEMPLATE
67 bool "ima-sig"
Mimi Zohar42865872013-06-07 12:16:34 +020068endchoice
69
70config IMA_DEFAULT_TEMPLATE
71 string
72 depends on IMA
73 default "ima" if IMA_TEMPLATE
74 default "ima-ng" if IMA_NG_TEMPLATE
Mimi Zoharbcbc9b02013-07-23 11:15:00 -040075 default "ima-sig" if IMA_SIG_TEMPLATE
Mimi Zohar42865872013-06-07 12:16:34 +020076
Mimi Zohare7a2ad72013-06-07 12:16:37 +020077choice
78 prompt "Default integrity hash algorithm"
79 default IMA_DEFAULT_HASH_SHA1
80 depends on IMA
81 help
82 Select the default hash algorithm used for the measurement
83 list, integrity appraisal and audit log. The compiled default
84 hash algorithm can be overwritten using the kernel command
85 line 'ima_hash=' option.
86
87 config IMA_DEFAULT_HASH_SHA1
88 bool "SHA1 (default)"
89 depends on CRYPTO_SHA1
90
91 config IMA_DEFAULT_HASH_SHA256
92 bool "SHA256"
93 depends on CRYPTO_SHA256 && !IMA_TEMPLATE
94
95 config IMA_DEFAULT_HASH_SHA512
96 bool "SHA512"
97 depends on CRYPTO_SHA512 && !IMA_TEMPLATE
98
99 config IMA_DEFAULT_HASH_WP512
100 bool "WP512"
101 depends on CRYPTO_WP512 && !IMA_TEMPLATE
102endchoice
103
104config IMA_DEFAULT_HASH
105 string
106 depends on IMA
107 default "sha1" if IMA_DEFAULT_HASH_SHA1
108 default "sha256" if IMA_DEFAULT_HASH_SHA256
109 default "sha512" if IMA_DEFAULT_HASH_SHA512
110 default "wp512" if IMA_DEFAULT_HASH_WP512
111
Mimi Zohar2fe5d6d2012-02-13 10:15:05 -0500112config IMA_APPRAISE
113 bool "Appraise integrity measurements"
114 depends on IMA
115 default n
116 help
117 This option enables local measurement integrity appraisal.
118 It requires the system to be labeled with a security extended
119 attribute containing the file hash measurement. To protect
120 the security extended attributes from offline attack, enable
121 and configure EVM.
122
123 For more information on integrity appraisal refer to:
124 <http://linux-ima.sourceforge.net>
125 If unsure, say N.