Index: trunk/src/VBox/Devices/Storage/VSCSI/VSCSIDevice.cpp
===================================================================
--- trunk/src/VBox/Devices/Storage/VSCSI/VSCSIDevice.cpp	(revision 104220)
+++ trunk/src/VBox/Devices/Storage/VSCSI/VSCSIDevice.cpp	(revision 104221)
@@ -70,4 +70,11 @@
     LogFlowFunc(("CDB: %.*Rhxs Cmd: %s\n", pVScsiReq->cbCDB, pVScsiReq->pbCDB, SCSICmdText(pVScsiReq->pbCDB[0])));
 
+    if (!pVScsiReq->cbCDB)
+    {
+        *prcReq = vscsiReqSenseErrorSet(&pVScsiDevice->VScsiSense, pVScsiReq, SCSI_SENSE_ILLEGAL_REQUEST,
+                                        SCSI_ASC_ILLEGAL_OPCODE, 0x00);
+        return true;
+    }
+
     switch (pVScsiReq->pbCDB[0])
     {
@@ -95,4 +102,11 @@
         case SCSI_REPORT_LUNS:
         {
+            if (pVScsiReq->cbCDB < 10)
+            {
+                *prcReq = vscsiReqSenseErrorSet(&pVScsiDevice->VScsiSense, pVScsiReq, SCSI_SENSE_ILLEGAL_REQUEST,
+                                                SCSI_ASC_ILLEGAL_OPCODE, 0x00);
+                break;
+            }
+
             /*
              * If allocation length is less than 16 bytes SPC compliant devices have
@@ -130,4 +144,11 @@
         case SCSI_REQUEST_SENSE:
         {
+            if (pVScsiReq->cbCDB < 5)
+            {
+                *prcReq = vscsiReqSenseErrorSet(&pVScsiDevice->VScsiSense, pVScsiReq, SCSI_SENSE_ILLEGAL_REQUEST,
+                                                SCSI_ASC_ILLEGAL_OPCODE, 0x00);
+                break;
+            }
+
             vscsiReqSetXferDir(pVScsiReq, VSCSIXFERDIR_T2I);
             vscsiReqSetXferSize(pVScsiReq, pVScsiReq->pbCDB[4]);
@@ -143,4 +164,11 @@
         case SCSI_MAINTENANCE_IN:
         {
+            if (pVScsiReq->cbCDB < 8)
+            {
+                *prcReq = vscsiLunReqSenseErrorSet(pVScsiLun, pVScsiReq, SCSI_SENSE_ILLEGAL_REQUEST,
+                                                   SCSI_ASC_ILLEGAL_OPCODE, 0x00);
+                break;
+            }
+
             if (pVScsiReq->pbCDB[1] == SCSI_MAINTENANCE_IN_REPORT_SUPP_OPC)
             {
@@ -377,5 +405,24 @@
         {
             PVSCSILUNINT pVScsiLun = pVScsiDevice->papVScsiLun[pVScsiReq->iLun];
-            rc = pVScsiLun->pVScsiLunDesc->pfnVScsiLunReqProcess(pVScsiLun, pVScsiReq);
+            PVSCSILUNDESC pVScsiLunDesc = pVScsiLun->pVScsiLunDesc;
+            uint8_t const bOpc = pVScsiReq->pbCDB[0];
+            uint8_t const cbCdbMin = pVScsiLunDesc->pacbCdbOpc[bOpc];
+
+            /* Fail if the opcode is not supported or the CDB is too short. */
+            if (   cbCdbMin != VSCSI_LUN_CDB_SZ_INVALID
+                && pVScsiReq->cbCDB >= cbCdbMin)
+                rc = pVScsiLunDesc->pfnVScsiLunReqProcess(pVScsiLun, pVScsiReq);
+            else
+            {
+                /*
+                 * CDB length is smaller than what the LUN expects, respond with an
+                 * ILLEGAL OPCODE error.
+                 */
+                vscsiLunReqSenseErrorSet(pVScsiLun, pVScsiReq, SCSI_SENSE_ILLEGAL_REQUEST,
+                                         SCSI_ASC_ILLEGAL_OPCODE, 0x00);
+
+                vscsiDeviceReqComplete(pVScsiDevice, pVScsiReq,
+                                       SCSI_STATUS_CHECK_CONDITION, false, VINF_SUCCESS);
+            }
         }
         else
Index: trunk/src/VBox/Devices/Storage/VSCSI/VSCSIInternal.h
===================================================================
--- trunk/src/VBox/Devices/Storage/VSCSI/VSCSIInternal.h	(revision 104220)
+++ trunk/src/VBox/Devices/Storage/VSCSI/VSCSIInternal.h	(revision 104221)
@@ -242,4 +242,23 @@
 /** @} */
 
+/** @name Helper macros to specify a range of not supported CDB opcodes for the entries pointed
+ * to by VSCSILUNDESC::pacbCdbOpc.
+ * @{ */
+#define VSCSI_LUN_CDB_SZ_INVALID 0
+#define VSCSI_LUN_CDB_SZ_INVALID_X2 \
+    VSCSI_LUN_CDB_SZ_INVALID, \
+    VSCSI_LUN_CDB_SZ_INVALID
+#define VSCSI_LUN_CDB_SZ_INVALID_X4 \
+    VSCSI_LUN_CDB_SZ_INVALID_X2, \
+    VSCSI_LUN_CDB_SZ_INVALID_X2
+#define VSCSI_LUN_CDB_SZ_INVALID_X8 \
+    VSCSI_LUN_CDB_SZ_INVALID_X4, \
+    VSCSI_LUN_CDB_SZ_INVALID_X4
+#define VSCSI_LUN_CDB_SZ_INVALID_X16 \
+    VSCSI_LUN_CDB_SZ_INVALID_X8, \
+    VSCSI_LUN_CDB_SZ_INVALID_X8
+/** @} */
+
+
 /**
  * Virtual SCSI LUN descriptor.
@@ -253,4 +272,7 @@
     /** LUN type size */
     size_t               cbLun;
+    /** Pointer to the array holding the CDB length indexed by the opcode.
+     * A 0 entry means opcode not supported (CDB must be at least 1 byte big). */
+    const uint8_t       *pacbCdbOpc;
     /** Number of entries in the supported operation codes array. */
     uint32_t             cSupOpcInfo;
Index: trunk/src/VBox/Devices/Storage/VSCSI/VSCSILunMmc.cpp
===================================================================
--- trunk/src/VBox/Devices/Storage/VSCSI/VSCSILunMmc.cpp	(revision 104220)
+++ trunk/src/VBox/Devices/Storage/VSCSI/VSCSILunMmc.cpp	(revision 104221)
@@ -1775,4 +1775,113 @@
 
 
+/**
+ * The supported operation codes for the SBC LUN type.
+ * 
+ * @note This gives the minimum size required by our implementation
+ *       which may be smaller than what the spec defines (for example
+ *       we do not access the control byte at the end).
+ */
+static uint8_t s_acbCdbOpc[] =
+{
+    1,                               /**< 0x00        TEST UNIT READY */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0x01        Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X2,     /**< 0x02 - 0x03 Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X4,     /**< 0x04 - 0x07 Invalid */
+    5,                               /**< 0x08        READ (6) */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0x09        Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X2,     /**< 0x0a - 0x0b Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X4,     /**< 0x0c - 0x0f Invalid */
+
+    VSCSI_LUN_CDB_SZ_INVALID_X2,     /**< 0x10 - 0x11 Invalid */
+    5,                               /**< 0x12        INQUIRY */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0x13        Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0x14        Invalid */
+    5,                               /**< 0x15        MODE SELECT (6) */
+    VSCSI_LUN_CDB_SZ_INVALID_X2,     /**< 0x16 - 0x17 Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X2,     /**< 0x18 - 0x19 Invalid */
+    5,                               /**< 0x1a        MODE SENSE (6) */
+    5,                               /**< 0x1b        START STOP UNIT */
+    VSCSI_LUN_CDB_SZ_INVALID_X2,     /**< 0x1c - 0x1d Invalid */
+    5,                               /**< 0x1e        PREVENT ALLOW MEDIUM REMOVAL */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0x1f        Invalid */
+
+    VSCSI_LUN_CDB_SZ_INVALID_X4,     /**< 0x20 - 0x23 Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0x24        Invalid */
+    1,                               /**< 0x25        READ CAPACITY */
+    VSCSI_LUN_CDB_SZ_INVALID_X2,     /**< 0x26 - 0x27 Invalid */
+    9,                               /**< 0x28        READ (10) */
+    VSCSI_LUN_CDB_SZ_INVALID_X2,     /**< 0x29 - 0x2a Invalid */
+    6,                               /**< 0x2b        SEEK (10) */
+    VSCSI_LUN_CDB_SZ_INVALID_X2,     /**< 0x2c - 0x2d Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0x2e        Invalid */
+    5,                               /**< 0x2f        VERIFY (10) */
+
+    VSCSI_LUN_CDB_SZ_INVALID_X8,     /**< 0x30 - 0x37 Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X4,     /**< 0x38 - 0x3b Invalid */
+    8,                               /**< 0x3c        READ BUFFER */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0x3d        Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X2,     /**< 0x3e - 0x3f Invalid */
+
+    VSCSI_LUN_CDB_SZ_INVALID_X2,     /**< 0x40 - 0x41 Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0x42        Invalid */
+    9,                               /**< 0x43        READ TOC PMA ATIP */
+    VSCSI_LUN_CDB_SZ_INVALID_X2,     /**< 0x44 - 0x45 Invalid */
+    9,                               /**< 0x46        GET CONFIGURATION */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0x47        Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X2,     /**< 0x48 - 0x49 Invalid */
+    9,                               /**< 0x4a        GET EVENT STATUS NOTIFICATION */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0x4b        Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0x4c        Invalid */
+    9,                               /**< 0x4d        LOG SENSE */
+    VSCSI_LUN_CDB_SZ_INVALID_X2,     /**< 0x4e - 0x4f Invalid */
+
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0x50        Invalid */
+    9,                               /**< 0x51        READ DISC INFORMATION */
+    9,                               /**< 0x52        READ TRACK INFORMATION */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0x53        Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X4,     /**< 0x54 - 0x57 Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X2,     /**< 0x58 - 0x59 Invalid */
+    9,                               /**< 0x5a        MODE SENSE (10) */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0x5b        Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X4,     /**< 0x5c - 0x5f Invalid */
+
+    VSCSI_LUN_CDB_SZ_INVALID_X16,    /**< 0x60 - 0x6f Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X16,    /**< 0x70 - 0x7f Invalid */
+
+    VSCSI_LUN_CDB_SZ_INVALID_X8,     /**< 0x80 - 0x87 Invalid */
+    14,                              /**< 0x88        READ (16) */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0x89        Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X2,     /**< 0x8a - 0x8b Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X4,     /**< 0x8c - 0x8f Invalid */
+
+    VSCSI_LUN_CDB_SZ_INVALID_X8,     /**< 0x90 - 0x97 Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X4,     /**< 0x98 - 0x9b Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X2,     /**< 0x9c - 0x9d Invalid */
+    2,                               /**< 0x9e        SERVICE ACTION IN (16) (at least 2). */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0x9f        Invalid */
+
+    VSCSI_LUN_CDB_SZ_INVALID_X8,     /**< 0xa0 - 0xa7 Invalid */
+    10,                              /**< 0xa8        READ (12) */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0xa9        Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X2,     /**< 0xaa - 0xab Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0xac        Invalid */
+    10,                              /**< 0xad        READ DVD STRUCTURE */
+    VSCSI_LUN_CDB_SZ_INVALID_X2,     /**< 0xae - 0xaf Invalid */
+
+    VSCSI_LUN_CDB_SZ_INVALID_X8,     /**< 0xb0 - 0xb7 Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X4,     /**< 0xb8 - 0xbb Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0xbc        Invalid */
+    10,                              /**< 0xbd        MECHANISM STATUS */
+    10,                              /**< 0xbe        READ CD */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0xbf        Invalid */
+
+    VSCSI_LUN_CDB_SZ_INVALID_X16,    /**< 0xc0 - 0xcf Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X16,    /**< 0xd0 - 0xdf Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X16,    /**< 0xe0 - 0xef Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X16     /**< 0xf0 - 0xff Invalid */
+};
+AssertCompileSize(s_acbCdbOpc, 256 * sizeof(uint8_t));
+
+
 VSCSILUNDESC g_VScsiLunTypeMmc =
 {
@@ -1783,4 +1892,6 @@
     /** cbLun */
     sizeof(VSCSILUNMMC),
+    /** pacbCdbOpc */
+    &s_acbCdbOpc[0],
     /** cSupOpcInfo */
     0,
Index: trunk/src/VBox/Devices/Storage/VSCSI/VSCSILunSbc.cpp
===================================================================
--- trunk/src/VBox/Devices/Storage/VSCSI/VSCSILunSbc.cpp	(revision 104220)
+++ trunk/src/VBox/Devices/Storage/VSCSI/VSCSILunSbc.cpp	(revision 104221)
@@ -231,28 +231,33 @@
             else
             {
-                SCSIINQUIRYDATA ScsiInquiryReply;
-
-                vscsiReqSetXferSize(pVScsiReq, RT_MIN(sizeof(SCSIINQUIRYDATA), scsiBE2H_U16(&pVScsiReq->pbCDB[3])));
-                memset(&ScsiInquiryReply, 0, sizeof(ScsiInquiryReply));
-
-                ScsiInquiryReply.cbAdditional           = 31;
-                ScsiInquiryReply.u5PeripheralDeviceType = SCSI_INQUIRY_DATA_PERIPHERAL_DEVICE_TYPE_DIRECT_ACCESS;
-                ScsiInquiryReply.u3PeripheralQualifier  = SCSI_INQUIRY_DATA_PERIPHERAL_QUALIFIER_CONNECTED;
-                ScsiInquiryReply.u3AnsiVersion          = 0x05; /* SPC-4 compliant */
-                ScsiInquiryReply.fCmdQue                = 1;    /* Command queuing supported. */
-                ScsiInquiryReply.fWBus16                = 1;
-
-                const char *pszVendorId = "VBOX";
-                const char *pszProductId = "HARDDISK";
-                const char *pszProductLevel = "1.0";
-                int rcTmp = vscsiLunQueryInqStrings(pVScsiLun, &pszVendorId, &pszProductId, &pszProductLevel);
-                Assert(RT_SUCCESS(rcTmp) || rcTmp == VERR_NOT_FOUND); RT_NOREF(rcTmp);
-
-                scsiPadStrS(ScsiInquiryReply.achVendorId, pszVendorId, 8);
-                scsiPadStrS(ScsiInquiryReply.achProductId, pszProductId, 16);
-                scsiPadStrS(ScsiInquiryReply.achProductLevel, pszProductLevel, 4);
-
-                RTSgBufCopyFromBuf(&pVScsiReq->SgBuf, (uint8_t *)&ScsiInquiryReply, sizeof(SCSIINQUIRYDATA));
-                rcReq = vscsiLunReqSenseOkSet(pVScsiLun, pVScsiReq);
+                if (pVScsiReq->cbCDB >= 5)
+                {
+                    SCSIINQUIRYDATA ScsiInquiryReply;
+
+                    vscsiReqSetXferSize(pVScsiReq, RT_MIN(sizeof(SCSIINQUIRYDATA), scsiBE2H_U16(&pVScsiReq->pbCDB[3])));
+                    memset(&ScsiInquiryReply, 0, sizeof(ScsiInquiryReply));
+
+                    ScsiInquiryReply.cbAdditional           = 31;
+                    ScsiInquiryReply.u5PeripheralDeviceType = SCSI_INQUIRY_DATA_PERIPHERAL_DEVICE_TYPE_DIRECT_ACCESS;
+                    ScsiInquiryReply.u3PeripheralQualifier  = SCSI_INQUIRY_DATA_PERIPHERAL_QUALIFIER_CONNECTED;
+                    ScsiInquiryReply.u3AnsiVersion          = 0x05; /* SPC-4 compliant */
+                    ScsiInquiryReply.fCmdQue                = 1;    /* Command queuing supported. */
+                    ScsiInquiryReply.fWBus16                = 1;
+
+                    const char *pszVendorId = "VBOX";
+                    const char *pszProductId = "HARDDISK";
+                    const char *pszProductLevel = "1.0";
+                    int rcTmp = vscsiLunQueryInqStrings(pVScsiLun, &pszVendorId, &pszProductId, &pszProductLevel);
+                    Assert(RT_SUCCESS(rcTmp) || rcTmp == VERR_NOT_FOUND); RT_NOREF(rcTmp);
+
+                    scsiPadStrS(ScsiInquiryReply.achVendorId, pszVendorId, 8);
+                    scsiPadStrS(ScsiInquiryReply.achProductId, pszProductId, 16);
+                    scsiPadStrS(ScsiInquiryReply.achProductLevel, pszProductLevel, 4);
+
+                    RTSgBufCopyFromBuf(&pVScsiReq->SgBuf, (uint8_t *)&ScsiInquiryReply, sizeof(SCSIINQUIRYDATA));
+                    rcReq = vscsiLunReqSenseOkSet(pVScsiLun, pVScsiReq);
+                }
+                else
+                    rcReq = vscsiLunReqSenseErrorSet(pVScsiLun, pVScsiReq, SCSI_SENSE_ILLEGAL_REQUEST, SCSI_ASC_INVALID_MESSAGE, 0x00);
             }
             break;
@@ -422,5 +427,5 @@
 
             vscsiReqSetXferDir(pVScsiReq, VSCSIXFERDIR_T2I);
-            vscsiReqSetXferSize(pVScsiReq, scsiBE2H_U16(&pVScsiReq->pbCDB[6]));
+            vscsiReqSetXferSize(pVScsiReq, scsiBE2H_U24(&pVScsiReq->pbCDB[6]));
 
             switch (uDataMode)
@@ -630,4 +635,90 @@
 }
 
+
+/**
+ * The supported operation codes for the SBC LUN type.
+ * 
+ * @note This gives the minimum size required by our implementation
+ *       which may be smaller than what the spec defines (for example
+ *       we do not access the control byte at the end).
+ */
+static uint8_t s_acbCdbOpc[] =
+{
+    VSCSI_LUN_CDB_SZ_INVALID_X8,     /**< 0x00 - 0x07 Invalid */
+    5,                               /**< 0x08        READ (6) */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0x09        Invalid */
+    5,                               /**< 0x0a        WRITE (6) */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0x0b        Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X4,     /**< 0x0c - 0x0f Invalid */
+
+    VSCSI_LUN_CDB_SZ_INVALID_X2,     /**< 0x10 - 0x11 Invalid */
+    3,                               /**< 0x12        INQUIRY (at least 3) */
+    VSCSI_LUN_CDB_SZ_INVALID_X2,     /**< 0x13 - 0x14 Invalid */
+    5,                               /**< 0x15        MODE SELECT (6) */
+    VSCSI_LUN_CDB_SZ_INVALID_X4,     /**< 0x16 - 0x19 Invalid */
+    5,                               /**< 0x1a        MODE SENSE (6) */
+    1,                               /**< 0x1b        START STOP UNIT */
+    VSCSI_LUN_CDB_SZ_INVALID_X4,     /**< 0x1c - 0x1f Invalid */
+
+    VSCSI_LUN_CDB_SZ_INVALID_X4,     /**< 0x20 - 0x23 Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0x24        Invalid */
+    1,                               /**< 0x25        READ CAPACITY */
+    VSCSI_LUN_CDB_SZ_INVALID_X2,     /**< 0x26 - 0x27 Invalid */
+    9,                               /**< 0x28        READ (10) */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0x29        Invalid */
+    9,                               /**< 0x2a        WRITE (10) */
+    VSCSI_LUN_CDB_SZ_INVALID_X4,     /**< 0x2b - 0x2e Invalid */
+    1,                               /**< 0x2f        VERIFY (10) */
+
+    VSCSI_LUN_CDB_SZ_INVALID_X4,     /**< 0x30 - 0x33 Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0x34        Invalid */
+    1,                               /**< 0x35        SYNCHRONIZE CACHE */
+    VSCSI_LUN_CDB_SZ_INVALID_X4,     /**< 0x36 - 0x39 Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X2,     /**< 0x3a - 0x3b Invalid */
+    8,                               /**< 0x3c        READ BUFFER */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0x3d        Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X2,     /**< 0x3e - 0x3f Invalid */
+
+    VSCSI_LUN_CDB_SZ_INVALID_X2,     /**< 0x40 - 0x41 Invalid */
+    9,                               /**< 0x42        UNMAP */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0x43        Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X8,     /**< 0x44 - 0x4b Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0x4c        Invalid */
+    9,                               /**< 0x4d        LOG SENSE */
+    VSCSI_LUN_CDB_SZ_INVALID_X2,     /**< 0x4e - 0x4f Invalid */
+
+    VSCSI_LUN_CDB_SZ_INVALID_X16,    /**< 0x50 - 0x5f Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X16,    /**< 0x60 - 0x6f Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X16,    /**< 0x70 - 0x7f Invalid */
+
+    VSCSI_LUN_CDB_SZ_INVALID_X8,     /**< 0x80 - 0x87 Invalid */
+    14,                              /**< 0x88        READ (16) */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0x89        Invalid */
+    14,                              /**< 0x8a        WRITE (16) */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0x8b        Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X4,     /**< 0x8c - 0x8f Invalid */
+
+    VSCSI_LUN_CDB_SZ_INVALID_X8,     /**< 0x90 - 0x97 Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X4,     /**< 0x98 - 0x9b Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X2,     /**< 0x9c - 0x9d Invalid */
+    2,                               /**< 0x9e        SERVICE ACTION IN (16) (at least 2). */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0x9f        Invalid */
+
+    VSCSI_LUN_CDB_SZ_INVALID_X8,     /**< 0xa0 - 0xa7 Invalid */
+    10,                              /**< 0xa8        READ (12) */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0xa9        Invalid */
+    10,                              /**< 0xaa        WRITE (12) */
+    VSCSI_LUN_CDB_SZ_INVALID,        /**< 0xab        Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X4,     /**< 0xac - 0xaf Invalid */
+
+    VSCSI_LUN_CDB_SZ_INVALID_X16,    /**< 0xb0 - 0xbf Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X16,    /**< 0xc0 - 0xcf Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X16,    /**< 0xd0 - 0xdf Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X16,    /**< 0xe0 - 0xef Invalid */
+    VSCSI_LUN_CDB_SZ_INVALID_X16     /**< 0xf0 - 0xff Invalid */
+};
+AssertCompileSize(s_acbCdbOpc, 256 * sizeof(uint8_t));
+
+
 VSCSILUNDESC g_VScsiLunTypeSbc =
 {
@@ -638,4 +729,6 @@
     /** cbLun */
     sizeof(VSCSILUNSBC),
+    /** pacbCdbOpc */
+    &s_acbCdbOpc[0],
     /** cSupOpcInfo */
     0,
Index: trunk/src/VBox/Devices/Storage/VSCSI/VSCSILunSsc.cpp
===================================================================
--- trunk/src/VBox/Devices/Storage/VSCSI/VSCSILunSsc.cpp	(revision 104220)
+++ trunk/src/VBox/Devices/Storage/VSCSI/VSCSILunSsc.cpp	(revision 104221)
@@ -453,4 +453,6 @@
     /** cbLun */
     sizeof(VSCSILUNSSC),
+    /** pacbCdbOpc */
+    NULL,
     /** cSupOpcInfo */
     0,
