]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libblkid: befs - avoid undefined shift
authorMilan Broz <gmazyland@gmail.com>
Mon, 23 Jan 2023 12:46:31 +0000 (13:46 +0100)
committerMilan Broz <gmazyland@gmail.com>
Mon, 23 Jan 2023 12:51:43 +0000 (13:51 +0100)
commit0ec43c07e0d70cb83e734d31e15f58fefe2347a2
tree069f9f8a4dcd3e6fc026950ac9d1f0fa8e864077
parent91a484febae74588517226c6e0870562ca430651
libblkid: befs - avoid undefined shift

BEFS does not check maximal value for ag_shift leading
to undefined behavior. Avoid this by limiting shift size.

Reproducer found with OSS-Fuzz (issue 55285) running over
cryptsetup project (blkid is used in header init).

Signed-off-by: Milan Broz <gmazyland@gmail.com>
libblkid/src/superblocks/befs.c