From mboxrd@z Thu Jan 1 00:00:00 1970 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=-2.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_2 autolearn=no 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 EFEABCA9EAD for ; Sun, 20 Oct 2019 16:09:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C641521A4A for ; Sun, 20 Oct 2019 16:09:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571587748; bh=2rqZqTghk0jq/6poDX1vz2pfYzf7Qp8iUns4NuEy5NQ=; h=Subject:From:To:Cc:Date:In-Reply-To:References:List-ID:From; b=wJwpTd4FiCBzBY8kG4l7TAnLDvqxe+Ah+KxZlmgozwyU3kbmLceuxDEaaOOKQis9P cZVBu1zO4fpuvdsRZP5nQxF1BZbuWAfeo0BbSLlGPfh9biZxnaHdEP8uECeL+0b3dy 8K3Qe8itx3R5RjWR6wpzqlNK13JH/Xzk7tYfKzm0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726598AbfJTQJG (ORCPT ); Sun, 20 Oct 2019 12:09:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:45756 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726482AbfJTQJF (ORCPT ); Sun, 20 Oct 2019 12:09:05 -0400 Received: from localhost.localdomain (ool-18bba523.dyn.optonline.net [24.187.165.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AAB83218BA; Sun, 20 Oct 2019 16:09:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571587744; bh=2rqZqTghk0jq/6poDX1vz2pfYzf7Qp8iUns4NuEy5NQ=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=HZkr9mE9kNuZvNX5TVBK80qFqOhhKOI6Vd4XPcDsexisoiZQIUZLZ/LAj/FksDrGR bgMOem4aYqutYg8IUTz77yWm6QiAJnF4ImF78HC7TIBhqG66WXDFG2MSG0pQ0AA/ea uVPisOxbE+dqQv9ilAzF5wVw96sXtT4B8LpkVHCY= Message-ID: <1571587740.5104.10.camel@kernel.org> Subject: Re: [PATCH v8 7/8] ima: check against blacklisted hashes for files with modsig From: Mimi Zohar To: Nayna Jain , linuxppc-dev@ozlabs.org, linux-efi@vger.kernel.org, linux-integrity@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Ard Biesheuvel , Jeremy Kerr , Matthew Garret , Greg Kroah-Hartman , Claudio Carvalho , George Wilson , Elaine Palmer , Eric Ricther , Oliver O'Halloran , Prakhar Srivastava , Lakshmi Ramasubramanian Date: Sun, 20 Oct 2019 12:09:00 -0400 In-Reply-To: <1571587602.5104.8.camel@linux.ibm.com> References: <1571508377-23603-1-git-send-email-nayna@linux.ibm.com> <1571508377-23603-8-git-send-email-nayna@linux.ibm.com> <1571587602.5104.8.camel@linux.ibm.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.5 (3.20.5-1.fc24) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2019-10-20 at 12:06 -0400, Mimi Zohar wrote: > On Sat, 2019-10-19 at 14:06 -0400, Nayna Jain wrote: > > Asymmetric private keys are used to sign multiple files. The kernel > > currently support checking against blacklisted keys. However, if the > > public key is blacklisted, any file signed by the blacklisted key will > > automatically fail signature verification. We might not want to blacklist > > all the files signed by a particular key, but just a single file. > > Blacklisting the public key is not fine enough granularity. > > > > This patch adds support for checking against the blacklisted hash of the > > file based on the IMA policy. The blacklisted hash is the file hash > > without the appended signature. Defined is a new policy option > > "appraise_flag=check_blacklist". > > Please add an example of how to blacklist a file with an appended > signature.  The simplest example that works on x86 as well as Power > would be blacklisting a kernel module.  The example should include > calculating the kernel module hash without the appended signature, > enabling the Kconfig option (CONFIG_SYSTEM_BLACKLIST_HASH_LIST), and > the blacklist hash format (eg. "bin:"). And of course, the IMA appraise kernel module policy rule containing "appraise_flag=check_blacklist". thanks, Mimi