From patchwork Thu Apr 22 13:29:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 12218477 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3582C433B4 for ; Thu, 22 Apr 2021 13:30:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9ABD3613DE for ; Thu, 22 Apr 2021 13:30:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232844AbhDVNay (ORCPT ); Thu, 22 Apr 2021 09:30:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:57104 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230005AbhDVNau (ORCPT ); Thu, 22 Apr 2021 09:30:50 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 440136143B; Thu, 22 Apr 2021 13:30:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1619098215; bh=C/N43WVFiAate8dTxtGVLCNXK5ejQ6QClZ0OGp0igFg=; h=From:To:Cc:Subject:Date:From; b=QpYHQy8SOy0EUYU1mSRuGwKtDDDNtQf01s4lNuwJt/PqFZFodPERnsq6qp3RHqy4p gc8fShSOZEtlpcKGmuFkET8LIvqmlgWf4ijvUPKoLTtiNfo4UCszQciSMc2orwKcOF D6EbaHlCn97Tah2INl5MzNA70i/UBCPdWzCngKJPF6Zr/Uki97uwyjr7/IiUC4zhh6 jRzkGkdVKRLMktkXPrRjBtf5/PwKm8I7Aqy9NmiIy6ko7dxAAdSY0aVjNEkXa2X/z3 eWMngcN7ZLzuHwc6bzAovzC03bAWCPElKD5m4CJFe4Cy6voUPYICnr+kG7p2aHz2b6 SMSEqAqvwaa/g== From: Arnd Bergmann 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@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ima: require CONFIG_MODULES for IMA_APPRAISE_MODSIG Date: Thu, 22 Apr 2021 15:29:48 +0200 Message-Id: <20210422132956.1628059-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: From: Arnd Bergmann 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 --- 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