-
Notifications
You must be signed in to change notification settings - Fork 675
No way to continue without a test suite #270
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
Comments
This image has a treasure trove of Phoenix NVRAM things, can be used to test that part of NVRAM parser later. |
Would it be possible to have a list of these edge cases that are historically supported so that anyone who has or knows how to re-find such samples can do so? |
Let's make such a list by reading parser sources:
|
Intel regions:
|
Raw Areas:
|
Volumes:
|
FFS Files:
|
FFS Sections:
|
Still a ton of stuff remain for variations of NVRAM, ME, BPDT, BootGuard and other smaller parsers, but let's collect the above first and see how it goes. |
Yet another breakage that could have been caught by a test: 19ab607 |
Mentioning #219 here, have some images attached there. |
Mentioning #234, which has a false positive "Intel" Flash Descriptor detection sample. |
Mentioning #368, regression in A66 and A67 that could be caught by adding Apple SCAP files to a test suite. |
Sample for custom Microsoft LZMA GUID-defined section |
Here is a sample for the AMD ZLIB GUID-defined Section (EFI_GUIDED_SECTION_ZLIB_AMD, CE3233F5-2CD6-4D87-9152-4A238BB6D1C4): For the GZIP one (EFI_GUIDED_SECTION_GZIP, 1D301FE9-BE79-4353-91C2-D23BC959AE0C), I managed to find a sample within a Pixel 3 bootloader image: Question for @NikolajSchlej : UEFITool has references to another AMD ZLIB GUID (EFI_GUIDED_SECTION_ZLIB_AMD2, 991EFAC0-E260-416B-A4B8-3B153072B804), as well as an "AMD_COMPRESSED_RAW_FILE_GUID" (20BC8AC9-94D1-4208-AB28-5D673FD73487). Both of these were added at a7cf9cc (June 25, 2023) but, as far as I can tell, these are not used/implemented. Also, I cannot find any sample(s) for them (looked in Issues/PRs and googling). Do you happen to know where I can find samples for these (orphan) GUID definitions? |
@platomav, both are from AMD-based files for recent Ryzen machines, like this one. We need a discussion on parsing RAW files possible consequences of that, because @Ykidia also suggested adding several RAW file parsers in his recent PR. |
Thank you Nikolaj! Indeed, it will become necessary to start parsing non-standard areas (non-UEFI, Raw, Padding etc) for stuff which should not be there but unfortunately is. The safest addition is FV detection (due to the signature and various validations). But it may also require some magic to detect Files and/or Sections. There are known cases where vendors place Computrace modules within non-UEFI data. I've even seen FVs within PE32 Sections recently, although this last one is probably not something that is expected to be parsed (part of the binary's data, perhaps). This topic requires its own ticket/issue for sure. Attaching here samples for guid-defined sections related to compression, so that we have them in one place: |
Long ago, when trees were big and bits were played live, I've developed those parsers in Qt-flavored C++, using lots and lots of different EFI and UEFI images as possible input, and adding a lot of really strange code to make most of them parsing into something resembling a valid tree structure.
Sadly, today in 2022 almost none of those original images are available to re-test that old code, so refactoring it got unnecessary complex, enough to discourage any new people to ever touch anything here. I myself was discouraged enough for many years.
To make this pain a lot easier, we seriously need to:
The text was updated successfully, but these errors were encountered: