HomeFreeBSD

Comment boot block checks and perform additional sanity checks:

Description

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.

Details

Committed
delphijAug 26 2019, 6:41 AM
Parents
rS351501: MFV r351500: Fix CLEAR_HASH macro to be usable as a single statement.
Branches
Unknown
Tags
Unknown