From 2e1cba2da4631c5cd7218a8f30d521dce0f41370 Mon Sep 17 00:00:00 2001 From: Matthew Daley Date: Thu, 6 Feb 2014 16:42:36 +0100 Subject: [PATCH] xsm/flask: correct off-by-one in flask_security_avc_cachestats cpu id check This is XSA-85. Signed-off-by: Matthew Daley Reviewed-by: Jan Beulich Reviewed-by: Ian Campbell --- xen/xsm/flask/flask_op.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/xsm/flask/flask_op.c b/xen/xsm/flask/flask_op.c index f8deb37028..4b93e71e77 100644 --- a/xen/xsm/flask/flask_op.c +++ b/xen/xsm/flask/flask_op.c @@ -464,7 +464,7 @@ static int flask_security_avc_cachestats(struct xen_flask_cache_stats *arg) { struct avc_cache_stats *st; - if ( arg->cpu > nr_cpu_ids ) + if ( arg->cpu >= nr_cpu_ids ) return -ENOENT; if ( !cpu_online(arg->cpu) ) return -ENOENT; -- 2.30.2