Allow Absence of Security Data - #67
Open
ibv-meyer wants to merge 1 commit into
Open
Conversation
WinPE images created with Microsoft ImageX are not necessarily equipped with security data. This resulted in Wimboot failing to read the image content while other tools (e.g. wimlib-based tools like wiminfo) successfully parsed these images. The absence of security data might be signalled with a length of 0 in the security header, although we must still consider the minimum header length of 8 bytes in order to find the root directory entry.
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.
While using wimboot with one of our customers custom WinPE images, we were having difficulties loading it, although it worked seamlessly when booted by GRUB. This error was printed multiple times
and in the end
In contrast, a Win11 image as provided by Microsoft was successfully loaded by wimboot.
While diving into this issue, it turned out that WinPE images created by Microsoft ImageX are not necessarily equipped with security data. This resulted in Wimboot failing to read the image content while other tools (e.g. wimlib-based tools like wiminfo) successfully parsed these images.
The absence of security data can be signalled in the image with a length of 0, although we must still consider a minimum security data header length of 8, e.g. by overwriting the security length with 8 in order to enable correct image parsing. As soon as we applied the commit provided in this PR, the custom WinPE image booted like a charme, even with SecureBoot enabled.
Unfortunately I cannot provide a WinPE image to you to help you reproducing this issue, as it contains lots of proprietary data, but it turned out that wimlib uses a similar workaround.