grub2/grub-core/fs/zfs
Darren Kenny a02091834d zfs: Fix possible negative shift operation
While it is possible for the return value from zfs_log2() to be zero
(0), it is quite unlikely, given that the previous assignment to blksz
is shifted up by SPA_MINBLOCKSHIFT (9) before 9 is subtracted at the
assignment to epbs.

But, while unlikely during a normal operation, it may be that a carefully
crafted ZFS filesystem could result in a zero (0) value to the
dn_datalbkszsec field, which means that the shift left does nothing
and assigns zero (0) to blksz, resulting in a negative epbs value.

Fixes: CID 73608

Signed-off-by: Darren Kenny <darren.kenny@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2021-03-02 15:54:16 +01:00
..
zfs_fletcher.c Update GPL for ZFS code to version 3, move copyright lines for Vladimir and me to FSF (covered by our assignments) 2010-12-01 22:55:26 +01:00
zfs_lz4.c zfs: remove size_t typedef and use grub_size_t instead 2017-08-07 16:21:15 +02:00
zfs_lzjb.c Update GPL for ZFS code to version 3, move copyright lines for Vladimir and me to FSF (covered by our assignments) 2010-12-01 22:55:26 +01:00
zfs_sha256.c * conf/Makefile.common (CFLAGS_GNULIB): Add 2012-02-24 12:30:32 +01:00
zfs.c zfs: Fix possible negative shift operation 2021-03-02 15:54:16 +01:00
zfscrypt.c malloc: Use overflow checking primitives where we do complex allocations 2020-07-29 16:55:47 +02:00
zfsinfo.c grub-core/fs/zfs/zfsinfo.c: memory leak in print_vdev_info 2014-12-01 20:54:12 +03:00