Repository navigation
Fix hash calculation when both signature sections start in the same chunk - #268
Open
datah4zard wants to merge 1 commit into
Open
datah4zard wants to merge 1 commit into
datah4zard wants to merge 1 commit into
Conversation
Author
|
The CI failures don't seem to be related to my change. It's failing to pull Docker images. |
Member
|
@datah4zard seems reasonable. Could you provide an example AppImage to test against, please? |
Member
|
I'll have a look at the CI problems. |
Author
Our pipeline actually just put one out with my GPG signature on it: https://github.com/OpenFusionProject/OpenFusionLauncher/releases/download/2.4.0-beta.1/OpenFusionLauncher.AppImage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
readBytes()subtracted the cumulative number of bytes read into the chunk buffer frombytesLeftInChunk, rather than the number of bytes it had just read. When .sha256_sig and .sig_key both begin within the same 4 KiB chunk,readBytes()is called a second time in that chunk, sobytesLeftInChunkis decremented by too much and the rest of the chunk is dropped from the hash.The standard type2 runtime places these sections in different chunks, so this went unnoticed. uruntime places both in the same chunk, so correctly signed uruntime-based AppImages fail validation.
Tested the fix against my project's AppImage, which uses uruntime. Also tested a standard runtime AppImage to ensure validation still passes for those.