When validating SCSI UNMAP requests, the driver inspected the parameter
list length by reading byte offsets 7 and 8 of the command descriptor
block (CDB) and, depending on the controller revision, could modify and
write back aligned values into those offsets. If a malformed or passthrough
command was issued with a CDB length shorter than 10 bytes, accessing these
offsets resulted in out-of-bounds memory reads and potential memory
corruption on writes.
Validate that the command descriptor block length is at least 10 bytes
before accessing parameter length fields. Malformed commands shorter than
10 bytes are rejected immediately with CHECK CONDITION and sense key
ILLEGAL REQUEST.