| Previous | Next |
| KERN_UREFS_OVERFLOW | KERN_RIGHT_EXISTS |
KERN_INVALID_CAPABILITY
KERN_INVALID_CAPABILITY reports that the caller presented a Mach port capability the kernel cannot use for this request. In Mach, port rights are capabilities: possessing a particular right grants only the operations associated with that right and object.
This code is related to, but more specific than, a simple missing name. A port name may exist and a right may be present, yet the supplied capability can still be unsuitable because it represents the wrong object, an inappropriate privilege level, or a right that cannot perform the requested action.
What to examine
- Which Mach object the API expects: task, thread, host, service, memory entry, or another port-backed object.
- The exact right and privilege level transferred to the caller.
- Whether a control or privileged port was required but a name or unprivileged port was passed instead.
- Whether the capability originated in a different task namespace or was invalidated during teardown.
Do not try to repair this by treating port numbers as interchangeable. The value of Mach's model is that capabilities encode both object identity and the permitted scope of access.
References
- XNU: kern_return.h
- Apple Kernel Programming Guide: Mach ports and rights
- GNU Mach Reference Manual: Port Manipulation Interface
Looking for a different code? Search another status or error code.