Message ID | 1494479368.16894.127.camel@haakon3.risingtidesystems.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/target/target_core_sbc.c b/drivers/target/target_core_sbc.c index 2cc8753..af618a6 100644 --- a/drivers/target/target_core_sbc.c +++ b/drivers/target/target_core_sbc.c @@ -869,6 +869,9 @@ static sense_reason_t sbc_parse_verify(struct se_cmd *cmd, unsigned int *sectors switch (bytchk) { case 0: + if (*sectors) + return TCM_INVALID_CDB_FIELD; + /* fall-through */ case 1: cmd->se_cmd_flags |= SCF_SCSI_DATA_CDB; break;