Commit graph

187 commits

Author SHA1 Message Date
Nikolaj Schlej
936b09dbf4 1) Added special subspecifier "h" for specifier "X" (hex values print), added corresponding menu option and application setting to UEFITool.
2) Fixed QHexView misalignment in Windows and macOS.
3) Added some more analysis to raw files and sections: raw files can (or can not) contain sections, raw sections can contain NVAR storage or PE/TE.
4) Improved CPU base address detection and propagation.
5) Improved FIT recognition.
7) ME region not displayed if it is in unknown format, fixed this because we still want to operate with it.
8) Small changes to Flash Descriptor parsing to get more cases for valid "Intel image". To get rid of cases when "Intel image" is already in tree but with parse error because of which "UEFI image" appears.
9) Added parsing of individual UEFI-files (these can be trimmed from UEFI-volume), displaying it as "UEFI volume part".
10) Added possibility to view/save contents of elements "Free volume space", "Free space" and such, because these can be non-empty.
11) Added info about blocks number and block size (with preliminary and stupid validity check) to volume info.
12) Added storage in settings of the following paths: open image file, save image file, open GUIDs file.
13) Added last opened files list.
14) Added permanent opened file name string to the end of the status bar.
15) Added opened file changes tracking: if the file was modified in other program while it is opened in UEFITool, there are 3 ways to act: a) ignore changes (but mark file path displayed in the status bar with italic font); b) ask user to reopen or ignore (if ignore, mark as in a); c) auto reopen changed file in UEFITool. If changes were in some way ignored, file path displayed in the right of the status bar will be marked with italic font and then become clickable: on click request to reopen appears again.
16) Switched to offset/size instead of byte array storing in each tree item.
17) For clarity - added icons to key tree items (compressed and with contents, contents now must be in root item only).
18) For usability - added expanding tree on open image (to depth level 1) and by menu command (expand all).
2025-04-23 21:44:00 +03:00
Nikolaj Schlej
7cea8ee512 Remove outdated definition of FLASH_PARAMETERS 2025-04-14 18:08:12 +07:00
Nikolaj Schlej
d61d759db2 Make sure to wrap all uses of kaitai::kstream into try-catch blocks 2025-03-16 23:37:10 +07:00
Nikolaj Schlej
7ef371957a Add initial support for Insyde H2O FlashDeviceMap rev4 2025-03-16 23:12:56 +07:00
Nikolaj Schlej
97a85f9ddc Add Microsoft LZMA section GUID 2025-03-14 07:13:06 +07:00
Nikolaj Schlej
3cb5dc0165 Add SLIC pubkey and marker parsers 2025-03-13 19:27:55 +07:00
Nikolaj Schlej
58366f48fe Add Insyde Flash Device Map parser 2025-03-13 19:27:55 +07:00
Nikolaj Schlej
489b85fd98 Rewrite VSS and VSS2 NVRAM variable parsers in KaitaiStruct 2025-03-13 19:27:55 +07:00
Nikolaj Schlej
214b356f84 Add AMIC A25LQ64 to internal JEDEC ID database 2025-02-12 08:50:50 +01:00
William Leara
0e11189644 fix a few misspellings 2023-10-13 21:46:53 -07:00
Kamay Xutax
4992474e83 Fix CPD Extension offset (reverts 29915ca)
The CPD Extensions should have the header size added as an
offset instead.
2023-08-19 15:15:51 -07:00
xutaxkamay
29915ca620 Fix CPD Manifest's partition offset
The header size needs to be probably added here, maybe it was forgotten ?

This is needed in order to get the proper base address of a CPD_EXT_IFWI_PARTITION_MANIFEST structure in the image for example in that specific case.

If I don't do this, it points to a meaningless address.

Let me know if there can be any issues with this.
2023-08-18 09:11:13 -07:00
yeggor
036be8d3bc add additional check for BPDT store size 2023-07-18 15:59:14 -07:00
Nikolaj Schlej
2b8b00d5b0 Temporary regression fix
Reverting a check added in A66, fixing #368
2023-06-23 21:12:14 -07:00
Nikolaj Schlej
b6cdc9f484 Add support for long paths in Windows 10+ 2023-06-19 18:49:53 -07:00
yeggor
d9e1fe5859 Check that volumeHeader->ExtHeaderOffset is aligned to 4 bytes 2023-03-16 16:47:51 -07:00
yeggor
2b876e2cc3 Add check for volumeHeader->ExtHeaderOffset in FfsParser::parseVolumeHeader to prevent OOB access 2023-03-16 16:47:51 -07:00
yeggor
7a25a52427 Fix OOB access with volume.mid(headerSize) 2023-03-16 16:47:51 -07:00
yeggor
ea38ab3696 Fix nullptr deref, OOB access to volumeHeader and tempHeader by checking volumeHeader->HeaderLength 2023-03-16 16:47:51 -07:00
yeggor
9c6786a27b Fix 2 OOB access crashes in FfsParser::findNextRawAreaItem 2023-03-16 16:47:51 -07:00
yeggor
6875968d97 Check partitions size before erasing to avoid memory corruption 2023-03-16 16:47:51 -07:00
Nikolaj Schlej
aa3e790fb1 Revert "Fix FfsParser issues found by fuzzing"
This reverts commit b8567d32cc.
2023-03-12 08:49:19 -07:00
Nikolaj Schlej
b8567d32cc Fix FfsParser issues found by fuzzing
Resolve alignment issue with guidToUstring
2023-02-26 16:27:27 -08:00
Nikolaj Schlej
2d1ebcc11b Fallback to RawArea parsing in case IntelDescriptor or Capsule parsing was unsuccesful 2023-02-18 08:28:15 -08:00
Nikolaj Schlej
ef7ceefa41 Temporary change UI style for Qt6-based Windows build of UEFITool to support dark mode 2023-02-11 20:19:32 -08:00
Nikolaj Schlej
33c25e8255 Add AMI v3 protected ranges hash file support 2023-02-05 20:30:20 -08:00
Nikolaj Schlej
c9939e23ec Fix possible unaligned access to UCS2 strings 2023-01-31 20:15:12 -08:00
Nikolaj Schlej
66e9f95dc3 Replace unneeded BOOLEAN with bool 2023-01-29 15:13:37 -08:00
Nikolaj Schlej
507f884635 Fix compressed flag not being applied to the items inside GZip and Zlib GUIDed sections 2023-01-28 21:56:01 -08:00
Nikolaj Schlej
19ab6076c4
Update ffsparser.cpp
Fix an issue with parsing CRC32 sections introduced in the previous commit
2023-01-03 01:17:41 -08:00
Nikolaj Schlej
7337f15ec9 Implement parsing for AMD-specific Zlib-compressed GUIDed section
Fix incorrect overflow check in parsing volume block map
2022-12-23 22:49:37 -08:00
Nikolaj Schlej
71a7336730
Fix warnings spotted by GCC 2022-11-05 11:03:50 +01:00
Nikolaj Schlej
50396d7291 Improve truncated image checks to preven UEFIExtract crashes 2022-10-15 09:20:55 +03:00
Nikolaj Schlej
c3cedba150 Fix another crash in checkProtectedRanges 2022-10-11 09:39:19 +02:00
Nikolaj Schlej
89a302e5d9 Calculate key manifest public key hashes that could be written into FPFs 2022-10-09 11:24:27 +02:00
Nikolaj Schlej
7e5e02b4b4 Improve detection of BPDT partition tables in raw areas, update the list of known BPDT entry types 2022-10-09 07:18:28 +02:00
Nikolaj Schlej
acc913769b Add workaround for Lenovo large files inside FFSv2 volumes 2022-10-07 14:40:20 +02:00
Nikolaj Schlej
6e5cc3bccc Add support for AMI ROM hole files 2022-09-14 19:04:44 +02:00
Nikolaj Schlej
011647aa30 Fix a possible crash of MeParser in case there are no valid FPT partition table entries 2022-09-14 19:04:44 +02:00
Nikolaj Schlej
a4a455d0ff Add support for x86 recovery startup AP data entries in special padding files 2022-09-14 19:04:44 +02:00
Nikolaj Schlej
a9c6f347a2 Fix another issue spotted by PVS-Studio 2022-09-10 14:47:55 +02:00
Nikolaj Schlej
22d1db8c7f Fix issues spotted by PVS-Studio and SonarCloud 2022-09-10 14:20:49 +02:00
Nikolaj Schlej
75a1374c0c Fix a type issue found by CoreQL 2022-09-10 13:59:23 +02:00
Nikolaj Schlej
934ce1f3f8 Kaitai-based Intel ACM and BootGuard parsers
As the first step towards automated parsing, this change set replaces outdated BootGuard-related parsers with shiny new KaitaiStruct-based ones.
It also does the following:
- improves Intel FIT definitions by using the relevant specification
- adds sha1, sha384, sha512 and sm3 digest implementations
- updates LZMA SDK to v22.01
- moves GUIDs out of include files to prevent multiple instantiations
- enforces C++11
- adds Kaitai-based parsers for Intel FIT, BootGuard v1 and BootGuard v2 structures
- makes many small refactorings here, there and everywhere
2022-09-10 13:14:29 +02:00
Nikolaj Schlej
7695927eec Fixed inconsistent use of %ll and %l format modifiers 2022-08-29 07:10:13 +02:00
Nikolaj Schlej
4006954bc1 Downcast all qtsizetype to UINT32 manually, apply consistent identation 2022-08-28 12:47:01 +02:00
Nikolaj Schlej
10e2e60183 Off with that PRI*Q bullshit 2022-08-28 12:01:43 +02:00
Nikolaj Schlej
eb3185224b More minor structure init fixes 2022-08-28 08:00:05 +02:00
Nikolaj Schlej
3aafbdd269 Fix another coverity warning about unitialized structure fields usage 2022-08-25 09:43:18 +02:00
Nikolaj Schlej
74910c4658 Add support for Intel ME FPT header version 2.1 2022-08-25 08:54:34 +02:00