grub/grub-core/fs/zfs
Peter Jones 3f05d693d1 malloc: Use overflow checking primitives where we do complex allocations
This attempts to fix the places where we do the following where
arithmetic_expr may include unvalidated data:

  X = grub_malloc(arithmetic_expr);

It accomplishes this by doing the arithmetic ahead of time using grub_add(),
grub_sub(), grub_mul() and testing for overflow before proceeding.

Among other issues, this fixes:
  - allocation of integer overflow in grub_video_bitmap_create()
    reported by Chris Coulson,
  - allocation of integer overflow in grub_png_decode_image_header()
    reported by Chris Coulson,
  - allocation of integer overflow in grub_squash_read_symlink()
    reported by Chris Coulson,
  - allocation of integer overflow in grub_ext2_read_symlink()
    reported by Chris Coulson,
  - allocation of integer overflow in read_section_as_string()
    reported by Chris Coulson.

Fixes: CVE-2020-14309, CVE-2020-14310, CVE-2020-14311

Signed-off-by: Peter Jones <pjones@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2020-07-29 16:55:47 +02:00
..
zfs.c malloc: Use overflow checking primitives where we do complex allocations 2020-07-29 16:55:47 +02: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
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