x86/vtx: Work around SingleStep + STI/MovSS VMEntry failures
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 11 Dec 2019 14:21:09 +0000 (15:21 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 11 Dec 2019 14:21:09 +0000 (15:21 +0100)
commitd4a67be45f71af487c1d49fa28da4be6d626336b
tree8ab52a57f45dd5b557083e77c9db7e1700634692
parentb8a8278277ea2698c5459615837f4b23935ef96b
x86/vtx: Work around SingleStep + STI/MovSS VMEntry failures

See patch comment for technical details.

Concerning the timeline, this was first discovered in the aftermath of
XSA-156 which caused #DB to be intercepted unconditionally, but only in
its SingleStep + STI form which is restricted to privileged software.

After working with Intel and identifying the problematic vmentry check,
this workaround was suggested, and the patch was posted in an RFC
series.  Outstanding work for that series (not breaking Introspection)
is still pending, and this fix from it (which wouldn't have been good
enough in its original form) wasn't committed.

A vmentry failure was reported to xen-devel, and debugging identified
this bug in its SingleStep + MovSS form by way of INT1, which does not
involve the use of any privileged instructions, and proving this to be a
security issue.

This is XSA-308

Reported-by: HÃ¥kon Alstadheim <hakon@alstadheim.priv.no>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
master commit: 1d3eb8259804e5bec991a3462d69ba6bd80bb40e
master date: 2019-12-11 14:09:30 +0100
xen/arch/x86/hvm/vmx/vmx.c