]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Comment boot block checks and perform additional sanity checks:
authordelphij <delphij@FreeBSD.org>
Mon, 26 Aug 2019 06:41:17 +0000 (06:41 +0000)
committerdelphij <delphij@FreeBSD.org>
Mon, 26 Aug 2019 06:41:17 +0000 (06:41 +0000)
commit4438d71949e8a59f2ac2349a450f6965fee6c6e4
tree58880bb3bee850740ceaa75e01528d4d0f0f6f22
parent0730cca813cd6cc1ad94c3829bfa8d5a11063b89
Comment boot block checks and perform additional sanity checks:

The following checks are now being enforced:

 - bpbBytesPerSec: only accept 512, 1024, 2048 and 4096.
 - bpbSecPerClust: only accept 1, 2, 4, 8, 16, 32, 64 and 128.
 - bpbResSectors: require non-zero.
 - bpbFATs: require non-zero.
 - bpbSectors: require zero for FAT32.
 - bpbFATsmall: require zero for FAT32.
 - bpbHugeSectors: require non-zero for FAT32.

Bail out if the BPB contained values that do not meet these requirements.

We also require FATsecs * FATsecs to not overflow 32-bit unsigned
integer.

Check for backup boot block was removed because the checker does not take
corrective action, and msdosfs driver ignores it too.
sbin/fsck_msdosfs/boot.c