X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/c6bf4f310a33a9262d455ea4d3f0630b1255e3fe..ea3f04195ba4a5034c9c8e9b726d4f7ce96f1832:/osfmk/ipc/ipc_kmsg.c?ds=sidebyside diff --git a/osfmk/ipc/ipc_kmsg.c b/osfmk/ipc/ipc_kmsg.c index f1611fc82..3a40a39ff 100644 --- a/osfmk/ipc/ipc_kmsg.c +++ b/osfmk/ipc/ipc_kmsg.c @@ -4270,7 +4270,8 @@ ipc_kmsg_copyout_header( assert(entry->ie_bits & MACH_PORT_TYPE_SEND_RECEIVE); } else { ip_lock(reply); - if (!ip_active(reply)) { + /* Is the reply port still active and allowed to be copied out? */ + if (!ip_active(reply) || !ip_label_check(space, reply, reply_type)) { /* clear the context value */ reply->ip_reply_context = 0; ip_unlock(reply);