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.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FSL_HELO_FAKE,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 005C1C433E3 for ; Thu, 27 Aug 2020 01:00:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CBDD420B1F for ; Thu, 27 Aug 2020 01:00:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598490018; bh=MuJK6Fq+nQHmaii7dvnYwwfnvKbk+kTDRV/j52dDGiI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=wokNwl89Pwm1nrl1F06L4I79vS5d3A16X51C97+IFulk/tuKf+cr5NtGi6uv6PgzP ZIjSWylhKIFJfFv0yiIrh8DH0M/PBf4JrO3GUfTKmg0GfYAKGrOs20/snURDoETOSw vTXYVrliaLzA1nSHtMtpf2w3qG5RSwogRlsvN7q0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726804AbgH0BAS (ORCPT ); Wed, 26 Aug 2020 21:00:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:46934 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726148AbgH0BAR (ORCPT ); Wed, 26 Aug 2020 21:00:17 -0400 Received: from gmail.com (unknown [104.132.1.76]) (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 6B5DA20791; Thu, 27 Aug 2020 01:00:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598490017; bh=MuJK6Fq+nQHmaii7dvnYwwfnvKbk+kTDRV/j52dDGiI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IKgkjyjizAHqIEOeRAxxLaUn5tt7PDAwnqjns7AwvKMNXVmzm3mBAMGlDZuE0CilN SX3CfQPQtP5PAXoNxSvWfCSGMwbu/LL1CJEbDRgFR0/Ut13F3kP+cnbglGrmGscX+Q H/3PtTLYAT8bN8Z+tvLdeColWwcPQdKzaN1SK8cI= Date: Wed, 26 Aug 2020 18:00:16 -0700 From: Eric Biggers To: Mimi Zohar Cc: Chuck Lever , linux-fscrypt@vger.kernel.org, linux-integrity@vger.kernel.org, Linux NFS Mailing List Subject: Re: IMA metadata format to support fs-verity Message-ID: <20200827010016.GA2387969@gmail.com> References: <760DF127-CA5F-4E86-9703-596E95CEF12F@oracle.com> <20200826183116.GC2239109@gmail.com> <6C2D16FB-C098-43F3-A7D3-D8AC783D1AB5@oracle.com> <20200826192403.GD2239109@gmail.com> <20200826205143.GE2239109@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Wed, Aug 26, 2020 at 08:53:33PM -0400, Mimi Zohar wrote: > On Wed, 2020-08-26 at 13:51 -0700, Eric Biggers wrote: > > Of course, the bytes that are actually signed need to include not just the hash > > itself, but also the type of hash algorithm that was used. Else it's ambiguous > > what the signer intended to sign. > > > > Unfortunately, currently EVM appears to sign a raw hash, which means it is > > broken, as the hash algorithm is not authenticated. I.e. if the bytes > > e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 are signed, > > there's no way to prove that the signer meant to sign a SHA-256 hash, as opposed > > to, say, a Streebog hash. So that will need to be fixed anyway. While doing > > so, you should reserve some fields so that there's also a flag available to > > indicate whether the hash is a traditional full file hash or a fs-verity hash. > > The original EVM HMAC is still sha1, but the newer portable & immutable > EVM signature supports different hash algorithms. > Read what I wrote again. I'm talking about the bytes that are actually signed. - Eric