CONFIG_IMA Integrity Measurement Architecture(IMA)
The Trusted Computing Group(TCG) runtime Integrity Measurement Architecture(IMA) maintains a list of hash values of executables and other sensitive system files, as they are read or executed. If an attacker manages to change the contents of an important system file being measured, we can tell.
If your system has a TPM chip, then IMA also maintains an aggregate integrity value over this list inside the TPM hardware, so that the TPM can prove to a third party whether or not critical system files have been modified. Read <https://www.usenix.org/events/sec04/tech/sailer.html> to learn more about IMA. If unsure, say N.
- Depends on
INTEGRITY - Selects
SECURITYFS if INTEGRITY - Selects
CRYPTO if INTEGRITY - Selects
CRYPTO_HMAC if INTEGRITY - Selects
CRYPTO_SHA1 if INTEGRITY - Selects
CRYPTO_HASH_INFO if INTEGRITY - Selects
SECURITY_PATH if INTEGRITY - Selects
TCG_TPM if INTEGRITY && HAS_IOMEM - Selects
TCG_TIS if INTEGRITY && TCG_TPM && X86 - Selects
TCG_CRB if INTEGRITY && TCG_TPM && ACPI - Selects
TCG_IBMVTPM if INTEGRITY && TCG_TPM && PPC_PSERIES - Selects
INTEGRITY_AUDIT if INTEGRITY && AUDIT
If IMA
CONFIG_IMA_KEXEC Enable carrying the IMA measurement list across a soft boot
TPM PCRs are only reset on a hard reboot. In order to validate a TPM's quote after a soft boot, the IMA measurement list of the running kernel must be saved and restored on boot.
Depending on the IMA policy, the measurement list can grow to be very large.
- Depends on
INTEGRITY && IMA && TCG_TPM && HAVE_IMA_KEXEC
CONFIG_IMA_MEASURE_PCR_IDX PCR Index for Aggregate
IMA_MEASURE_PCR_IDX determines the TPM PCR register index that IMA uses to maintain the integrity aggregate of the measurement list. Most attestation tooling expects PCR 10.
The default is almost always what you want. Only change this if you know what you are doing.
CONFIG_IMA_LSM_RULES
Disabling this option will disregard LSM based policy rules.
- Depends on
INTEGRITY && IMA && AUDIT && (SECURITY_SELINUX || SECURITY_SMACK || SECURITY_APPARMOR)
Default template
Select the default IMA measurement template.
The original 'ima' measurement list template contains a hash, defined as 20 bytes, and a null terminated pathname, limited to 255 characters. The 'ima-ng' measurement list template permits both larger hash digests and longer pathnames. The configured default template can be replaced by specifying "ima_template=" on the boot command line.
CONFIG_IMA_DEFAULT_TEMPLATE
Default integrity hash algorithm
Select the default hash algorithm used for the measurement list, integrity appraisal and audit log. The compiled default hash algorithm can be overwritten using the kernel command line 'ima_hash=' option.
CONFIG_IMA_DEFAULT_HASH_SHA1 SHA1 (default)
- Depends on
INTEGRITY && IMA && CRYPTO_SHA1=y
CONFIG_IMA_DEFAULT_HASH_SHA256 SHA256
- Depends on
INTEGRITY && IMA && CRYPTO_SHA256=y
CONFIG_IMA_DEFAULT_HASH_SHA512 SHA512
- Depends on
INTEGRITY && IMA && CRYPTO_SHA512=y
CONFIG_IMA_DEFAULT_HASH_WP512 WP512
- Depends on
INTEGRITY && IMA && CRYPTO_WP512=y
CONFIG_IMA_DEFAULT_HASH_SM3 SM3
- Depends on
INTEGRITY && IMA && CRYPTO_SM3=y
CONFIG_IMA_DEFAULT_HASH
CONFIG_IMA_WRITE_POLICY Enable multiple writes to the IMA policy
IMA policy can now be updated multiple times. The new rules get appended to the original policy. Have in mind that the rules are scanned in FIFO order so be careful when you design and add new ones.
If unsure, say N.
CONFIG_IMA_READ_POLICY Enable reading back the current IMA policy
It is often useful to be able to read back the IMA policy. It is even more important after introducing CONFIG_IMA_WRITE_POLICY. This option allows the root user to see the current policy rules.
CONFIG_IMA_APPRAISE Appraise integrity measurements
This option enables local measurement integrity appraisal. It requires the system to be labeled with a security extended attribute containing the file hash measurement. To protect the security extended attributes from offline attack, enable and configure EVM.
For more information on integrity appraisal refer to: <http://linux-ima.sourceforge.net> If unsure, say N.
CONFIG_IMA_ARCH_POLICY Enable loading an IMA architecture specific policy
This option enables loading an IMA architecture specific policy based on run time secure boot flags.
- Depends on
INTEGRITY && IMA && (KEXEC_SIG && IMA || IMA_APPRAISE && INTEGRITY_ASYMMETRIC_KEYS)
If IMA_APPRAISE
CONFIG_IMA_APPRAISE_BUILD_POLICY IMA build time configured policy rules
This option defines an IMA appraisal policy at build time, which is enforced at run time without having to specify a builtin policy name on the boot command line. The build time appraisal policy rules persist after loading a custom policy.
Depending on the rules configured, this policy may require kernel modules, firmware, the kexec kernel image, and/or the IMA policy to be signed. Unsigned files might prevent the system from booting or applications from working properly.
- Depends on
INTEGRITY && IMA && IMA_APPRAISE && INTEGRITY_ASYMMETRIC_KEYS
If IMA_APPRAISE_BUILD_POLICY
CONFIG_IMA_APPRAISE_REQUIRE_FIRMWARE_SIGS Appraise firmware signatures
This option defines a policy requiring all firmware to be signed, including the regulatory.db. If both this option and CFG80211_REQUIRE_SIGNED_REGDB are enabled, then both signature verification methods are necessary.
- Depends on
INTEGRITY && IMA && IMA_APPRAISE_BUILD_POLICY
CONFIG_IMA_APPRAISE_REQUIRE_KEXEC_SIGS Appraise kexec kernel image signatures
Enabling this rule will require all kexec'ed kernel images to be signed and verified by a public key on the trusted IMA keyring.
Kernel image signatures can not be verified by the original kexec_load syscall. Enabling this rule will prevent its usage.
- Depends on
INTEGRITY && IMA && IMA_APPRAISE_BUILD_POLICY
CONFIG_IMA_APPRAISE_REQUIRE_MODULE_SIGS Appraise kernel modules signatures
Enabling this rule will require all kernel modules to be signed and verified by a public key on the trusted IMA keyring.
Kernel module signatures can only be verified by IMA-appraisal, via the finit_module syscall. Enabling this rule will prevent the usage of the init_module syscall.
- Depends on
INTEGRITY && IMA && IMA_APPRAISE_BUILD_POLICY
CONFIG_IMA_APPRAISE_REQUIRE_POLICY_SIGS Appraise IMA policy signature
Enabling this rule will require the IMA policy to be signed and and verified by a key on the trusted IMA keyring.
- Depends on
INTEGRITY && IMA && IMA_APPRAISE_BUILD_POLICY
CONFIG_IMA_APPRAISE_BOOTPARAM ima_appraise boot parameter
This option enables the different "ima_appraise=" modes (eg. fix, log) from the boot command line.
- Depends on
INTEGRITY && IMA && IMA_APPRAISE
CONFIG_IMA_APPRAISE_MODSIG Support module-style signatures for appraisal
Adds support for signatures appended to files. The format of the appended signature is the same used for signed kernel modules. The modsig keyword can be used in the IMA policy to allow a hook to accept such signatures.
- Depends on
INTEGRITY && IMA && IMA_APPRAISE && INTEGRITY_ASYMMETRIC_KEYS - Selects
PKCS7_MESSAGE_PARSER if INTEGRITY && IMA && IMA_APPRAISE && INTEGRITY_ASYMMETRIC_KEYS - Selects
MODULE_SIG_FORMAT if INTEGRITY && IMA && IMA_APPRAISE && INTEGRITY_ASYMMETRIC_KEYS
CONFIG_IMA_KEYRINGS_PERMIT_SIGNED_BY_BUILTIN_OR_SECONDARY Permit keys validly signed by a built-in, machine (if configured) or secondary
Keys may be added to the IMA or IMA blacklist keyrings, if the key is validly signed by a CA cert in the system built-in, machine (if configured), or secondary trusted keyrings. The key must also have the digitalSignature usage set.
Intermediate keys between those the kernel has compiled in and the IMA keys to be added may be added to the system secondary keyring, provided they are validly signed by a key already resident in the built-in, machine (if configured) or secondary trusted keyrings.
- Depends on
INTEGRITY && IMA && SYSTEM_TRUSTED_KEYRING && SECONDARY_TRUSTED_KEYRING && INTEGRITY_ASYMMETRIC_KEYS - Selects
INTEGRITY_TRUSTED_KEYRING if INTEGRITY && IMA && SYSTEM_TRUSTED_KEYRING && SECONDARY_TRUSTED_KEYRING && INTEGRITY_ASYMMETRIC_KEYS
CONFIG_IMA_BLACKLIST_KEYRING Create IMA machine owner blacklist keyrings (EXPERIMENTAL)
This option creates an IMA blacklist keyring, which contains all revoked IMA keys. It is consulted before any other keyring. If the search is successful the requested operation is rejected and an error is returned to the caller.
- Depends on
INTEGRITY && IMA && SYSTEM_TRUSTED_KEYRING && INTEGRITY_TRUSTED_KEYRING
CONFIG_IMA_LOAD_X509 Load X509 certificate onto the '.ima' trusted keyring
File signature verification is based on the public keys loaded on the .ima trusted keyring. These public keys are X509 certificates signed by a trusted key on the .system keyring. This option enables X509 certificate loading from the kernel onto the '.ima' trusted keyring.
- Depends on
INTEGRITY && IMA && INTEGRITY_TRUSTED_KEYRING
If IMA_LOAD_X509
CONFIG_IMA_X509_PATH IMA X509 certificate path
This option defines IMA X509 certificate path.
- Depends on
INTEGRITY && IMA && IMA_LOAD_X509
CONFIG_IMA_APPRAISE_SIGNED_INIT Require signed user-space initialization
This option requires user-space init to be signed.
- Depends on
INTEGRITY && IMA && IMA_LOAD_X509
CONFIG_IMA_MEASURE_ASYMMETRIC_KEYS
- Depends on
INTEGRITY && IMA && ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y
CONFIG_IMA_QUEUE_EARLY_BOOT_KEYS
- Depends on
INTEGRITY && IMA && IMA_MEASURE_ASYMMETRIC_KEYS && SYSTEM_TRUSTED_KEYRING
CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT
This option is selected by architectures to enable secure and/or trusted boot based on IMA runtime policies.
- Depends on
INTEGRITY && IMA && IMA_ARCH_POLICY
CONFIG_IMA_DISABLE_HTABLE Disable htable to allow measurement of duplicate records
This option disables htable to allow measurement of duplicate records.
CONFIG_IMA_KEXEC_EXTRA_MEMORY_KB Extra memory for IMA measurements added during kexec soft reboot
IMA_KEXEC_EXTRA_MEMORY_KB determines the extra memory to be allocated (in kb) for IMA measurements added during kexec soft reboot. If set to the default value of 0, an extra half page of memory for those additional measurements will be allocated.
CONFIG_IMA_STAGING Support for staging the measurements list
Add support for staging the measurements list.
It allows user space to stage the measurements list for deletion and to delete the staged measurements after confirmation.
Or, alternatively, it allows user space to specify N measurements records to stage internally, so that they can be immediately deleted.
On kexec, staging is aborted and any staged measurement records are copied to the secondary kernel.
CONFIG_IMA_INIT_LATE_SYNC Initialise IMA at late_initcall_sync
This option initialises IMA at late_initcall_sync for platforms where TPM device probing is deferred. When this option is enabled, modules that access files in the initramfs through usermode helper calls such as request_module() during initcall must not be built-in. Otherwise, IMA may miss file measurements for them.