Bug 1518656 (CVE-2017-17566, xsa248)

Summary: CVE-2017-17566 xsa248 xen: x86 PV guests may gain access to internally used pages (XSA-248)
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, jforbes, knoel, m.a.young, mrezanin, pbonzini, rkrcmar, robinlee.sysu, 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: 2019-06-08 03:32:24 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: 1525018    
Bug Blocks:    

Description Adam Mariš 2017-11-29 12:26:05 UTC
ISSUE DESCRIPTION
=================

Memory management for PV guests builds on page ownership and page
attributes.  A domain can always map, at least r/o, pages of which it
is the owner.  Certain fields in the control structure of a page are
used for different purposes in the main PV memory management code and
in code handling shadow paging.

When a guest is running in shadow mode (which for PV guests is necessary
e.g. for live migration), certain auxiliary pages used by Xen internally
had their owner set to the guest itself.  When the PV guest maps such a
page, shadow code and PV memory management code will disagree on the
meaning of said multi-purpose fields, generally leading to a crash of
the hypervisor.

IMPACT
======

A malicious or buggy PV guest may cause a hypervisor crash, resulting in
a Denial of Service (DoS) affecting the entire host, or cause hypervisor
memory corruption.  We cannot rule out a guest being able to escalate
its privilege.

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

All versions of Xen are vulnerable.

Only x86 systems are affected.  ARM systems are not vulnerable.

x86 HVM guests cannot exploit this vulnerability.

Only x86 PV guests can exploit this vulnerability, and only when being
run in shadow mode.  PV guests are typically run in shadow mode for live
migration, as well as for features like VM snapshot.

Note that save / restore does *not* use shadow mode, and so does not
expose this vulnerability.  Some downstreams also include a "non-live
migration" feature, which also does not use shadow mode (and thus does
not expose this vulnerability).

MITIGATION
==========

Running only HVM guests avoids the vulnerability.

Avoiding live migration of x86 PV guests also avoids the vulnerability.

External References:

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

Comment 2 Adam Mariš 2017-12-12 13:15:19 UTC
Acknowledgments:

Name: the Xen project
Upstream: Jan Beulich (SUSE)

Comment 3 Adam Mariš 2017-12-12 13:16:31 UTC
Created xen tracking bugs for this issue:

Affects: fedora-all [bug 1525018]