fru-tool
fru-tool copied to clipboard
FRU Tool allow for data type/length fields encoded as 8-bit ASCII with length 1.
The latest release of fru-tool allows fields to be encoded as 8-bit ASCII with length 1. This is an invalid combination per the IPMI Platform Management FRU Information Storage Definition v1.0 R1.3. Refer to Section 13 - Type/Length Byte Format of the document.
"At least two bytes of data must be present when this type (0b11) is used. Therefore, the length (number of data bytes) will always be >1 if data is present, 0 if data is not present."
Bits 7:6 define the type code. A value of 0b11 is 8-bit ASCII + Latin 1 encoding. For this value, bits 5:0 a value of 00_0000 indicates a length of zero, a value of 00_0001 indicates "end of fields". 0xC0 and 0xC1 have reserved meanings.
The screenshot below shows a Board Info Record with the following *.ini values: ; Strings manufacturer = VENDOR product = OCP Card serial = 0123456789ABCDEF part = Y fileid = W extra1 = U extra2 = V
This results in multiple 0xC1 values in the FRU record, which is not allowed with 8-bit ASCII encoding.
Thank you, Thomas
Good catch, Thomas! I'm overhauling fru-tool in my fork and will make sure that single-character values are rejected.