File xsa136.patch of Package xen.openSUSE_13.1_Update
x86/traps: loop in the correct direction in compat_iret()
This is XSA-136.
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Index: xen-4.3.4-testing/xen/arch/x86/x86_64/compat/traps.c
===================================================================
--- xen-4.3.4-testing.orig/xen/arch/x86/x86_64/compat/traps.c
+++ xen-4.3.4-testing/xen/arch/x86/x86_64/compat/traps.c
@@ -119,7 +119,7 @@ unsigned int compat_iret(void)
}
else if ( ksp > regs->_esp )
{
- for (i = 9; i > 0; ++i)
+ for ( i = 9; i > 0; --i )
{
rc |= __get_user(x, (u32 *)regs->rsp + i);
rc |= __put_user(x, (u32 *)(unsigned long)ksp + i);