dissect-image: guess verity root hash from the resources we found
When dissecting an image, let's make use of the Verity data even if we got told no root hash explicitly: we can simply determine it by concatenating the data partition uuid with the verity partition uuid. Of course, on first thought this doesn't really add much: if the root hash is not pinned from somewhere, this does not guarantee trust in the image. However, this is very useful for attestation: if we have the root hash we can measure it before mounting things, even if we don't actually authenticate it. Hence, at best this helps us with attestation, at worst it doesn't improve security but certainly doesn't hurt it.
This commit is contained in:
@@ -2364,6 +2364,12 @@ int setup_namespace(const NamespaceParameters *p, char **reterr_path) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
r = dissected_image_guess_verity_roothash(
|
||||
dissected_image,
|
||||
p->verity);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
r = dissected_image_decrypt(
|
||||
dissected_image,
|
||||
NULL,
|
||||
|
||||
Reference in New Issue
Block a user