~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/security/integrity/ima/Kconfig

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /security/integrity/ima/Kconfig (Version linux-6.12-rc7) and /security/integrity/ima/Kconfig (Version linux-4.9.337)


  1 # SPDX-License-Identifier: GPL-2.0-only        << 
  2 # IBM Integrity Measurement Architecture            1 # IBM Integrity Measurement Architecture
  3 #                                                   2 #
  4 config IMA                                          3 config IMA
  5         bool "Integrity Measurement Architectu      4         bool "Integrity Measurement Architecture(IMA)"
  6         select SECURITYFS                           5         select SECURITYFS
  7         select CRYPTO                               6         select CRYPTO
  8         select CRYPTO_HMAC                          7         select CRYPTO_HMAC
                                                   >>   8         select CRYPTO_MD5
  9         select CRYPTO_SHA1                          9         select CRYPTO_SHA1
 10         select CRYPTO_HASH_INFO                    10         select CRYPTO_HASH_INFO
 11         select SECURITY_PATH                   !!  11         select TCG_TPM if HAS_IOMEM && !UML
 12         select TCG_TPM if HAS_IOMEM            << 
 13         select TCG_TIS if TCG_TPM && X86           12         select TCG_TIS if TCG_TPM && X86
 14         select TCG_CRB if TCG_TPM && ACPI      << 
 15         select TCG_IBMVTPM if TCG_TPM && PPC_P     13         select TCG_IBMVTPM if TCG_TPM && PPC_PSERIES
 16         select INTEGRITY_AUDIT if AUDIT        << 
 17         help                                       14         help
 18           The Trusted Computing Group(TCG) run     15           The Trusted Computing Group(TCG) runtime Integrity
 19           Measurement Architecture(IMA) mainta     16           Measurement Architecture(IMA) maintains a list of hash
 20           values of executables and other sens     17           values of executables and other sensitive system files,
 21           as they are read or executed. If an      18           as they are read or executed. If an attacker manages
 22           to change the contents of an importa     19           to change the contents of an important system file
 23           being measured, we can tell.             20           being measured, we can tell.
 24                                                    21 
 25           If your system has a TPM chip, then      22           If your system has a TPM chip, then IMA also maintains
 26           an aggregate integrity value over th     23           an aggregate integrity value over this list inside the
 27           TPM hardware, so that the TPM can pr     24           TPM hardware, so that the TPM can prove to a third party
 28           whether or not critical system files     25           whether or not critical system files have been modified.
 29           Read <https://www.usenix.org/events/ !!  26           Read <http://www.usenix.org/events/sec04/tech/sailer.html>
 30           to learn more about IMA.                 27           to learn more about IMA.
 31           If unsure, say N.                        28           If unsure, say N.
 32                                                    29 
 33 if IMA                                         << 
 34                                                << 
 35 config IMA_KEXEC                               << 
 36         bool "Enable carrying the IMA measurem << 
 37         depends on TCG_TPM && HAVE_IMA_KEXEC   << 
 38         default n                              << 
 39         help                                   << 
 40            TPM PCRs are only reset on a hard r << 
 41            a TPM's quote after a soft boot, th << 
 42            running kernel must be saved and re << 
 43                                                << 
 44            Depending on the IMA policy, the me << 
 45            be very large.                      << 
 46                                                << 
 47 config IMA_MEASURE_PCR_IDX                         30 config IMA_MEASURE_PCR_IDX
 48         int                                        31         int
                                                   >>  32         depends on IMA
 49         range 8 14                                 33         range 8 14
 50         default 10                                 34         default 10
 51         help                                       35         help
 52           IMA_MEASURE_PCR_IDX determines the T     36           IMA_MEASURE_PCR_IDX determines the TPM PCR register index
 53           that IMA uses to maintain the integr     37           that IMA uses to maintain the integrity aggregate of the
 54           measurement list.  If unsure, use th     38           measurement list.  If unsure, use the default 10.
 55                                                    39 
 56 config IMA_LSM_RULES                               40 config IMA_LSM_RULES
 57         bool                                       41         bool
 58         depends on AUDIT && (SECURITY_SELINUX  !!  42         depends on IMA && AUDIT && (SECURITY_SELINUX || SECURITY_SMACK)
 59         default y                                  43         default y
 60         help                                       44         help
 61           Disabling this option will disregard     45           Disabling this option will disregard LSM based policy rules.
 62                                                    46 
 63 choice                                             47 choice
 64         prompt "Default template"                  48         prompt "Default template"
 65         default IMA_NG_TEMPLATE                    49         default IMA_NG_TEMPLATE
                                                   >>  50         depends on IMA
 66         help                                       51         help
 67           Select the default IMA measurement t     52           Select the default IMA measurement template.
 68                                                    53 
 69           The original 'ima' measurement list      54           The original 'ima' measurement list template contains a
 70           hash, defined as 20 bytes, and a nul     55           hash, defined as 20 bytes, and a null terminated pathname,
 71           limited to 255 characters.  The 'ima     56           limited to 255 characters.  The 'ima-ng' measurement list
 72           template permits both larger hash di     57           template permits both larger hash digests and longer
 73           pathnames. The configured default te !!  58           pathnames.
 74           by specifying "ima_template=" on the << 
 75                                                    59 
                                                   >>  60         config IMA_TEMPLATE
                                                   >>  61                 bool "ima"
 76         config IMA_NG_TEMPLATE                     62         config IMA_NG_TEMPLATE
 77                 bool "ima-ng (default)"            63                 bool "ima-ng (default)"
 78         config IMA_SIG_TEMPLATE                    64         config IMA_SIG_TEMPLATE
 79                 bool "ima-sig"                     65                 bool "ima-sig"
 80 endchoice                                          66 endchoice
 81                                                    67 
 82 config IMA_DEFAULT_TEMPLATE                        68 config IMA_DEFAULT_TEMPLATE
 83         string                                     69         string
                                                   >>  70         depends on IMA
                                                   >>  71         default "ima" if IMA_TEMPLATE
 84         default "ima-ng" if IMA_NG_TEMPLATE        72         default "ima-ng" if IMA_NG_TEMPLATE
 85         default "ima-sig" if IMA_SIG_TEMPLATE      73         default "ima-sig" if IMA_SIG_TEMPLATE
 86                                                    74 
 87 choice                                             75 choice
 88         prompt "Default integrity hash algorit     76         prompt "Default integrity hash algorithm"
 89         default IMA_DEFAULT_HASH_SHA1              77         default IMA_DEFAULT_HASH_SHA1
                                                   >>  78         depends on IMA
 90         help                                       79         help
 91            Select the default hash algorithm u     80            Select the default hash algorithm used for the measurement
 92            list, integrity appraisal and audit     81            list, integrity appraisal and audit log.  The compiled default
 93            hash algorithm can be overwritten u     82            hash algorithm can be overwritten using the kernel command
 94            line 'ima_hash=' option.                83            line 'ima_hash=' option.
 95                                                    84 
 96         config IMA_DEFAULT_HASH_SHA1               85         config IMA_DEFAULT_HASH_SHA1
 97                 bool "SHA1 (default)"              86                 bool "SHA1 (default)"
 98                 depends on CRYPTO_SHA1=y       !!  87                 depends on CRYPTO_SHA1
 99                                                    88 
100         config IMA_DEFAULT_HASH_SHA256             89         config IMA_DEFAULT_HASH_SHA256
101                 bool "SHA256"                      90                 bool "SHA256"
102                 depends on CRYPTO_SHA256=y     !!  91                 depends on CRYPTO_SHA256 && !IMA_TEMPLATE
103                                                    92 
104         config IMA_DEFAULT_HASH_SHA512             93         config IMA_DEFAULT_HASH_SHA512
105                 bool "SHA512"                      94                 bool "SHA512"
106                 depends on CRYPTO_SHA512=y     !!  95                 depends on CRYPTO_SHA512 && !IMA_TEMPLATE
107                                                    96 
108         config IMA_DEFAULT_HASH_WP512              97         config IMA_DEFAULT_HASH_WP512
109                 bool "WP512"                       98                 bool "WP512"
110                 depends on CRYPTO_WP512=y      !!  99                 depends on CRYPTO_WP512 && !IMA_TEMPLATE
111                                                << 
112         config IMA_DEFAULT_HASH_SM3            << 
113                 bool "SM3"                     << 
114                 depends on CRYPTO_SM3_GENERIC= << 
115 endchoice                                         100 endchoice
116                                                   101 
117 config IMA_DEFAULT_HASH                           102 config IMA_DEFAULT_HASH
118         string                                    103         string
                                                   >> 104         depends on IMA
119         default "sha1" if IMA_DEFAULT_HASH_SHA    105         default "sha1" if IMA_DEFAULT_HASH_SHA1
120         default "sha256" if IMA_DEFAULT_HASH_S    106         default "sha256" if IMA_DEFAULT_HASH_SHA256
121         default "sha512" if IMA_DEFAULT_HASH_S    107         default "sha512" if IMA_DEFAULT_HASH_SHA512
122         default "wp512" if IMA_DEFAULT_HASH_WP    108         default "wp512" if IMA_DEFAULT_HASH_WP512
123         default "sm3" if IMA_DEFAULT_HASH_SM3  << 
124                                                   109 
125 config IMA_WRITE_POLICY                           110 config IMA_WRITE_POLICY
126         bool "Enable multiple writes to the IM    111         bool "Enable multiple writes to the IMA policy"
                                                   >> 112         depends on IMA
127         default n                                 113         default n
128         help                                      114         help
129           IMA policy can now be updated multip    115           IMA policy can now be updated multiple times.  The new rules get
130           appended to the original policy.  Ha    116           appended to the original policy.  Have in mind that the rules are
131           scanned in FIFO order so be careful     117           scanned in FIFO order so be careful when you design and add new ones.
132                                                   118 
133           If unsure, say N.                       119           If unsure, say N.
134                                                   120 
135 config IMA_READ_POLICY                            121 config IMA_READ_POLICY
136         bool "Enable reading back the current     122         bool "Enable reading back the current IMA policy"
                                                   >> 123         depends on IMA
137         default y if IMA_WRITE_POLICY             124         default y if IMA_WRITE_POLICY
138         default n if !IMA_WRITE_POLICY            125         default n if !IMA_WRITE_POLICY
139         help                                      126         help
140            It is often useful to be able to re    127            It is often useful to be able to read back the IMA policy.  It is
141            even more important after introduci    128            even more important after introducing CONFIG_IMA_WRITE_POLICY.
142            This option allows the root user to    129            This option allows the root user to see the current policy rules.
143                                                   130 
144 config IMA_APPRAISE                               131 config IMA_APPRAISE
145         bool "Appraise integrity measurements"    132         bool "Appraise integrity measurements"
                                                   >> 133         depends on IMA
146         default n                                 134         default n
147         help                                      135         help
148           This option enables local measuremen    136           This option enables local measurement integrity appraisal.
149           It requires the system to be labeled    137           It requires the system to be labeled with a security extended
150           attribute containing the file hash m    138           attribute containing the file hash measurement.  To protect
151           the security extended attributes fro    139           the security extended attributes from offline attack, enable
152           and configure EVM.                      140           and configure EVM.
153                                                   141 
154           For more information on integrity ap    142           For more information on integrity appraisal refer to:
155           <http://linux-ima.sourceforge.net>      143           <http://linux-ima.sourceforge.net>
156           If unsure, say N.                       144           If unsure, say N.
157                                                   145 
158 config IMA_ARCH_POLICY                         !! 146 config IMA_TRUSTED_KEYRING
159         bool "Enable loading an IMA architectu !! 147         bool "Require all keys on the .ima keyring be signed (deprecated)"
160         depends on (KEXEC_SIG && IMA) || IMA_A !! 148         depends on IMA_APPRAISE && SYSTEM_TRUSTED_KEYRING
161                    && INTEGRITY_ASYMMETRIC_KEY !! 149         depends on INTEGRITY_ASYMMETRIC_KEYS
162         default n                              !! 150         select INTEGRITY_TRUSTED_KEYRING
163         help                                   << 
164           This option enables loading an IMA a << 
165           based on run time secure boot flags. << 
166                                                << 
167 config IMA_APPRAISE_BUILD_POLICY               << 
168         bool "IMA build time configured policy << 
169         depends on IMA_APPRAISE && INTEGRITY_A << 
170         default n                              << 
171         help                                   << 
172           This option defines an IMA appraisal << 
173           is enforced at run time without havi << 
174           policy name on the boot command line << 
175           policy rules persist after loading a << 
176                                                << 
177           Depending on the rules configured, t << 
178           modules, firmware, the kexec kernel  << 
179           to be signed.  Unsigned files might  << 
180           booting or applications from working << 
181                                                << 
182 config IMA_APPRAISE_REQUIRE_FIRMWARE_SIGS      << 
183         bool "Appraise firmware signatures"    << 
184         depends on IMA_APPRAISE_BUILD_POLICY   << 
185         default n                              << 
186         help                                   << 
187           This option defines a policy requiri << 
188           including the regulatory.db.  If bot << 
189           CFG80211_REQUIRE_SIGNED_REGDB are en << 
190           verification methods are necessary.  << 
191                                                << 
192 config IMA_APPRAISE_REQUIRE_KEXEC_SIGS         << 
193         bool "Appraise kexec kernel image sign << 
194         depends on IMA_APPRAISE_BUILD_POLICY   << 
195         default n                              << 
196         help                                   << 
197           Enabling this rule will require all  << 
198           be signed and verified by a public k << 
199           keyring.                             << 
200                                                << 
201           Kernel image signatures can not be v << 
202           kexec_load syscall.  Enabling this r << 
203           usage.                               << 
204                                                << 
205 config IMA_APPRAISE_REQUIRE_MODULE_SIGS        << 
206         bool "Appraise kernel modules signatur << 
207         depends on IMA_APPRAISE_BUILD_POLICY   << 
208         default n                              << 
209         help                                   << 
210           Enabling this rule will require all  << 
211           and verified by a public key on the  << 
212                                                << 
213           Kernel module signatures can only be << 
214           via the finit_module syscall. Enabli << 
215           the usage of the init_module syscall << 
216                                                << 
217 config IMA_APPRAISE_REQUIRE_POLICY_SIGS        << 
218         bool "Appraise IMA policy signature"   << 
219         depends on IMA_APPRAISE_BUILD_POLICY   << 
220         default n                              << 
221         help                                   << 
222           Enabling this rule will require the  << 
223           and verified by a key on the trusted << 
224                                                << 
225 config IMA_APPRAISE_BOOTPARAM                  << 
226         bool "ima_appraise boot parameter"     << 
227         depends on IMA_APPRAISE                << 
228         default y                                 151         default y
229         help                                      152         help
230           This option enables the different "i !! 153            This option requires that all keys added to the .ima
231           (eg. fix, log) from the boot command !! 154            keyring be signed by a key on the system trusted keyring.
232                                                   155 
233 config IMA_APPRAISE_MODSIG                     !! 156            This option is deprecated in favor of INTEGRITY_TRUSTED_KEYRING
234         bool "Support module-style signatures  << 
235         depends on IMA_APPRAISE                << 
236         depends on INTEGRITY_ASYMMETRIC_KEYS   << 
237         select PKCS7_MESSAGE_PARSER            << 
238         select MODULE_SIG_FORMAT               << 
239         default n                              << 
240         help                                   << 
241            Adds support for signatures appende << 
242            appended signature is the same used << 
243            The modsig keyword can be used in t << 
244            to accept such signatures.          << 
245                                                   157 
246 config IMA_KEYRINGS_PERMIT_SIGNED_BY_BUILTIN_O    158 config IMA_KEYRINGS_PERMIT_SIGNED_BY_BUILTIN_OR_SECONDARY
247         bool "Permit keys validly signed by a  !! 159         bool "Permit keys validly signed by a built-in or secondary CA cert (EXPERIMENTAL)"
248         depends on SYSTEM_TRUSTED_KEYRING         160         depends on SYSTEM_TRUSTED_KEYRING
249         depends on SECONDARY_TRUSTED_KEYRING      161         depends on SECONDARY_TRUSTED_KEYRING
250         depends on INTEGRITY_ASYMMETRIC_KEYS      162         depends on INTEGRITY_ASYMMETRIC_KEYS
251         select INTEGRITY_TRUSTED_KEYRING          163         select INTEGRITY_TRUSTED_KEYRING
252         default n                                 164         default n
253         help                                      165         help
254           Keys may be added to the IMA or IMA     166           Keys may be added to the IMA or IMA blacklist keyrings, if the
255           key is validly signed by a CA cert i !! 167           key is validly signed by a CA cert in the system built-in or
256           machine (if configured), or secondar !! 168           secondary trusted keyrings.
257           key must also have the digitalSignat << 
258                                                   169 
259           Intermediate keys between those the     170           Intermediate keys between those the kernel has compiled in and the
260           IMA keys to be added may be added to    171           IMA keys to be added may be added to the system secondary keyring,
261           provided they are validly signed by     172           provided they are validly signed by a key already resident in the
262           built-in, machine (if configured) or !! 173           built-in or secondary trusted keyrings.
263                                                   174 
264 config IMA_BLACKLIST_KEYRING                      175 config IMA_BLACKLIST_KEYRING
265         bool "Create IMA machine owner blackli    176         bool "Create IMA machine owner blacklist keyrings (EXPERIMENTAL)"
266         depends on SYSTEM_TRUSTED_KEYRING         177         depends on SYSTEM_TRUSTED_KEYRING
267         depends on INTEGRITY_TRUSTED_KEYRING   !! 178         depends on IMA_TRUSTED_KEYRING
268         default n                                 179         default n
269         help                                      180         help
270            This option creates an IMA blacklis    181            This option creates an IMA blacklist keyring, which contains all
271            revoked IMA keys.  It is consulted     182            revoked IMA keys.  It is consulted before any other keyring.  If
272            the search is successful the reques    183            the search is successful the requested operation is rejected and
273            an error is returned to the caller.    184            an error is returned to the caller.
274                                                   185 
275 config IMA_LOAD_X509                              186 config IMA_LOAD_X509
276         bool "Load X509 certificate onto the '    187         bool "Load X509 certificate onto the '.ima' trusted keyring"
277         depends on INTEGRITY_TRUSTED_KEYRING   !! 188         depends on IMA_TRUSTED_KEYRING
278         default n                                 189         default n
279         help                                      190         help
280            File signature verification is base    191            File signature verification is based on the public keys
281            loaded on the .ima trusted keyring.    192            loaded on the .ima trusted keyring. These public keys are
282            X509 certificates signed by a trust    193            X509 certificates signed by a trusted key on the
283            .system keyring.  This option enabl    194            .system keyring.  This option enables X509 certificate
284            loading from the kernel onto the '.    195            loading from the kernel onto the '.ima' trusted keyring.
285                                                   196 
286 config IMA_X509_PATH                              197 config IMA_X509_PATH
287         string "IMA X509 certificate path"        198         string "IMA X509 certificate path"
288         depends on IMA_LOAD_X509                  199         depends on IMA_LOAD_X509
289         default "/etc/keys/x509_ima.der"          200         default "/etc/keys/x509_ima.der"
290         help                                      201         help
291            This option defines IMA X509 certif    202            This option defines IMA X509 certificate path.
292                                                   203 
293 config IMA_APPRAISE_SIGNED_INIT                   204 config IMA_APPRAISE_SIGNED_INIT
294         bool "Require signed user-space initia    205         bool "Require signed user-space initialization"
295         depends on IMA_LOAD_X509                  206         depends on IMA_LOAD_X509
296         default n                                 207         default n
297         help                                      208         help
298            This option requires user-space ini    209            This option requires user-space init to be signed.
299                                                << 
300 config IMA_MEASURE_ASYMMETRIC_KEYS             << 
301         bool                                   << 
302         depends on ASYMMETRIC_PUBLIC_KEY_SUBTY << 
303         default y                              << 
304                                                << 
305 config IMA_QUEUE_EARLY_BOOT_KEYS               << 
306         bool                                   << 
307         depends on IMA_MEASURE_ASYMMETRIC_KEYS << 
308         depends on SYSTEM_TRUSTED_KEYRING      << 
309         default y                              << 
310                                                << 
311 config IMA_SECURE_AND_OR_TRUSTED_BOOT          << 
312        bool                                    << 
313        depends on IMA_ARCH_POLICY              << 
314        help                                    << 
315           This option is selected by architect << 
316           trusted boot based on IMA runtime po << 
317                                                << 
318 config IMA_DISABLE_HTABLE                      << 
319         bool "Disable htable to allow measurem << 
320         default n                              << 
321         help                                   << 
322            This option disables htable to allo << 
323                                                << 
324 endif                                          << 
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php