HomeFreeBSD

graid: Avoid tasting devices with small sector sizes

Description

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

Details

Provenance
markjAuthored on Aug 31 2021, 9:09 PM
Parents
rG3138392a46a4: itimer: Serialize access to the p_itimers array
Branches
Unknown
Tags
Unknown