linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ima: require CONFIG_MODULES for IMA_APPRAISE_MODSIG
@ 2021-04-22 13:29 Arnd Bergmann
  2021-04-22 17:23 ` Nayna
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2021-04-22 13:29 UTC (permalink / raw)
  To: Mimi Zohar, Dmitry Kasatkin, James Morris, Serge E. Hallyn,
	Stefan Berger, Nayna Jain
  Cc: Arnd Bergmann, John Johansen, Tyler Hicks, Bruno Meneguele,
	Alexander A. Klimov, linux-integrity, linux-security-module,
	linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

When module support is disabled, CONFIG_MODULE_SIG_HASH cannot
be set either, so the build process fails with an error

certs/Makefile:52: *** Could not determine digest type to use from kernel config.  Stop.

when IMA_APPRAISE_MODSIG is set but modules are not.

Add a Kconfig dependency to prevent this configuration.

Fixes: 0165f4ca223b ("ima: enable signing of modules with build time generated key")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 security/integrity/ima/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/security/integrity/ima/Kconfig b/security/integrity/ima/Kconfig
index 12e9250c1bec..2c36144cdd24 100644
--- a/security/integrity/ima/Kconfig
+++ b/security/integrity/ima/Kconfig
@@ -242,6 +242,7 @@ config IMA_APPRAISE_MODSIG
 	bool "Support module-style signatures for appraisal"
 	depends on IMA_APPRAISE
 	depends on INTEGRITY_ASYMMETRIC_KEYS
+	depends on MODULES
 	select PKCS7_MESSAGE_PARSER
 	select MODULE_SIG_FORMAT
 	default n
-- 
2.29.2


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

* Re: [PATCH] ima: require CONFIG_MODULES for IMA_APPRAISE_MODSIG
  2021-04-22 13:29 [PATCH] ima: require CONFIG_MODULES for IMA_APPRAISE_MODSIG Arnd Bergmann
@ 2021-04-22 17:23 ` Nayna
  0 siblings, 0 replies; 2+ messages in thread
From: Nayna @ 2021-04-22 17:23 UTC (permalink / raw)
  To: Arnd Bergmann, Mimi Zohar, Dmitry Kasatkin, James Morris,
	Serge E. Hallyn, Stefan Berger, Nayna Jain, Randy Dunlap,
	Stephen Rothwell
  Cc: Arnd Bergmann, John Johansen, Tyler Hicks, Bruno Meneguele,
	Alexander A. Klimov, linux-integrity, linux-security-module,
	linux-kernel


On 4/22/21 9:29 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> When module support is disabled, CONFIG_MODULE_SIG_HASH cannot
> be set either, so the build process fails with an error
>
> certs/Makefile:52: *** Could not determine digest type to use from kernel config.  Stop.
>
> when IMA_APPRAISE_MODSIG is set but modules are not.
>
> Add a Kconfig dependency to prevent this configuration.
>
> Fixes: 0165f4ca223b ("ima: enable signing of modules with build time generated key")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Thanks Arnd !!

This fix solves the config issue, but adds an unnecessary MODULES 
dependency on APPRAISE_MODSIG. APPRAISE_MODSIG can be used for kernel 
image(appended signature) as well as for kernel modules.

I am working on the fix. I am sorry for the delay, I got stuck with some 
urgent issues early this week.

Thanks & Regards,

       - Nayna


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

end of thread, other threads:[~2021-04-22 17:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-22 13:29 [PATCH] ima: require CONFIG_MODULES for IMA_APPRAISE_MODSIG Arnd Bergmann
2021-04-22 17:23 ` Nayna

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).