Desync between stub hashes and actual hashes due to non-reproducibility #68
Labels
No labels
bug
dependency
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
review-next
security
stub
tool
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: raito/lanzaboote#68
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Supposedly, given a (kernel, initrd), we generate a stub with the kernelh and initrdh corresponding.
The issue is that if we regenerate those files, if they are not reproducible, we have no guarantee the hash will be the same unfortunately.
We should try actively to detect those situations and update the stub hashes.
Blindly updating the stub hashes poses a potential vulnerability IMO.
Maybe, we can somehow identify broken generations and try to regenerate them (i.e. regenerate stub, kernel, initrd together). Although, this means that other generations that worked before but point at the same kernel/initrd are now suddenly broken.
There might also be some weird interactions with appending secrets to an initrd.
Now that I have thought about this in more detail, I have realized that this was actually never an issue. We never overwrite a (kernel, initrd, stub) path if it already exists and always use the hash of the file that is already on the ESP. So even if e.g. the kernel is not reproducible we would not know/care because it would just not be copied to the ESP and the
kernelh
in the stub would be retrieved from the already existing file on the ESP.That's true as long as we do not interrupt lanzatool I think?
That is a general problem with not overwriting files if anything at that path exists, but is not specific to reproducibility. We can open a separate issue.