x86/vtx: Work around SingleStep + STI/MovSS VMEntry failures
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 11 Dec 2019 13:09:30 +0000 (14:09 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 11 Dec 2019 13:09:30 +0000 (14:09 +0100)
commit1d3eb8259804e5bec991a3462d69ba6bd80bb40e
treec662577c859489f8302dc9c9e1b535912285a775
parent7442006b9f0940fb36f1f8470a416ec836e0d2ce
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>
xen/arch/x86/hvm/vmx/vmx.c