SCM_RIGHTS is a Unix domain socket control message that lets a process pass file descriptors to another process. The receiver obtains a duplicate descriptor for an already open resource, such as a socket or file, without reopening it. This is used in interprocess communication and privilege-separated service designs.
What SCM_RIGHTS Does in Unix Domain IPC
SCM_RIGHTS is a Unix domain socket control message used to transfer already open file descriptors between processes. That matters because the receiving process inherits access to the same underlying resource without reopening it, which preserves state, avoids repeated authentication or setup, and supports tightly controlled interprocess communication patterns.
In practice, SCM_RIGHTS is a kernel-mediated capability transfer mechanism. The sender does not pass the file contents or the socket itself as text data; it passes a descriptor reference that the receiving process can use as if it had opened the resource locally.
Why File Descriptor Passing Is Powerful
File descriptor passing is useful when a privileged process needs to open a resource once and then hand controlled access to a less privileged worker. It is common in privilege-separated designs, service brokers, listener handoff, and supervisor architectures where one process accepts connections and another process handles them.
The key benefit is separation of duties. A process that can receive an accepted network socket, a log file handle, or another sensitive descriptor can operate without broad filesystem or network privileges of its own. That can reduce exposure, simplify startup sequencing, and avoid duplicating sensitive setup logic across multiple processes.
At the same time, descriptor transfer is not a copy of the underlying resource policy. The receiver gets meaningful access, including whatever capabilities the open handle already confers. That makes the boundary between sender and receiver security-critical, especially in designs that rely on strict privilege separation.
Security Implications of Descriptor Handoff
SCM_RIGHTS can shrink attack surface when it is used to centralise privileged opens and distribute only the needed handles. It can also widen exposure if a process can smuggle a powerful descriptor into a less trusted component, or if the receiver is not restricted to the exact resource it should receive.
The security model depends on the trustworthiness of the Unix domain socket endpoint, the correctness of the receiving code, and the surrounding process permissions. If an attacker can influence which descriptors are sent, reuse an existing handle after policy changes, or trick a broker into passing a more capable resource than intended, the result can be unauthorized access without any new open call.
Because the handoff preserves the original open state, inherited access can outlive the conditions that originally justified it. That is why descriptor passing is often paired with least privilege, careful broker design, and narrow process boundaries rather than treated as a convenience feature alone.
When SCM_RIGHTS Changes the Control Model
SCM_RIGHTS changes how you think about authorization and revocation. Once a process has received a descriptor, later file permission changes do not necessarily affect that already open handle in the same way they would a fresh open attempt. The control point is therefore the transfer event, not only the underlying object permissions.
It also changes how operators reason about trust chains. A service that appears unprivileged may still hold powerful inherited access, so incident review should include descriptor brokers, socket activation paths, and any process that can forward handles on behalf of another component.
For engineers, the practical lesson is that descriptor passing is a controlled delegation mechanism, not just an IPC optimisation. Its value comes from precision: pass the minimum descriptor set, to the intended peer, at the intended time.
Common Misuse Patterns and Failure Modes
Misuse usually appears when descriptor passing is treated as implicitly safe because the transport is local. Local does not mean low risk. A compromised broker, an overly broad recipient, or an unexpected descriptor type can create privilege transfer paths that are hard to notice in application logs.
Another failure mode is assuming that the receiver has only the privileges of its own process identity. In reality, the effective authority may be a combination of its native privileges and everything that has been handed to it through SCM_RIGHTS. That can complicate audits, access reviews, and post-incident reconstruction.
Operationally, the best safeguard is a design that treats every transferred descriptor as security-relevant state. Document who may send, who may receive, and which resources are allowed to cross the boundary.
Risk and Threat Considerations
Descriptor passing can become an exposure path when a privileged process hands off more authority than the recipient should have, or when an attacker can abuse a trusted local socket to smuggle access into another process. The risk is strongest in brokered architectures where handle transfer substitutes for direct opening and normal permission checks are bypassed after the fact.
Failure mechanism: A compromised or overtrusted sender transfers a live descriptor that grants access to a socket, file, or other resource the receiver could not have opened on its own, creating unauthorized access or persistence through inherited state.
Impact: The attacker may gain lateral movement inside a local service boundary, retain access after policy changes, or reach sensitive resources without leaving the usual open-call evidence that defenders expect to see.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
NIST SP 800-53 Rev 5, CIS Controls v8 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST SP 800-53 Rev 5 | AC-6 — Least Privilege | SCM_RIGHTS is often used to delegate only the needed handle. |
| IA-9 — Identification and Authentication (Non-Organizational Users) | Descriptor brokers and service-to-service handoff depend on trusted process-to-process access. | |
| AU-2 — Event Logging | Handle transfer events are security-relevant actions that support auditability. | |
| Recommendation — Limit each process to the minimum descriptors and resources it must handle. Authenticate and constrain service peers before allowing descriptor transfer. Log descriptor broker activity and review anomalous handle handoffs. | ||
| CIS Controls v8 | CIS-6 — Access Control Management | Descriptor passing creates delegated access paths that need explicit control. |
| Recommendation — Document and restrict which processes may send or receive sensitive descriptors. | ||
| NIST CSF 2.0 | PR.AA-05 — Least Privilege Access to Assets | Transferred descriptors should preserve only the access that is intentionally delegated. |
| Recommendation — Apply least privilege to the descriptors and resources that can cross process boundaries. | ||
Practitioner Guidance
Why practitioners should care: SCM_RIGHTS is safe only when the sender, receiver, and receiving policy are all tightly scoped. Treat the transfer boundary like an access-control decision, not a mere programming convenience.
What to watch for: Review which processes are allowed to open the Unix domain socket, which descriptors they can forward, and whether the receiving service validates descriptor type, origin, and expected use before acting on it.
Practitioner takeaway: Use descriptor passing to reduce privilege, but design it as a deliberate trust channel with explicit ownership, narrow scope, and clear auditability.
Related resources from NHI Mgmt Group
- When does just-in-time access make more sense than permanent admin rights?
- How should security teams separate access review visibility from decision rights?
- Why do conflicting access rights increase fraud risk more than broad access alone?
- How should security teams structure crisis decision rights before an incident happens?
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on November 16, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org