mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
evtchn-fifo: prevent use after free
evtchn_fifo_init_control() calls evtchn_fifo_destroy() on an error path, leading to cleanup_event_array() which frees d->evtchn_fifo without also clearing the pointer. Otoh the bulk of evtchn_fifo_init_control() is dependent on d->evtchn_fifo being NULL. This is XSA-188 / CVE-2016-7154. Reported-by: Mikhail V Gorobets <mikhail.v.gorobets@intel.com> Suggested-by: Mikhail V Gorobets <mikhail.v.gorobets@intel.com> Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
1 parent
2f3e08d37b
commit
dfddbf35d9
1 file changed
+1
@@ -482,6 +482,7 @@ static void cleanup_event_array(struct domain *d)
|
||||
for ( i = 0; i < EVTCHN_FIFO_MAX_EVENT_ARRAY_PAGES; i++ )
|
||||
unmap_guest_page(d->evtchn_fifo->event_array[i]);
|
||||
xfree(d->evtchn_fifo);
|
||||
d->evtchn_fifo = NULL;
|
||||
}
|
||||
|
||||
static void setup_ports(struct domain *d)
|
||||
|
||||