VirtualBox

Changeset 43068 in vbox


Ignore:
Timestamp:
Aug 29, 2012 11:37:14 AM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
80410
Message:

recompiler: Missing privilege check for task gate switches (Fixes kernel panic when invoking the double fault handler from user space on Linux and maybe other guests)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/recompiler/target-i386/op_helper.c

    r42829 r43068  
    902902    switch(type) {
    903903    case 5: /* task gate */
     904#ifdef VBOX
     905        dpl = (e2 >> DESC_DPL_SHIFT) & 3;
     906        cpl = env->hflags & HF_CPL_MASK;
     907        /* check privilege if software int */
     908        if (is_int && dpl < cpl)
     909            raise_exception_err(EXCP0D_GPF, intno * 8 + 2);
     910#endif
    904911        /* must do that check here to return the correct error code */
    905912        if (!(e2 & DESC_P_MASK))
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