linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] IMA: Turn IMA_MEASURE_ASYMMETRIC_KEYS off by default
@ 2020-01-21 17:13 Lakshmi Ramasubramanian
  2020-01-21 17:34 ` James Bottomley
  0 siblings, 1 reply; 10+ messages in thread
From: Lakshmi Ramasubramanian @ 2020-01-21 17:13 UTC (permalink / raw)
  To: zohar, linux-integrity; +Cc: sashal, linux-kernel

Enabling IMA and ASYMMETRIC_PUBLIC_KEY_SUBTYPE configs will
automatically enable the IMA hook to measure asymmetric keys. Keys
created or updated early in the boot process are queued up whether
or not a custom IMA policy is provided. Although the queued keys will
be freed if a custom IMA policy is not loaded within 5 minutes, it could
still cause significant performance impact on smaller systems.

This patch turns the config IMA_MEASURE_ASYMMETRIC_KEYS off by default.
Since a custom IMA policy that defines key measurement is required to
measure keys, systems that require key measurement can enable this
config option in addition to providing a custom IMA policy.

Signed-off-by: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
---
 security/integrity/ima/Kconfig | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/security/integrity/ima/Kconfig b/security/integrity/ima/Kconfig
index 355754a6b6ca..8e678219ee9e 100644
--- a/security/integrity/ima/Kconfig
+++ b/security/integrity/ima/Kconfig
@@ -312,7 +312,19 @@ config IMA_APPRAISE_SIGNED_INIT
 	   This option requires user-space init to be signed.
 
 config IMA_MEASURE_ASYMMETRIC_KEYS
-	bool
+	bool "Enable asymmetric keys measurement on key create or update"
 	depends on IMA
 	depends on ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y
-	default y
+	default n
+	help
+	   This option enables measuring asymmetric keys when the key
+	   is created or updated. Additionally a custom IMA policy that
+	   defines key measurement should also be loaded.
+
+	   If this option is enabled, keys created or updated early in
+	   the boot process are queued up. The queued keys are processed
+	   when a custom IMA policy is loaded. But if a custom IMA policy
+	   is not loaded within 5 minutes after IMA subsystem is initialized,
+	   any queued keys are just freed. Keys created or updated after
+	   a custom IMA policy is loaded will be processed immediately and
+	   not queued.
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-01-22 20:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-21 17:13 [PATCH] IMA: Turn IMA_MEASURE_ASYMMETRIC_KEYS off by default Lakshmi Ramasubramanian
2020-01-21 17:34 ` James Bottomley
2020-01-21 18:00   ` Lakshmi Ramasubramanian
2020-01-21 19:13   ` Mimi Zohar
2020-01-21 19:52     ` James Bottomley
2020-01-21 20:38       ` Lakshmi Ramasubramanian
2020-01-22 20:02         ` Mimi Zohar
2020-01-22 20:05           ` Lakshmi Ramasubramanian
2020-01-22 20:54             ` Mimi Zohar
2020-01-22 12:23       ` Mimi Zohar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).