VirtualBox

Changeset 15742 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 24, 2008 11:15:29 AM (16 years ago)
Author:
vboxsync
Message:

Deal with invalid IO bitmap offset values in the TSS.

File:
1 edited

Legend:

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

    r13840 r15742  
    15641564                if (CPUMGetGuestCR4(pVM) & X86_CR4_VME)
    15651565                {
    1566                     uint32_t offRedirBitmap = tss.offIoBitmap - sizeof(tss.IntRedirBitmap);
     1566                    uint32_t offRedirBitmap;
     1567                   
     1568                    /* Make sure the io bitmap offset is valid; anything less than sizeof(VBOXTSS) means there's none. */
     1569                    if (tss.offIoBitmap < RT_OFFSETOF(VBOXTSS, IntRedirBitmap) + sizeof(tss.IntRedirBitmap))
     1570                    {
     1571                        Log(("Invalid io bitmap offset detected (%x)!\n", tss.offIoBitmap));
     1572                        tss.offIoBitmap = RT_OFFSETOF(VBOXTSS, IntRedirBitmap) + sizeof(tss.IntRedirBitmap);
     1573                    }
     1574                       
     1575                    offRedirBitmap = tss.offIoBitmap - sizeof(tss.IntRedirBitmap);
    15671576
    15681577                    /** @todo not sure how the partial case is handled; probably not allowed */
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