VirtualBox

Changeset 104171 in vbox


Ignore:
Timestamp:
Apr 5, 2024 9:08:56 AM (8 months ago)
Author:
vboxsync
Message:

Devices/BusLogic: Respond with a invalid command parameter error if the CDB length for a SCSI I/O request is invalid, bugref:10613

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DevBusLogic.cpp

    r101016 r104171  
    32223222
    32233223    uTargetIdCCB = pThis->fMbxIs24Bit ? CCBGuest.o.uTargetId : CCBGuest.n.uTargetId;
    3224     if (RT_LIKELY(uTargetIdCCB < RT_ELEMENTS(pThisCC->aDeviceStates)))
     3224    if (   RT_LIKELY(uTargetIdCCB < RT_ELEMENTS(pThisCC->aDeviceStates))
     3225        && CCBGuest.c.cbCDB <= RT_ELEMENTS(CCBGuest.c.abCDB))
    32253226    {
    32263227        PBUSLOGICDEVICE pTgtDev = &pThisCC->aDeviceStates[uTargetIdCCB];
     
    34433444
    34443445    if (RT_LIKELY(   pCmd->uTargetId < RT_ELEMENTS(pThisCC->aDeviceStates)
    3445                   && pCmd->cbCDB <= 16))
     3446                  && pCmd->cbCDB <= RT_ELEMENTS(pCmd->abCDB)))
    34463447    {
    34473448        PBUSLOGICDEVICE pTgtDev = &pThisCC->aDeviceStates[pCmd->uTargetId];
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette