-
Notifications
You must be signed in to change notification settings - Fork 731
Description
Description
I have discovered a logic issue in UEFITool A73 regarding how the CSME version is determined. The current algorithm appears to scan for $MN2 headers and simply picks the first one found ("first come, first served").
However, the partition layout order varies between binary images.
In some images, the OEMP appears physically before the NFTP or RBEP .
When this happens, UEFITool incorrectly reports the OEMP version as the global CSME version, ignoring the actual firmware version located later in the file.
Reproduction / Analysis
I analyzed two different binaries using a custom PowerShell script to inspect the partition offsets and manifest versions.
Case 1: Correct Detection (Reference)
File: 21.50.1.1278.bin In this file, RBEP is located at the beginning (0x98000). UEFITool correctly identifies the version.
Found: CPD[RBEP] @ 0x00098000 -> Version: 21.50.1.1278 (Picked by UEFITool & Correct!)
Found: CPD[OEMP] @ 0x00219000 -> Version: 21.0.0.7000
Found: CPD[NFTP] @ 0x00555000 -> Version: 21.50.1.1278
Case 2: Incorrect Detection (The Bug)
File: 21.00.2.1456.bin In this file, OEMP is located before the main partitions. UEFITool picks the OEMP version incorrectly.
Found: CPD[OEMP] @ 0x00098000 -> Version: 21.0.0.7000 (Picked by UEFITool)
Found: CPD[RBEP] @ 0x0032E000 -> Version: 21.0.2.1456 (Actual Main)
Found: CPD[NFTP] @ 0x00555000 -> Version: 21.0.2.1456
Proposed Fix
The detection logic should not rely on the file offset order. Instead, it should prioritize reading the version from specific partitions, specifically NFTP or RBEP, which contain the actual CSME firmware version.