]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/ipc/ipc_kmsg.c
xnu-6153.101.6.tar.gz
[apple/xnu.git] / osfmk / ipc / ipc_kmsg.c
index f1611fc821036fccebd36c445a33bd5a1ce6daf0..3a40a39ff0620048bc55372a5f0062f36fe6b314 100644 (file)
@@ -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);