]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libblkid: prevent OOB access while probing HFS+
authorTobias Stoeckmann <tobias@stoeckmann.org>
Wed, 15 Mar 2017 21:12:00 +0000 (22:12 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 23 Mar 2017 14:46:36 +0000 (15:46 +0100)
commit62ab1ebb12e812b15382318861a594c946b6238e
treeeda71c2d086da20d46e4721c3ae6a0d40c8de90d
parenteef0a92d311e37ed8cbcc979447be7d83f3775a5
libblkid: prevent OOB access while probing HFS+

It is possible to perform out of boundary read accesses due to
insufficient boundary checks in probe_hfsplus.

The first issue occurs if the leaf count in a B-node is too
small. The second happens while parsing a unicode description which
is longer than 255 UTF-8 characters. The length is stored in a 16 bit
integer, but the array in the struct is limited to 255 * 2, which is
in sync with Apple's Open Source HFS+ implementation (HFSUniStr255).

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