Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 519800 (CVE-2014-5146) - app-emulation/xen-{4.2.4-r5,4.3.2-r5}: Long latency virtual-mmu operations are not preemptible (XSA-97) (CVE-2014-{5146,5149})
Summary: app-emulation/xen-{4.2.4-r5,4.3.2-r5}: Long latency virtual-mmu operations ar...
Status: RESOLVED FIXED
Alias: CVE-2014-5146
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo Security
URL: http://www.openwall.com/lists/oss-sec...
Whiteboard: B3 [glsa]
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-13 09:07 UTC by Agostino Sarubbo
Modified: 2015-04-11 20:37 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2014-08-13 09:07:31 UTC
From ${URL} :

      Xen Security Advisory CVE-2014-5146,CVE-2014-5149 / XSA-97
                              version 3

        Long latency virtual-mmu operations are not preemptible

UPDATES IN VERSION 3
====================

Public release.

ISSUE DESCRIPTION
=================

Some MMU virtualization operations on HVM guests must process every
page assigned to a guest.  For larger guests, this can tie up a vcpu
for a significant amount of time, as the operations are not
preemptible.

For guests using Hardware Assisted Paging (HAP, see below) this is
CVE-2014-5146.  For guests not using HAP this is CVE-2014-5149.

IMPACT
======

A malicious HVM guest with a large allocation of shadow/p2m RAM
can mount a denial of service attack affecting the whole system.

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

ARM systems are not vulnerable.

All x86 Xen versions are vulnerable.

The vulnerability is only exposed to HVM guests.

In the default configuration, the vulnerability is only exposed to
large guests (guests assigned more than 128Gbytes of memory).

MITIGATION
==========

Running only PV guests, or only smaller guests will avoid this
problem.

Since the vulnerability actually depends on the guest's shadow memory,
if you are overriding the default allocation (which is about 0.5% of
guest RAM) by using the "shadow_memory=" VM configuration file option,
you should adjust your idea of a 'smaller' guest accordingly.

CREDITS
=======

This issue was discovered by Jan Beulich.

RESOLUTION
==========

For HAP-enabled guests, the attached patch resolves ths issue.

HAP (Hardware Assisted Paging, aka nested paging) is enabled by
default if the system is suitably capable.  The VM configuration file
can disable or enable HAP explicitly by setting "hap=0" or "hap=1".
HAP can also be globally disabled by specifying "hap=off" on the
hypervisor command line.

There is no resolution for guests using shadow pagetables (i.e., not
using HAP) at this time.

xsa97-hap-unstable.patch                             xen-unstable
xsa97-hap-4.4.patch                                  Xen 4.4.x
xsa97-hap-4.3.patch                                  Xen 4.3.x
xsa97-hap-4.2-prereq.patch, xsa97-hap-4.2.patch      Xen 4.2.x



@maintainer(s): after the bump, in case we need to stabilize the package, please let us know if it is ready for the stabilization or not.
Comment 1 Yixun Lan archtester gentoo-dev 2014-08-19 14:28:12 UTC
fixed in version: xen-4.2.4-r5, xen-4.3.2-r5, xen-4.4.0-r6

Arches, please test and mark stable:
=app-emulation/xen-4.2.4-r5
Target keywords : "amd64 x86"

=app-emulation/xen-4.3.2-r5
Target keywords : "amd64"
Comment 2 Agostino Sarubbo gentoo-dev 2014-08-20 15:50:11 UTC
amd64 stable
Comment 3 Agostino Sarubbo gentoo-dev 2014-08-20 16:00:10 UTC
x86 stable.

Maintainer(s), please cleanup.
Security, please vote.
Comment 4 Yixun Lan archtester gentoo-dev 2014-08-21 02:41:33 UTC
this patch cause regressions, upstream have reverted it, current no new patches posted

[xen-4.4-testing test] 29686: regressions - FAIL[1] 

[1] http://www.gossamer-threads.com/lists/xen/devel/344143
Comment 5 GLSAMaker/CVETool Bot gentoo-dev 2015-01-04 21:38:49 UTC
CVE-2014-5149 (http://nvd.nist.gov/nvd.cfm?cvename=CVE-2014-5149):
  Certain MMU virtualization operations in Xen 4.2.x through 4.4.x, when using
  shadow pagetables, are not preemptible, which allows local HVM guest to
  cause a denial of service (vcpu consumption) by invoking these operations,
  which process every page assigned to a guest, a different vulnerability than
  CVE-2014-5146.

CVE-2014-5146 (http://nvd.nist.gov/nvd.cfm?cvename=CVE-2014-5146):
  Certain MMU virtualization operations in Xen 4.2.x through 4.4.x before the
  xsa97-hap patch, when using Hardware Assisted Paging (HAP), are not
  preemptible, which allows local HVM guest to cause a denial of service (vcpu
  consumption) by invoking these operations, which process every page assigned
  to a guest, a different vulnerability than CVE-2014-5149.
Comment 6 Yury German Gentoo Infrastructure gentoo-dev 2015-04-05 03:45:59 UTC
Maintainer(s), Thank you for you for cleanup.

Added to an existing GLSA Request.
Comment 7 GLSAMaker/CVETool Bot gentoo-dev 2015-04-11 20:37:34 UTC
This issue was resolved and addressed in
 GLSA 201504-04 at https://security.gentoo.org/glsa/201504-04
by GLSA coordinator Yury German (BlueKnight).