[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Re: [PATCH] Xen: fix various checks of unsigned integers < 0


  • To: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
  • From: Paolo Bonzini <pbonzini@xxxxxxxxxx>
  • Date: Fri, 29 Oct 2010 23:23:07 +0200
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Tim Deegan <Tim.Deegan@xxxxxxxxxx>
  • Delivery-date: Fri, 29 Oct 2010 14:24:03 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=ftJ06ot9ii4RvbW5GNu9rhNyJmsJESpXg2kQbphjAWitA2GKQs/oPOzA9WSL2LQtMk g4cXEcKDPYRNzB42WErrNep4Lfdufo67KADiI0Hx8kiv8iWZpPDTTN+2jwqlTrLFmKC4 8cTgw9V6jc9jYe50fe6KZpUAC7uc/+cCg0ie8=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

On 10/29/2010 05:38 PM, Dan Magenheimer wrote:
Wow, I wonder how many times this code has executed
and returned the wrong (incorrectly sign-extended) value?

Probably never---which doesn't make the fix worthless, but is still never. :) The emulator is mostly used for real mode and MMIO, but this is long-mode code (which rules out real mode) and the CQO instruction doesn't access memory (which rules out MMIO).

To trigger the bug you probably have to cause a race between a thread doing MMIO and a thread replacing the MMIO instruction with a CQO. It can be done fairly reliably on KVM; until they were patched, this trick allowed to exploit emulator bugs and go from guest-ring3 to guest-ring0.

Paolo

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.