Skip to content

eBPF-based security platform

attest: compare the whole PCR mask the evidence lists

Daniel Borkmann52662df8cfd9
diff --git a/util/attest.c b/util/attest.c
index c2a91ccb..f3928175 100644
--- a/util/attest.c
+++ b/util/attest.c
@@ -1029,7 +1029,7 @@ int attest_verify(const char *evidence, size_t len,
__u8 digest[32] = {};
bool complete =
quote.type == TPM_ST_ATTEST_QUOTE &&
- quote.pcr_mask == (__u32)p->pcr_mask &&
+ p->pcr_mask == (__s64)quote.pcr_mask &&
p->pcr_have == quote.pcr_mask;
bool hashed = false;
bool vouched;