Index: kernel/generic/src/ddi/ddi.c
===================================================================
--- kernel/generic/src/ddi/ddi.c	(revision 1167520724b9b526c27b67f2d4bc447ef626240c)
+++ kernel/generic/src/ddi/ddi.c	(revision c8ea4a8b385dcfa2947d09fcc2d484d8750d4329)
@@ -130,7 +130,9 @@
 	t = task_find_by_id(id);
 	
-	if (!t) {
+	if ((!t) || (!context_check(CONTEXT, t->context))) {
 		/*
-		 * There is no task with the specified ID.
+		 * There is no task with the specified ID
+		 * or the task belongs to a different security
+		 * context.
 		 */
 		spinlock_unlock(&tasks_lock);
