Files
systemd/src
Luca Boccassi 9dfd1cdfc3 boot: reject GPT headers with SizeOfPartitionEntry below the minimum
Commit 0cf5f816f2 replaced the original lower-bound check

    if (h->SizeOfPartitionEntry < sizeof(EFI_PARTITION_ENTRY))
            return false;

with a multiple-of check

    if ((h->SizeOfPartitionEntry % sizeof(EFI_PARTITION_ENTRY)) != 0)
            return false;

to additionally require the entry size to be a multiple of 128. The
modulo test is however also satisfied by SizeOfPartitionEntry == 0, so a
GPT header advertising a zero entry size now passes verify_gpt().

Restore the lower bound in addition to the multiple-of check, so the
entry size must be at least sizeof(EFI_PARTITION_ENTRY) and a multiple of
it (128 bytes).

Follow-up for 0cf5f816f2

(cherry picked from commit d06d8a232b)
(cherry picked from commit e233936dbc)
2026-07-23 20:04:28 +01:00
..
2026-04-13 12:22:52 +01:00
2026-05-22 13:57:29 +01:00
2026-04-13 12:22:43 +01:00
2026-06-23 15:14:18 +01:00
2026-03-04 14:32:16 +01:00
2026-05-22 13:57:30 +01:00