Xen Security Advisory 181 (CVE-2016-5242) - arm: Host crash caused by VMID exhaustion
Xen.org security team <[email protected]>
| Newsgroups | gmane.comp.emulators.xen.announce |
|---|---|
| Message-ID | <E1b9vTq-0001gg-6a__39003.5505094149$1465223755$gmane$org@xenbits.xenproject.org> |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Xen Security Advisory CVE-2016-5242 / XSA-181
version 2
arm: Host crash caused by VMID exhaustion
UPDATES IN VERSION 2
====================
CVE assigned.
ISSUE DESCRIPTION
=================
VMIDs are a finite hardware resource, and allocated as part of domain
creation. If no free VMIDs are available when trying to create a new domain,
a bug in the error path causes a NULL pointer to be used, resulting in a Data
Abort and host crash.
IMPACT
======
Attempting to create too many concurrent domains causes a host crash rather
than a graceful error. A malicious device driver domain can hold references
to domains, preventing its VMID being released.
VULNERABLE SYSTEMS
==================
Xen versions 4.4 and later are affected. Older Xen versions are unaffected.
x86 systems are not affected.
Only arm systems with less-privileged device driver domains can expose this
vulnerability.
MITIGATION
==========
There is no mitigation. Not using driver domains reclassifies the problem,
but does not fix it.
NOTE REGARDING LACK OF EMBARGO
==============================
The crash was discussed publicly on xen-devel, before it was appreciated
that there was a security problem.
CREDITS
=======
This issue was discovered by Aaron Cornelius of DornerWorks.
RESOLUTION
==========
Applying the appropriate attached patch resolves this issue.
xsa181.patch xen-unstable, Xen 4.6.x, 4.5.x
xsa181-4.4.patch Xen 4.4.x
$ sha256sum xsa181*
6756fcf44446675e5277f6d6c0e8a0aaa51a7909ad9a55af89a09367fded8733 xsa181.patch
97a90c7cb42466647622cb2ed98de531b7ba2e174a1bc639a32a6f1b626d503f xsa181-4.4.patch
$
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQEbBAEBAgAGBQJXUYxcAAoJEIP+FMlX6CvZgAAH+OiNDLSkAHUl3isXjFzK+Mf9
NGuIyXc2j5K8uTwz5KvZkhiWLVCeOY7Jo1Wix3Fa1wFtJ2rMlgQf7/hOt0tk0NjU
w97Re+xSi69iruPEdwb4k31ohnlfLSqriqL4JWh6EDrhftdnvEk/yXmriyu1RhKy
MLk1P24Ora/gvSj31px3vBkbu8KLImhIOkOcRmJ7FQb8gWsmMDluuVu7lhUAL7im
KCe6u99sDQo18wxubYID4XxFqJExBUd6L3cnpdN4UITgylSaIqJq/RBwd8jRrxW8
MxT9/IcNf0rmB1Sh1IARBFF7P7hj76ho3sIpMeE0cMPWBe2NWMItX9ula61vQA==
=kBFB
-----END PGP SIGNATURE-----
_______________________________________________
Xen-announce mailing list
[email protected]
http://lists.xen.org/xen-announce
xsa181.patch
(application/octet-stream, 1.2 KB)
From ee488e2133e581967d13d5287d7bd654e9b2e2a6 Mon Sep 17 00:00:00 2001 From: Andrew Cooper <[email protected]> Date: Thu, 2 Jun 2016 14:19:00 +0100 Subject: [PATCH] xen/arm: Don't free p2m->root in p2m_teardown() before it has been allocated If p2m_init() didn't complete successfully, (e.g. due to VMID exhaustion), p2m_teardown() is called and unconditionally tries to free p2m->root before it has been allocated. free_domheap_pages() doesn't tolerate NULL pointers. This is XSA-181 Reported-by: Aaron Cornelius <[email protected]> Signed-off-by: Andrew Cooper <[email protected]> Reviewed-by: Jan Beulich <[email protected]> Reviewed-by: Julien Grall <[email protected]> --- xen/arch/arm/p2m.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index 838d004..6a19c57 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -1408,7 +1408,8 @@ void p2m_teardown(struct domain *d) while ( (pg = page_list_remove_head(&p2m->pages)) ) free_domheap_page(pg); - free_domheap_pages(p2m->root, P2M_ROOT_ORDER); + if ( p2m->root ) + free_domheap_pages(p2m->root, P2M_ROOT_ORDER); p2m->root = NULL; -- 2.1.4
xsa181-4.4.patch
(application/octet-stream, 1.3 KB)
From 605a2711c411247920116a5026e772815b1168cd Mon Sep 17 00:00:00 2001 From: Andrew Cooper <[email protected]> Date: Thu, 2 Jun 2016 14:19:00 +0100 Subject: [PATCH] xen/arm: Don't free p2m->first_level in p2m_teardown() before it has been allocated If p2m_init() didn't complete successfully, (e.g. due to VMID exhaustion), p2m_teardown() is called and unconditionally tries to free p2m->first_level before it has been allocated. free_domheap_pages() doesn't tolerate NULL pointers. This is XSA-181 Reported-by: Aaron Cornelius <[email protected]> Signed-off-by: Andrew Cooper <[email protected]> Reviewed-by: Jan Beulich <[email protected]> Reviewed-by: Julien Grall <[email protected]> --- xen/arch/arm/p2m.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index aff7a2c..9cf6f91 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -615,7 +615,8 @@ void p2m_teardown(struct domain *d) while ( (pg = page_list_remove_head(&p2m->pages)) ) free_domheap_page(pg); - free_domheap_pages(p2m->first_level, P2M_FIRST_ORDER); + if ( p2m->first_level ) + free_domheap_pages(p2m->first_level, P2M_FIRST_ORDER); p2m->first_level = NULL; -- 2.1.4