]> git.karo-electronics.de Git - karo-tx-linux.git/commit
block/partitions/efi.c: ensure that the GPT header is at least the size of the structure.
authorPeter Jones <pjones@redhat.com>
Wed, 20 Feb 2013 02:16:33 +0000 (13:16 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:53:57 +0000 (16:53 +1100)
commitef25bb0fa6e2f3f82d11004f5ec99ecb65c14ea1
treee2e78ea7062b3a69a8f17088a50cb8182c441a93
parent1840c996f590045e7374651486e10dad0675af27
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.

Signed-off-by: Peter Jones <pjones@redhat.com>
Acked-by: Matt Fleming <matt.fleming@intel.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
block/partitions/efi.c