]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libblkid: Fix out of bounds reads on bad GPT header
authorAlden Tondettar <alden.tondettar@gmail.com>
Tue, 24 Jan 2017 06:28:00 +0000 (23:28 -0700)
committerKarel Zak <kzak@redhat.com>
Wed, 25 Jan 2017 10:41:22 +0000 (11:41 +0100)
commitdfb8d4ba929b6ec3f54b39037f2d6ef59a62ff08
tree7557415949e97302966987caa6f220fa97307e9d
parent999a2ffec92fdecbc1bc85f521057215bcc5ba84
libblkid: Fix out of bounds reads on bad GPT header

If a GUID Partition Table claims to have more than 2**25 entries, or if the
size of each entry is not exactly 128 bytes, libblkid can read out of bounds
and segfault. Perform the appropriate checks.

[kzak@redhat.com: - fix typo]

Signed-off-by: Alden Tondettar <alden.tondettar@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid/src/partitions/gpt.c