Updates to UFS/FFS superblock integrity checks when reading a superblock.
authorKirk McKusick <mckusick@FreeBSD.org>
Sat, 30 Jul 2022 01:01:46 +0000 (18:01 -0700)
committerKirk McKusick <mckusick@FreeBSD.org>
Sun, 31 Jul 2022 05:35:11 +0000 (22:35 -0700)
commit548045bf57c46cb2f4d43d3d7fa5d8ad37ec7f9a
treebdfcaedb0debc15b1056e9279ddd954700671b13
parent13a7663c521ac3541756aa1157dcfce9f0ce78e8
Updates to UFS/FFS superblock integrity checks when reading a superblock.

Reorder a few checks to ensure fields have been checked before
using them to check other fields.

Add eight new checks mostly checking for non-negative values.

No legitimate superblocks should fail as a result of these changes.
sys/ufs/ffs/ffs_subr.c