Xen Security Advisory 94 - ARM hypervisor crash on guest interrupt controller access
Xen.org security team <[email protected]>
| Newsgroups | gmane.comp.emulators.xen.announce |
|---|---|
| Message-ID | <E1Wcws9-0005ae-0x__7583.90464257008$1398258944$gmane$org@xenbits.xen.org> |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Xen Security Advisory XSA-94
ARM hypervisor crash on guest interrupt controller access
ISSUE DESCRIPTION
=================
When handling a guest access to the virtual GIC distributor (interrupt
controller) Xen could dereference a pointer before checking it for
validity leading to a hypervisor crash and host Denial of Service.
IMPACT
======
A buggy or malicious guest can crash the host.
VULNERABLE SYSTEMS
==================
Both 32- and 64-bit ARM systems are vulnerable from Xen 4.4 onward.
x86 systems are not vulnerable.
MITIGATION
==========
None.
NOTE REGARDING LACK OF EMBARGO
==============================
This bug was publicly reported on xen-devel, before it was appreciated
that there was a security problem.
CREDITS
=======
The initial bug was discovered by Thomas Leonard and the security
aspect was diagnosed by Julien Grall.
RESOLUTION
==========
Applying the appropriate attached patch resolves this issue.
xsa94.patch xen-unstable, Xen 4.4.x
$ sha256sum xsa94*.patch
ad0f20577400756a1786daeafef86fa870727ec35b48f71f565e4a30dcbda58d xsa94.patch
$
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQEcBAEBAgAGBQJTV7qTAAoJEIP+FMlX6CvZ08EH/3pIhD1lCXex3pbvo0BFIc2y
+XqJmLQ8QVeuk1Q9etEVbJxC8YvbmunefyCyfXIYQpL5jWqJdOAGzSktLOuaGrrM
ENG6kFyiC6pxLouJb+BAm3qOfe3vVCdkWh9ouWQGC/3FqbSM+2QGI0vUyxtfmmga
IDeQ+CjyWVVhmR7Tb76Gc/pMLnrfD1HTZSgTe8NacqbnZuXzPMrxkKw8BleK/boH
L5r/0Y/GqqOe5LRqCOZt8U7jlcfwAs+rqUI0UDz70YvokcBH7RwaRiolZxicLdjP
4lFJH8q9d45EA9JI+Xifv2QZ9tJMRNhRtTQpqIS8swAROOM/SblpPUPlOiPvyaE=
=RGUg
-----END PGP SIGNATURE-----
_______________________________________________
Xen-announce mailing list
[email protected]
http://lists.xen.org/xen-announce
xsa94.patch
(application/octet-stream, 1.1 KB)
xen/arm: vgic: Check rank in GICD_ICFGR* emulation before locking The function vgic_irq_rank may return NULL is the IRQ is not in range handled by the guest. This will result to derefence a NULL pointer which will crash Xen. I've checked the rest of the emulation and this is only place where the lock is taken before the rank is checked. Signed-off-by: Julien Grall <[email protected]> Reported-by: Thomas Leonard <[email protected]> Reviewed-by: Jan Beulich <[email protected]> Acked-by: Ian Campbell <[email protected]> diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c index 1b95003..4cf6470 100644 --- a/xen/arch/arm/vgic.c +++ b/xen/arch/arm/vgic.c @@ -602,8 +602,8 @@ static int vgic_distr_mmio_write(struct vcpu *v, mmio_info_t *info) case GICD_ICFGR + 2 ... GICD_ICFGRN: /* SPIs */ if ( dabt.size != 2 ) goto bad_width; rank = vgic_irq_rank(v, 2, gicd_reg - GICD_ICFGR); - vgic_lock_rank(v, rank); if ( rank == NULL) goto write_ignore; + vgic_lock_rank(v, rank); rank->icfg[REG_RANK_INDEX(2, gicd_reg - GICD_ICFGR)] = *r; vgic_unlock_rank(v, rank); return 1;