[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] arm: add bounds check on hypercall array
# HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxx> # Date 1343234361 -3600 # Node ID a1ee7eccd83e533785aa35caa49833a1277807d3 # Parent 7118869c9cbee6d8bd850aa58ebec00e6486fb16 arm: add bounds check on hypercall array Otherwise a guest can cause us to run off the end of the array. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> [ ijc -- switched to >= not > ] Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- diff -r 7118869c9cbe -r a1ee7eccd83e xen/arch/arm/traps.c --- a/xen/arch/arm/traps.c Wed Jul 25 17:39:20 2012 +0100 +++ b/xen/arch/arm/traps.c Wed Jul 25 17:39:21 2012 +0100 @@ -479,6 +479,12 @@ static void do_trap_hypercall(struct cpu return; } + if ( regs->r12 >= ARRAY_SIZE(arm_hypercall_table) ) + { + regs->r0 = -ENOSYS; + return; + } + call = arm_hypercall_table[regs->r12].fn; if ( call == NULL ) { _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |