]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[ucode] Remove harmless read beyond end of malformed equivalence table master 1806/head
authorMichael Brown <mcb30@ipxe.org>
Thu, 6 Aug 2026 14:41:35 +0000 (15:41 +0100)
committerMichael Brown <mcb30@ipxe.org>
Thu, 6 Aug 2026 14:50:13 +0000 (15:50 +0100)
commitbfc442ad18577c876292e10bbed0d40d421456dc
tree4a314beae0b30d65b617f665f27ba4cd0ef5e780
parent0f4a37bc3ac940dd98c7736e4a8e32c0163b49e0
[ucode] Remove harmless read beyond end of malformed equivalence table

If the AMD microcode equivalence table is malformed and is not an
exact multiple of the entry size, then we may read up to two bytes
beyond the end of the allocated image.

The small out-of-bounds read is harmless since the immediately
following code will reject any image with fewer than eight bytes
remaining after the equivalence table (or will harmlessly return
immediately if the out-of-bounds read value was 0x00000000 and no
previous equivalence table entries were present).

Fix by adjusting the loop condition to ignore partial equivalence
table entries.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/x86/image/ucode.c