Re: [PATCH] relay: Avoid reading stack memory on unprotected side of stack pointer
29 Jul
2008
29 Jul
'08
3:18 a.m.
John Reiser <jreiser(a)BitWagon.com> writes:
+ output( "\tmovl %d(%%ecx),%%edx; movl %%edx,%%es:0*4(%%eax)\n", CONTEXTOFFSET(Eax) ); + output( "\tmovl %d(%%ecx),%%edx; movl %%edx,%%es:1*4(%%eax)\n", CONTEXTOFFSET(Ecx) ); + output( "\tmovl %d(%%ecx),%%edx; movl %%edx,%%es:2*4(%%eax)\n", CONTEXTOFFSET(SegDs) ); + output( "\tmovl %d(%%ecx),%%edx; movl %%edx,%%es:3*4(%%eax)\n", CONTEXTOFFSET(Eip) ); + output( "\tmovl %d(%%ecx),%%edx; movl %%edx,%%es:4*4(%%eax)\n", CONTEXTOFFSET(SegCs) ); + output( "\tmovl %d(%%ecx),%%edx; movl %%edx,%%es:5*4(%%eax)\n", CONTEXTOFFSET(EFlags) );
This won't work if the stack is 16-bit, you'd need to truncate the address to 16-bit too. -- Alexandre Julliard julliard(a)winehq.org
6344
Age (days ago)
6344
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alexandre Julliard