Validate that the declared MODE SELECT parameter list fits in the transfer buffer and contains a complete command header. Validate the block-descriptor list against the remaining parameter-list length before skipping it.
Reject truncated mode-page headers and page bodies before reading them. Report ILLEGAL REQUEST / PARAMETER LIST LENGTH ERROR for truncated headers, block descriptors, and mode pages, as required by SCSI-2 8.2.8; retain INVALID FIELD IN PARAMETER LIST for complete but invalid fields.
Update the hard-disk and magneto-optical fixtures to send complete Format Device pages with their actual MODE SELECT parameter-list lengths. Add regression coverage for truncated headers, descriptors, page headers, and page bodies.