From f60ab5337f968e2f10c639ab59db7afb0fe4f7c3 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Wed, 30 Sep 2020 09:10:01 +0200 Subject: [PATCH] evtchn: refuse EVTCHNOP_status for Xen-bound event channels Callers have no business knowing the state of the Xen end of an event channel. Signed-off-by: Jan Beulich Acked-by: Julien Grall Reviewed-by: Paul Durrant --- xen/common/event_channel.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index d2ee83bbbf..49cb318b81 100644 --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -933,6 +933,11 @@ int evtchn_status(evtchn_status_t *status) } chn = evtchn_from_port(d, port); + if ( consumer_is_xen(chn) ) + { + rc = -EACCES; + goto out; + } rc = xsm_evtchn_status(XSM_TARGET, d, chn); if ( rc ) -- 2.30.2