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
Sponsored by: The FreeBSD Foundation

(cherry picked from commit f0a08fa9f532a58f5d7a4814d6eb7ddd49f368da)

Details

Provenance
markjAuthored on Oct 4 2021, 9:48 PM
Parents
rG3bfe213143c5: unzip: Fix segmentation fault if a zip file contains buggy filename.
Branches
Unknown
Tags
Unknown