|Public release ||2016-11-22 12:00|
|Updated ||2016-11-22 12:00|
|CVE(s) ||CVE-2016-9379 CVE-2016-9380|
|Title ||delimiter injection vulnerabilities in pygrub|
Filesadvisory-198.txt (signed advisory file)
-----BEGIN PGP SIGNED MESSAGE-----
Xen Security Advisory CVE-2016-9379,CVE-2016-9380 / XSA-198
delimiter injection vulnerabilities in pygrub
UPDATES IN VERSION 3
pygrub, the boot loader emulator, fails to quote (or sanity check) its
results when reporting them to its caller.
pygrub supports a number of output formats. When the S-expression
output format is requested, putting string quotes and S-expressions in
the bootloader configuration file can produce incorrect output.
When the nul-delimited output format is requested, nul bytes in the
bootloader configuration file can produce an ambiguous or confusing
output file, which is interpreted by libxl in a vulnerable way.
The existing bootloader config interpreters all read input in a
line-based way from their bootloaders, and none of them support any
kind of escaping. So the newline-delimited output format is safe.
The attacker can use this to cause the toolstack to treat any file
accessible to the toolstack as if it were the guest's initial ramdisk
file. The file contents are provided to the guest kernel; also,
normally, these files are deleted by the toolstack as the guest starts
to boot; alternatively they may be deleted later.
A malicious guest administrator can obtain the contents of sensitive
host files (an information leak).
Additionally, a malicious guest administrator can cause files on the
host to be removed, causing a denial of service. In some unusual host
configurations, ability to remove certain files may be useable for
Xen versions 2.0 and later are vulnerable.
The vulnerability is only exposed to guests configured by the host
administrator to boot using pygrub. In the xl and xm domain
configuration file, this is typically achieved with
On x86 this would typically apply only to PV domains.
All systems using xl, libxl, or libvirt are vulnerable to pygrub-using
Systems using other (third-party) toolstacks may or may not be
vulnerable, depending on whether pygrub is configured, and what pygrub
output format they use. Please consult your toolstack provider.
Configuring guests not to use pygrub will avoid the vulnerability.
For x86 PV guests currently using pygrub, booting the guest as HVM
is often a practical option to avoid pygrub.
This issue was discovered by Daniel Richman and Gábor Szarka of
the Cambridge University Student-Run Computing Facility.
Applying the attached patch resolves this issue.
xsa198.patch All Xen versions (at least Xen 4.4 and later)
$ sha256sum xsa198*
DEPLOYMENT DURING EMBARGO
Deployment of the patch 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
Deployment of the mitigations 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 switching away from the use of pygrub would reveal
where the vulnerability lies.
Deployment of mitigations is permitted only AFTER the embargo ends.
(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:
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
-----END PGP SIGNATURE-----
Xenproject.org Security Team