]> xenbits.xensource.com Git - xen.git/commitdiff
xen/arm: Upgrade DCISW into DCCISW
authorJulien Grall <julien.grall@linaro.org>
Mon, 14 Apr 2014 19:46:43 +0000 (20:46 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 23 Apr 2014 09:30:34 +0000 (10:30 +0100)
A guest is allowed to use invalidate cache by set/way instruction (i.e DCISW)
without any restriction. As the cache is shared with Xen, the guest invalidate
an address being in used by Xen. This may lead a Xen crash because the memory
state is invalid.
Set the bit HCR.SWIO to upgrade invalidate cache by set/way instruction to an
invalidate and clean.

This is CVE-2014-2915 / XSA-93.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Reported-by: Thomas Leonard <tal36@cam.ac.uk>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/traps.c

index 97ab28667efe5db2aae37977f81edbc40201528a..17ac8d87de75d559c4dc6f6baf4e00dcfb1f534e 100644 (file)
@@ -82,7 +82,7 @@ void __cpuinit init_traps(void)
 
     /* Setup hypervisor traps */
     WRITE_SYSREG(HCR_PTW|HCR_BSU_INNER|HCR_AMO|HCR_IMO|HCR_VM|HCR_TWI|HCR_TSC|
-                 HCR_TAC, HCR_EL2);
+                 HCR_TAC|HCR_SWIO, HCR_EL2);
     isb();
 }