VirtualBox

Changeset 40229 in vbox


Ignore:
Timestamp:
Feb 23, 2012 12:22:21 PM (13 years ago)
Author:
vboxsync
Message:

Storage/ISCSI: Don't validate the ExpStatSN field of a Login Respone with a non 0 status class because it is not valid. Fixes a crash when trying to login into a LIO target with wrong credentials.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Storage/ISCSI.cpp

    r40173 r40229  
    919919            }
    920920            Assert(cMilliesRemaining < 1000000);
    921             rc = pImage->pIfNet->pfnSelectOne(pImage->Socket,
    922                                                               cMilliesRemaining);
     921            rc = pImage->pIfNet->pfnSelectOne(pImage->Socket, cMilliesRemaining);
    923922            if (RT_FAILURE(rc))
    924923                break;
    925             rc = pImage->pIfNet->pfnRead(pImage->Socket,
    926                                                          pDst, residual,
    927                                                          &cbActuallyRead);
     924            rc = pImage->pIfNet->pfnRead(pImage->Socket, pDst, residual, &cbActuallyRead);
    928925            if (RT_FAILURE(rc))
    929926                break;
     
    20912088                continue;
    20922089            if (    !pImage->FirstRecvPDU
    2093                 &&  (cmd != ISCSIOP_SCSI_DATA_IN || (RT_N2H_U32(pcvResSeg[0]) & ISCSI_STATUS_BIT)))
     2090                &&  (cmd != ISCSIOP_SCSI_DATA_IN || (RT_N2H_U32(pcvResSeg[0]) & ISCSI_STATUS_BIT))
     2091                &&  (   cmd != ISCSIOP_LOGIN_RES
     2092                     || (ISCSILOGINSTATUSCLASS)((RT_N2H_U32(pcvResSeg[9]) >> 24) == ISCSI_LOGIN_STATUS_CLASS_SUCCESS)))
    20942093            {
    20952094                if (pImage->ExpStatSN == RT_N2H_U32(pcvResSeg[6]))
     
    21742173        }
    21752174    }
     2175
     2176    LogFlowFunc(("returns rc=%Rrc\n"));
    21762177    return rc;
    21772178}
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