Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 609120 (XSA-209)

Summary: <app-emulation/xen-tools-4.7.1-r8: qemu: display: cirrus_bitblt_cputovideo does not check if memory region is safe (XSA-209,CVE-2017-2620)
Product: Gentoo Security Reporter: Thomas Deutschmann (RETIRED) <whissi>
Component: VulnerabilitiesAssignee: Gentoo Security <security>
Severity: major CC: alexxy, cardoe, dlan
Priority: Normal Flags: stable-bot: sanity-check+
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard: B1 [glsa cve]
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 609202    

Description Thomas Deutschmann (RETIRED) gentoo-dev 2017-02-12 15:26:31 UTC
Hash: SHA1

            Xen Security Advisory CVE-2017-2620 / XSA-209
                              version 2

   cirrus_bitblt_cputovideo does not check if memory region is safe

              *** EMBARGOED UNTIL 2017-02-21 12:00 UTC ***


Patch xsa209-qemut.patch updated so that it builds.


In CIRRUS_BLTMODE_MEMSYSSRC mode the bitblit copy routine
cirrus_bitblt_cputovideo fails to check wethehr the specified memory
region is safe.


A malicious guest administrator can cause an out of bounds memory
write, very likely exploitable as a privilege escalation.


Versions of qemu shipped with all Xen versions are vulnerable.

Xen systems running on x86 with HVM guests, with the qemu process
running in dom0 are vulnerable.

Only guests provided with the "cirrus" emulated video card can exploit
the vulnerability.  The non-default "stdvga" emulated video card is
not vulnerable.  (With xl the emulated video card is controlled by the
"stdvga=" and "vga=" domain configuration options.)

ARM systems are not vulnerable.  Systems using only PV guests are not

For VMs whose qemu process is running in a stub domain, a successful
attacker will only gain the privileges of that stubdom, which should
be only over the guest itself.

Both upstream-based versions of qemu (device_model_version="qemu-xen")
and `traditional' qemu (device_model_version="qemu-xen-traditional")
are vulnerable.


Running only PV guests will avoid the issue.

Running HVM guests with the device model in a stubdomain will mitigate
the issue.

Changing the video card emulation to stdvga (stdvga=1, vga="stdvga",
in the xl domain configuration) will avoid the vulnerability.


Applying the appropriate attached patch resolves this issue.

xsa209-qemuu.patch       qemu-xen, qemu upstream
(no backport yet)        qemu-xen-traditional

$ sha256sum xsa209*
324d392fe8d840b4314537ddc68ab51042a918dde4a3fc26166923856eb47776  xsa209-qemut.patch
011f4a21fdfb40a7189351a0d7348024e5e1f4b5af59ca1cd19aa88dcc9033e9  xsa209-qemuu.patch


Deployment of the patches described above (or others which are
substantially similar) is permitted during the embargo, even on
public-facing systems with untrusted guest users and administrators.

However, deployment of the "stdvga" mitigation (changing the video
card emulation to stdvga) is NOT permitted (except where all the
affected systems and VMs are administered and used only by
organisations which are members of the Xen Project Security Issues
Predisclosure List).  Specifically, deployment on public cloud systems
is NOT permitted.  This is because this produces a guest-visible
change which will indicate which component contains the vulnerability.

Additionally, distribution of updated software is prohibited (except
to other members of the predisclosure list).

Predisclosure list members who wish to deploy significantly different
patches and/or mitigations, please contact the Xen Project Security

(Note: this during-embargo deployment notice is retained in
post-embargo publicly released Xen Project advisories, even though it
is then no longer applicable.  This is to enable the community to have
oversight of the Xen Project Security Team's decisionmaking.)

For more information about permissible uses of embargoed information,
consult the Xen Project community's agreed Security Policy:
Version: GnuPG v1

Comment 1 Thomas Deutschmann (RETIRED) gentoo-dev 2017-02-13 02:25:19 UTC
Freeing alias for tracker usage.
Comment 2 Thomas Deutschmann (RETIRED) gentoo-dev 2017-02-21 12:02:35 UTC
$URL is now public.

@ Maintainer(s): Please proceed!
Comment 3 Yixun Lan archtester gentoo-dev 2017-02-22 09:12:19 UTC
commit 68032806896565d2cdc7338c02092c2ee1a5fc3b
Author: Yixun Lan <>
Date:   Wed Feb 22 17:07:11 2017 +0800

    app-emulation/xen-tools: fix XSA-209

    cirrus_bitblt_cputovideo does not check if memory region is safe

    Gentoo-Bug: 609120

    Package-Manager: Portage-2.3.3, Repoman-2.3.1

:100644 100644 6a15a234a9... a907077345... M    app-emulation/xen-tools/Manifest
:000000 100644 0000000000... 726e0e7094... A    app-emulation/xen-tools/xen-tools-4.7.1-r7.ebuild
:000000 100644 0000000000... f87e05ba01... A    app-emulation/xen-tools/xen-tools-4.8.0-r3.ebuild
Comment 4 Yixun Lan archtester gentoo-dev 2017-02-22 09:13:24 UTC
Arches, please test and mark stable:

Target keywords: "amd64 x86"
Comment 5 Yixun Lan archtester gentoo-dev 2017-02-23 04:13:29 UTC
(In reply to Yixun Lan from comment #4)
> Arches, please test and mark stable:
> =app-emulation/xen-tools-4.7.1-r7
> Target keywords: "amd64 x86"

had problem with  4.7.1-r7, the XSA-209 qemuu.patch actually depend on previous one patch, so also pull in..

please stable:
Target keywords: "amd64 x86"
Comment 6 Agostino Sarubbo gentoo-dev 2017-02-23 15:55:48 UTC
amd64 stable
Comment 7 Agostino Sarubbo gentoo-dev 2017-02-23 16:31:06 UTC
x86 stable.

Maintainer(s), please cleanup.
Security, please add it to the existing request, or file a new one.
Comment 8 Yury German Gentoo Infrastructure gentoo-dev 2017-02-24 02:21:28 UTC
Arches and Maintainer(s). Thank you for your work.
New GLSA Request filed.
Maintainer(s), please drop the vulnerable version(s).
Comment 9 GLSAMaker/CVETool Bot gentoo-dev 2017-03-28 03:22:25 UTC
This issue was resolved and addressed in
 GLSA 201703-07 at
by GLSA coordinator Yury German (BlueKnight).