-
Notifications
You must be signed in to change notification settings - Fork 626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detect out-of-spec size requirement for some FFS sections #178
Labels
Comments
NikolajSchlej
changed the title
[FFS Parser] Detect out-of-spec size requirement for FFS sections
[Engine] Detect out-of-spec size requirement for FFS sections
Jan 25, 2020
NikolajSchlej
changed the title
[Engine] Detect out-of-spec size requirement for FFS sections
Detect out-of-spec size requirement for FFS sections
Jan 25, 2020
Found an image that has the issue, but it only has it for Tiano-compressed sections, so needs further investigation. I can implement a warning about such a case for non-compressed sections and see if anybody will ever catch it on a live image. |
Merged
NikolajSchlej
changed the title
Detect out-of-spec size requirement for FFS sections
Detect out-of-spec size requirement for some FFS sections
Aug 27, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is a small number of EFI images that treat UEFI specification incorrectly and instead of only ensuring that offsetof(FFS_section) % 4 == 0 ("FFS sections must be aligned to 4-byte boundary") they additionally ensure that sizeof(FFS_section) % 4 == 0 ("FFS section size is a multiple of 4").
This is fairly easy to detect (by checking for additional 1-3 bytes that are stored after the FFS section not having a size that's multiple of 4), and it needs to be preserved during rebuild (or the resulting image will crash in PeiCore/DxeCore because of buffer overflow).
The text was updated successfully, but these errors were encountered: