HomeFreeBSD

Verify that the BPB media descriptor and FAT ID match.

Description

Verify that the BPB media descriptor and FAT ID match.

FAT specification requires that for valid FAT, FAT cluster 0 has a
specific value derived from the BPB media descriptor. The lowest
(little-endian) byte must be equal to bpb.bpbMedia, other bits in the
cluster number must be all 1's. Implement the check to reduce the
chance of the randomly corrupted FAT to pass the mount attempt.

Submitted by: Siva Mahadevan <smahadevan@freebsdfoundation.org>
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D12124

Details

Provenance
kibAuthored on
Differential Revision
D12124: msdosfs: verify that the BPB media descriptor and FAT ID match
Parents
rS322981: Mask doorbells while processing them.
Branches
Unknown
Tags
Unknown