Bug 1392935 (CVE-2016-9383, xsa195)

Summary: CVE-2016-9383 xsa195 xen: x86 64-bit bit test instruction emulation broken (XSA-195)
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: ailan, drjones, imammedo, knoel, mrezanin, pbonzini, rkrcmar, security-response-team, vkuznets, xen-maint
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-26 11:47:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1397383    
Bug Blocks: 1392952    
Attachments:
Description Flags
xen-unstable, Xen 4.7.x, Xen 4.6.x, Xen 4.5.x, Xen 4.4.x none

Description Adam Mariš 2016-11-08 13:56:20 UTC
ISSUE DESCRIPTION
=================

The x86 instructions BT, BTC, BTR, and BTS, when used with a
destination memory operand and a source register rather than an
immediate operand, access a memory location offset from that specified
by the memory operand as specified by the high bits of the register
source.

When Xen needs to emulate such an instruction, to efficiently handle
the emulation, the memory address and register operand are
recalculated internally to Xen.  In this process, the high bits of an
intermediate expression were discarded, leading to both the memory
location and the register operand being wrong.

The wrong memory location would have only a guest local effect (either
access to an unintended location, or a fault delivered to the guest),
whereas the wrong register value could lead to either a host crash or
an unintended host memory access.

IMPACT
======

A malicious guest can modify arbitrary memory, allowing for arbitrary
code execution (and therefore privilege escalation affecting the whole
host), a crash of the host (leading to a DoS), or information leaks.

The vulnerability is sometimes exploitable by unprivileged guest user
processes.

VULNERABLE SYSTEMS
==================

All Xen versions are affected.

The vulnerability is only exposed to x86 guests running in 64-bit mode.

On Xen 4.6 and earlier the vulnerability is exposed to all guest user
processes, including unprivileged processes, in such guests.

On Xen 4.7 and later, the vulnerability is exposed only to guest user
processes granted a degree of privilege (such as direct hardware
access) by the guest administrator; or, to all user processes when the
when the VM has been explicitly configured with a non-default cpu
vendor string (in xm/xl, this would be done with a `cpuid=' domain
config option).

The vulnerability is not exposed to 32-bit PV guests.

ARM systems are not vulnerable.

MITIGATION
==========

There is no known mitigation.

External References:

http://xenbits.xen.org/xsa/advisory-195.html

Acknowledgements:

Name: the Xen project
Upstream: George Dunlap (Citrix)

Comment 1 Adam Mariš 2016-11-08 14:39:45 UTC
Created attachment 1218535 [details]
xen-unstable, Xen 4.7.x, Xen 4.6.x, Xen 4.5.x, Xen 4.4.x

Comment 2 Martin Prpič 2016-11-22 12:26:16 UTC
Created xen tracking bugs for this issue:

Affects: fedora-all [bug 1397383]