VirtualBox

Changeset 87603 in vbox for trunk/src/VBox/VMM/VMMR0


Ignore:
Timestamp:
Feb 4, 2021 9:53:08 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
142637
Message:

VMM/HMVMX: Play safe with msrSFMASK.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r87564 r87603  
    25842584            ASMWrMsr(MSR_K8_LSTAR,          pCtx->msrLSTAR);
    25852585            ASMWrMsr(MSR_K6_STAR,           pCtx->msrSTAR);
    2586             ASMWrMsr(MSR_K8_SF_MASK,        pCtx->msrSFMASK);
     2586            /* The system call flag mask register isn't as benign and accepting of all
     2587               values as the above, so mask it to avoid #GP'ing on corrupted input. */
     2588            Assert(!(pCtx->msrSFMASK & ~(uint64_t)UINT32_MAX));
     2589            ASMWrMsr(MSR_K8_SF_MASK,        pCtx->msrSFMASK & UINT32_MAX);
    25872590        }
    25882591    }
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