]> 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>
Wed, 31 Aug 2016 09:07:19 +0000 (11:07 +0200)
commit9421e39db95ca7461a9704ab474ae05dae3808e2
tree3904509034b1e712d0dc2547916e9fd22a8408fb
parentcd1e89459fa35b4787af821fbed939c57dc436ad
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