]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libblkid: Avoid OOB access on illegal ZFS superblocks
authorTobias Stoeckmann <tobias@stoeckmann.org>
Sun, 28 Aug 2016 19:15:59 +0000 (21:15 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 29 Aug 2016 11:22:24 +0000 (13:22 +0200)
commit8fa57ab0b5696031da800e243def32bc5265ff6d
tree749c311f55e11d3460b0b6d4d1c58e2ed0ae2b1a
parent1037269fec43e8055c530c13d4fd58819e86b233
libblkid: Avoid OOB access on illegal ZFS superblocks

64 bit systems can trigger an out of boundary access while performing
a ZFS superblock probe.

This happens due to a possible integer overflow while calculating
the remaining available bytes. The variable is of type "int" and the
string length is allowed to be larger than INT_MAX, which means that
avail calculation can overflow, circumventing the "avail < 0" check and
therefore accessing memory outside the "buff" array later on.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
libblkid/src/superblocks/zfs.c