OSDev.org

The Place to Start for Operating System Developers
It is currently Wed Apr 17, 2024 7:47 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: VirtualBox GDT Trick bug? Please confirm
PostPosted: Sat Jun 10, 2017 11:44 am 
Offline
Member
Member

Joined: Thu May 06, 2010 4:34 am
Posts: 116
Location: Leiden, The Netherlands
I think i just found a bug in vbox:

On a 64bit host, running a 32bit guest that uses the GDT trick to boot:
Code:
00:00:11.308331 fatal error in recompiler cpu: Trying to execute code with memory type addr_code=0000000100125020 addend=00007f9e4acd8000 at 0000000100125570. (iHandlerMemType=0x38 iMMIOMemType=0x30)
00:00:11.308332
00:00:11.308368 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Register dump:
Code:
eax=2bad0010 ebx=001a8084 ecx=001a8084 edx=2badb002 esi=001b8588 edi=001b8588
eip=c0125570 esp=0007ff00 ebp=0007fe5c iopl=0 nv up di pl nz na pe nc
cs=0008 ds=0010 es=0010 fs=0010 gs=0010 ss=0010               eflags=00200002

GDT dump:
Code:
0008 CodeER Bas=40000000 Lim=fffff000 DPL=0 P  A  G BIG AVL=0 L=0
0010 DataRW Bas=40000000 Lim=fffff000 DPL=0 P  A  G BIG AVL=0 L=0
0018 CodeER Bas=00000000 Lim=fffff000 DPL=0 P  NA G BIG AVL=0 L=0
0020 DataRW Bas=00000000 Lim=fffff000 DPL=0 P  NA G BIG AVL=0 L=0
0028 CodeER Bas=00000000 Lim=fffff000 DPL=3 P  NA G BIG AVL=0 L=0
0030 DataRW Bas=00000000 Lim=fffff000 DPL=3 P  NA G BIG AVL=0 L=0
0038 Tss32A Bas=00000000 Lim=0000ffff DPL=0 P  NB   BIG AVL=0 R=2

As you can see, it does not wrap around to 0x00125020 but instead tries to reference 0x0000000100125020.

Can somebody try to replicate this before I submit a bug report?

_________________
posnk ( a simple unix clone )
twitter profile - security research, die shots and IC reverse engineering, low level stuff


Top
 Profile  
 
 Post subject: Re: VirtualBox GDT Trick bug? Please confirm
PostPosted: Sat Jun 10, 2017 2:11 pm 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4594
Location: Chichester, UK
It's well known that Virtual OS doesn't support this nasty hack, so I doubt they would be interested in a bug report. And what makes you think that all processors will support it?

Use paging. You know it makes sense.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Google [Bot], SemrushBot [Bot] and 270 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group