Commit 8b8a6e18 authored by Committed by Linus TorvaldsBrowse files
block/partitions/efi.c: ensure that the GPT header is at least the size of the structure.
UEFI 2.3.1D will include a change to the spec language mandating that a GPT header must be greater than *or equal to* the size of the defined structure. While verifying that this would work on Linux, I discovered that we're not actually checking the minimum bound at all. The result of this is that when we verify the checksum, it's possible that on a malformed header (with header_size of 0), we won't actually verify any data. [email@example.com: fix printk warning] Signed-off-by: Peter Jones <firstname.lastname@example.org> Acked-by: Matt Fleming <email@example.com> Cc: Jens Axboe <firstname.lastname@example.org> Cc: Stephen Warren <email@example.com> Signed-off-by: Andrew Morton <firstname.lastname@example.org> Signed-off-by: Linus Torvalds <email@example.com>
Showing with 10 additions and 2 deletions