linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: dbaryshkov@gmail.com
To: linux-integrity@vger.kernel.org
Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
Subject: [PATCH] evmctl: support verification of portable EVM signatures
Date: Thu, 26 Mar 2020 19:27:23 +0300	[thread overview]
Message-ID: <20200326162723.3716670-1-dbaryshkov@gmail.com> (raw)

From: Dmitry Baryshkov <dbaryshkov@gmail.com>

EVM signature code checked explicitly checked for signature type to be
EVM_IMA_XATTR_DIGSIG (0x03). Allow it to be either EVM_IMA_XATTR_DIGSIG
or EVM_XATTR_PORTABLE_DIGSIG.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
---
 src/evmctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/evmctl.c b/src/evmctl.c
index b02be8b1507a..b3f6f65523ef 100644
--- a/src/evmctl.c
+++ b/src/evmctl.c
@@ -824,7 +824,7 @@ static int verify_evm(const char *file)
 		return len;
 	}
 
-	if (sig[0] != 0x03) {
+	if (sig[0] != EVM_IMA_XATTR_DIGSIG || sig[0] != EVM_XATTR_PORTABLE_DIGSIG) {
 		log_err("%s has no signature\n", xattr_evm);
 		return -1;
 	}
-- 
2.25.1


                 reply	other threads:[~2020-03-26 16:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200326162723.3716670-1-dbaryshkov@gmail.com \
    --to=dbaryshkov@gmail.com \
    --cc=linux-integrity@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).