VirtualBox

Changeset 13502 in vbox


Ignore:
Timestamp:
Oct 22, 2008 3:52:53 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
38327
Message:

VMM: Prevent the debugger from crashing the VMM passing it guest addresses above 4GB when the guest is in 32-bit mode.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/DBGFMem.cpp

    r13146 r13502  
    7575    else
    7676    {
     77        if (    (   pAddress->FlatPtr >= _4G
     78                 || pAddress->FlatPtr + cbRange > _4G)
     79            &&  enmMode != PGMMODE_AMD64
     80            &&  enmMode != PGMMODE_AMD64_NX)
     81            return VERR_DBGF_MEM_NOT_FOUND;
    7782        RTGCUINTPTR GCPtrHit;
    7883        rc = PGMR3DbgScanVirtual(pVM, pAddress->FlatPtr, cbRange, pabNeedle, cbNeedle, &GCPtrHit);
     
    147152        rc = PGMPhysSimpleReadGCPhys(pVM, pvBuf, pAddress->FlatPtr, cbRead);
    148153    else
     154    {
     155        if (    (   pAddress->FlatPtr >= _4G
     156                 || pAddress->FlatPtr + cbRead > _4G)
     157            &&  enmMode != PGMMODE_AMD64
     158            &&  enmMode != PGMMODE_AMD64_NX)
     159            return VERR_PAGE_TABLE_NOT_PRESENT;
    149160        rc = PGMPhysSimpleReadGCPtr(pVM, pvBuf, pAddress->FlatPtr, cbRead);
     161    }
    150162    return rc;
    151163}
     
    205217        rc = PGMPhysSimpleReadGCPhys(pVM, pszBuf, pAddress->FlatPtr, cchBuf);
    206218    else
     219    {
     220        if (    (   pAddress->FlatPtr >= _4G
     221                 || pAddress->FlatPtr + cchBuf > _4G)
     222            &&  enmMode != PGMMODE_AMD64
     223            &&  enmMode != PGMMODE_AMD64_NX)
     224            return VERR_PAGE_TABLE_NOT_PRESENT;
    207225        rc = PGMPhysSimpleReadGCPtr(pVM, pszBuf, pAddress->FlatPtr, cchBuf);
     226    }
    208227
    209228    /*
Note: See TracChangeset for help on using the changeset viewer.

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