mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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>
This commit is contained in:
1 parent
fdac951560
commit
545607eb3c
9 files changed
+93
-30
No files matched your search
@@ -73,6 +73,12 @@ class IRQController(DevController):
|
||||
|
||||
pirq = get_param('irq')
|
||||
|
||||
rc = xc.physdev_map_pirq(domid = self.getDomid(),
|
||||
index = pirq,
|
||||
pirq = pirq)
|
||||
if rc < 0:
|
||||
raise VmError('irq: Failed to map irq %x' % (pirq))
|
||||
|
||||
rc = xc.domain_irq_permission(domid = self.getDomid(),
|
||||
pirq = pirq,
|
||||
allow_access = True)
|
||||
@@ -81,12 +87,6 @@ class IRQController(DevController):
|
||||
#todo non-fatal
|
||||
raise VmError(
|
||||
'irq: Failed to configure irq: %d' % (pirq))
|
||||
rc = xc.physdev_map_pirq(domid = self.getDomid(),
|
||||
index = pirq,
|
||||
pirq = pirq)
|
||||
if rc < 0:
|
||||
raise VmError(
|
||||
'irq: Failed to map irq %x' % (pirq))
|
||||
back = dict([(k, config[k]) for k in self.valid_cfg if k in config])
|
||||
return (self.allocateDeviceID(), back, {})
|
||||
|
||||
|
||||