aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/domctl.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2013-04-18 16:11:23 +0200
committerJan Beulich <jbeulich@suse.com>2013-04-18 16:11:23 +0200
commit545607eb3cfeb2abf5742d1bb869734f317fcfe5 (patch)
tree6039c103db155c2f36625ffd75d7262d5dfdc5c4 /xen/common/domctl.c
parentfdac9515607b757c044e7ef0d61b1453ef999b08 (diff)
downloadxen-545607eb3cfeb2abf5742d1bb869734f317fcfe5.tar.gz
xen-545607eb3cfeb2abf5742d1bb869734f317fcfe5.tar.bz2
xen-545607eb3cfeb2abf5742d1bb869734f317fcfe5.zip
x86: fix various issues with handling guest IRQs
- properly revoke IRQ access in map_domain_pirq() error path - don't permit replacing an in use IRQ - don't accept inputs in the GSI range for MAP_PIRQ_TYPE_MSI - track IRQ access permission in host IRQ terms, not guest IRQ ones (and with that, also disallow Dom0 access to IRQ0) This is CVE-2013-1919 / XSA-46. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Diffstat (limited to 'xen/common/domctl.c')
-rw-r--r--xen/common/domctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xen/common/domctl.c b/xen/common/domctl.c
index 6bd8efdf06..73b12c8a4d 100644
--- a/xen/common/domctl.c
+++ b/xen/common/domctl.c
@@ -25,6 +25,7 @@
#include <xen/paging.h>
#include <xen/hypercall.h>
#include <asm/current.h>
+#include <asm/irq.h>
#include <asm/page.h>
#include <public/domctl.h>
#include <xsm/xsm.h>
@@ -777,9 +778,9 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl)
else if ( xsm_irq_permission(XSM_HOOK, d, pirq, allow) )
ret = -EPERM;
else if ( allow )
- ret = irq_permit_access(d, pirq);
+ ret = pirq_permit_access(d, pirq);
else
- ret = irq_deny_access(d, pirq);
+ ret = pirq_deny_access(d, pirq);
}
break;