VirtualBox

Changeset 24997 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Nov 26, 2009 1:20:33 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
55303
Message:

Proper boundary checks for 32 bits paging modes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/PGMAllGst.h

    r23853 r24997  
    6363#elif PGM_GST_TYPE == PGM_TYPE_32BIT || PGM_GST_TYPE == PGM_TYPE_PAE || PGM_GST_TYPE == PGM_TYPE_AMD64
    6464
     65#if PGM_GST_MODE != PGM_MODE_AMD64
     66    /* Boundary check. */
     67    if (GCPtr >= _4G)
     68        return VERR_INVALID_ADDRESS;
     69# endif
     70
    6571    PVM pVM = pVCpu->CTX_SUFF(pVM);
    6672    /*
     
    181187
    182188    Assert((cb & PAGE_OFFSET_MASK) == 0);
     189
     190#if PGM_GST_MODE != PGM_MODE_AMD64
     191    /* Boundary check. */
     192    if (GCPtr >= _4G)
     193        return VERR_INVALID_ADDRESS;
     194# endif
    183195
    184196    PVM pVM = pVCpu->CTX_SUFF(pVM);
     
    286298 || PGM_GST_TYPE == PGM_TYPE_PAE   \
    287299 || PGM_GST_TYPE == PGM_TYPE_AMD64
     300
     301#if PGM_GST_MODE != PGM_MODE_AMD64
     302    /* Boundary check. */
     303    if (GCPtr >= _4G)
     304        return VERR_INVALID_ADDRESS;
     305# endif
    288306
    289307# if PGM_GST_TYPE == PGM_TYPE_32BIT
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