HomeFreeBSD

geom_label: Add more validation for NTFS volume tasting

Description

geom_label: Add more validation for NTFS volume tasting

  • Ensure that the computed MFT record size isn't negative or larger than maxphys before trying to read $Volume.
  • Guard against truncated records in volume metadata.
  • Ensure that the record length is large enough to contain the volume name.
  • Verify that the (UTF-16-encoded) volume name's length is a multiple of two.

PR: 258833, 258914
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

Details

Provenance
markjAuthored on Oct 4 2021, 9:48 PM
Parents
rGd43fa8ef534a: contrib/bc: merge version 5.1.0 from vendor branch
Branches
Unknown
Tags
Unknown