HardenedBSD/sys/geom
Mark Johnston 9e9ba9c73d graid: Avoid tasting devices with small sector sizes
The RAID metadata parsers effectively assume a sector size of 512 bytes
or larger, but md(4) devices can be created with a sector size that's
any power of 2.  Add some seatbelts to graid tasting routines to ensure
that the requested sector(s) are large enough for the device to
plausibly contain RAID metadata.

Reported by:	syzbot+f43583c9bf8357c8b56f@syzkaller.appspotmail.com
Reported by:	syzbot+537dd9f22b91b698e161@syzkaller.appspotmail.com
Reported by:	syzbot+51509dd48871c57c6e47@syzkaller.appspotmail.com
Reported by:	syzbot+c882a31037ea2a54ff63@syzkaller.appspotmail.com
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2021-08-31 17:09:52 -04:00
..
bde
cache
concat
eli
gate
journal
label
linux_lvm
mirror
mountver
multipath
nop
part
raid graid: Avoid tasting devices with small sector sizes 2021-08-31 17:09:52 -04:00
raid3
shsec
stripe
uzip
vinum
virstor
zero
geom_bsd_enc.c
geom_ccd.c
geom_ctl.c
geom_ctl.h
geom_dbg.h
geom_dev.c
geom_disk.c
geom_disk.h
geom_dump.c
geom_event.c
geom_flashmap.c
geom_flashmap.h
geom_int.h
geom_io.c
geom_kern.c
geom_map.c
geom_redboot.c
geom_slice.c
geom_slice.h
geom_subr.c
geom_vfs.c
geom_vfs.h
geom.h
notes