Bug 1392937 (CVE-2016-9377, CVE-2016-9378, xsa196) - CVE-2016-9377 CVE-2016-9378 xsa196 xen: x86 software interrupt injection mis-handled (XSA-196)
Summary: CVE-2016-9377 CVE-2016-9378 xsa196 xen: x86 software interrupt injection mis-...
Keywords:
Status: CLOSED NOTABUG
Alias: CVE-2016-9377, CVE-2016-9378, xsa196
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1397383
Blocks: 1392955
TreeView+ depends on / blocked
 
Reported: 2016-11-08 13:56 UTC by Adam Mariš
Modified: 2021-02-17 03:04 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-07 10:19:40 UTC
Embargoed:


Attachments (Terms of Use)
xen-unstable, Xen 4.7.x, Xen 4.6.x, Xen 4.5.x patch 1 (2.75 KB, patch)
2016-11-08 14:40 UTC, Adam Mariš
no flags Details | Diff
xen-unstable, Xen 4.7.x, Xen 4.6.x, Xen 4.5.x patch 2 (3.39 KB, patch)
2016-11-08 14:40 UTC, Adam Mariš
no flags Details | Diff

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

There are two closely-related bugs.

When Xen emulates instructions which generate software interrupts it
needs to perform a privilege check involving an IDT lookup.  This
check is sometimes erroneously conducted as if the IDT had the format
for a 32-bit guest, when in fact it is in the 64-bit format.  Xen will
then read the wrong part of the IDT and interpret it in an unintended
manner.

When Xen emulates instructions which generate software interrupts, and
chooses to deliver the software interrupt, it may try to use the
method intended for injecting exceptions.  This is incorrect, and
results in a guest crash.

These instructions are not ususally handled by the emulator.
Exploiting the bug requires ability to force use of the emulator.

IMPACT
======

An unprivileged guest user program may be able to crash the guest.

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

Xen versions 4.5 and newer are vulnerable.  Older versions are not
vulnerable.

The vulnerability is only exposed on AMD hardware lacking the NRip
feature.  AMD hardware with the NRip feature, and all Intel hardware,
is not vulnerable.

Xen prints information about CPU features on boot.  If you see this:
(XEN) SVM: Supported advanced features:
...
(XEN)  - Next-RIP Saved on #VMEXIT
then you are not vulnerable because you have an AMD CPU with NRip.
If you see this:
(XEN) VMX: Supported advanced features:
then you are not vulnerable because you have an Intel CPU.

The vulnerability is only exposed on HVM guests.

ARM systems are NOT vulnerable.

MITIGATION
==========

Running only PV guests will avoid this issue.

External References:

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

Acknowledgements:

Name: the Xen project
Upstream: Andrew Cooper (Citrix)

Comment 1 Adam Mariš 2016-11-08 14:40:30 UTC
Created attachment 1218536 [details]
xen-unstable, Xen 4.7.x, Xen 4.6.x, Xen 4.5.x patch 1

Comment 2 Adam Mariš 2016-11-08 14:40:50 UTC
Created attachment 1218537 [details]
xen-unstable, Xen 4.7.x, Xen 4.6.x, Xen 4.5.x patch 2

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

Affects: fedora-all [bug 1397383]


Note You need to log in before you can comment on or make changes to this bug.