Information

Advisory XSA-271
Public release 2018-08-14 17:00
Updated 2023-12-15 15:35
Version 3
CVE(s) CVE-2018-14007
Title XAPI HTTP directory traversal

Files

advisory-271.txt (signed advisory file)
xsa271-xapi.patch

Advisory


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

            Xen Security Advisory CVE-2018-14007 / XSA-271
                               version 3

                     XAPI HTTP directory traversal

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

Normalize version tags

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

XAPI has an unauthenticated HTTP endpoint update/ which exports the
contents of /var/update for other hosts to use.

However, the resolution of . and .. in paths is performed before url
unquoting is performed.  This allows an attacker to traverse out of the
web root.

IMPACT
======

An unauthenticated user with access to the management network can read
arbitrary files from the dom0 filesystem.  This includes the pool secret
/etc/xensource/ptoken which grants the attacker full administrator
access.

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

All versions of XAPI since v1.13.0 are vulnerable.

If the directory /var/update doesn't exist, the vulnerability is not
exposed.

MITIGATION
==========

In the recommended configuration, the management network is isolated and
isn't reachable from untrusted hosts, or by general network traffic.

CREDITS
=======

This issue was discovered by Ronald Volgers of Computest
https://www.computest.nl/en/

RESOLUTION
==========

Applying the appropriate attached patch resolves this issue.

xsa271-xapi.patch  Xapi

$ sha256sum xsa271*
ffefb71cd328e0ee5654c135bf9b08f48abedd013f1c68d5589132e2a03a01f8  xsa271-xapi.patch
$

REGENERATION OF POOL SECRET
===========================

There are no known exploits in the wild.  If there is a risk that
credentials could have been stolen, they should be reset.

Most credentials can be reset via normal administrative means, but the
pool secret doesn't have any mechanism to reset.  The following
instructions should be used:

 1) On all pool members, stop Xapi:
    # service xapi stop

 2) On the pool master:
    # rm /etc/xensource/ptoken
    # /opt/xensource/libexec/genptoken -f -o /etc/xensource/ptoken

 3) Copy /etc/xensource/ptoken to all pool slaves

 4) On the pool master, restart the toolstack:
    # xe-toolstack-restart

 5) On all pool slaves, restart the toolstack:
    # xe-toolstack-restart

Once the pool secret has been regenerated, the root password can be
changed with:
    # xe user-password-change

Furthermore, consideration should be given to other credentials, such as
(but not limited to) SSL keys, Storage SAN/iSCSI/NFS details, as well as
secrets contained within VMs disks/snapshots/etc.

DEPLOYMENT DURING EMBARGO
=========================

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

But: 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
Team.


(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:
  http://www.xenproject.org/security-policy.html
-----BEGIN PGP SIGNATURE-----

iQFABAEBCAAqFiEEI+MiLBRfRHX6gGCng/4UyVfoK9kFAmV8b/kMHHBncEB4ZW4u
b3JnAAoJEIP+FMlX6CvZeGUH/1M/pptPkp8D+peRLAfHjV8jKWhgFXugViDHsPn/
JnPYtmtJmNiGh+MuGQsd5z+TFii1/5itXEi66pZrUN4DA+2NS0k9TkMr4JtMT3lO
2IVLQtq/KPqlInb//Ld+Nb69AFvMhiddMblbC3APB6M70KLow8SkQLvqFpD5pYBe
xK2w9oQpaRoci3Fy5MgI6tH5MgFtVtg7REIKMPIjBDP5v6c3odn6RfLbXVfNpD8F
KGdzVxgaaAd29en+eW2JgsQQcSOu2bLzTGhlUuaTmazBdzKEX4JzmDCXyW4EMWUB
L43uz+vmZZ29211X1xuLG/mp/v+Wj8myf3cX6QcXb1KbYBE=
=sKu2
-----END PGP SIGNATURE-----

Xenproject.org Security Team