]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
g_label: Handle small sector sizes when tasting
authorMark Johnston <markj@FreeBSD.org>
Tue, 7 Sep 2021 13:46:58 +0000 (09:46 -0400)
committerMark Johnston <markj@FreeBSD.org>
Tue, 7 Sep 2021 15:19:29 +0000 (11:19 -0400)
commit5402baa5b5d14819101e1e847df66b02cedf1639
treea3500eb43112dc2a932f18f7499b810fa309fdea
parent173a7a4ee4fa8fbce6b4532d4d324bc72ee25fe0
g_label: Handle small sector sizes when tasting

Make sure that the provider sector size is large enough to contain a
valid label before trying to read it.  We performed this check already
for most label types, but not for several filesystem labels.

Reported by: syzbot+f52918174cdf193ae29c@syzkaller.appspotmail.com
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
sys/geom/label/g_label.c
sys/geom/label/g_label_ext2fs.c
sys/geom/label/g_label_iso9660.c
sys/geom/label/g_label_ntfs.c
sys/geom/label/g_label_reiserfs.c