Comment 12 for bug 2043084

Revision history for this message
Mate Kukri (mkukri) wrote :

@vorlon The upstream commit message is confusing and incorrect, what this patch actually does is fix the type of those fields that were always incorrect in GRUB.

I have cross-referenced UEFI specification starting from the introduction of HTTP boot, and I can confirm those fields always had type UINTN. These all have type UINTN in these fields:
- UEFI 2.5 (this seems to be the version that specificed HTTP boot first)
- UEFI 2.8
- UEFI 2.9
- and the current UEFI 2.10.

And I suppose the reason this wasn't caught earlier is because as I have mentioned yesterday, C struct packing rules made the offset of fields still correct despite them being the wrong size. However 64-bit firmware still read them as 64-bit qwords and I guess if the padding contained garbage it would cause bad behavior.