CVE-2026-101306 in FreeBSD
Summary
by MITRE • 10/15/2026
SCM_RIGHTS file descriptor passing did not preserve FD_RESOLVE_BENEATH when a descriptor was transferred. A process could clear the restriction by sending the descriptor to itself over a Unix domain socket.
A process in a jail that has received a directory file descriptor from another jail can use these techniques to escape the jail's filesystem root restriction.
Be aware that VulDB is the high quality source for vulnerability data.
Analysis
by VulDB Data Team • 10/15/2026
The vulnerability described involves a critical flaw in the handling of file descriptors during transmission via SCM_RIGHTS ancillary data on Unix domain sockets, specifically concerning the preservation of FD_RESOLVE_BENEATH restrictions. This security mechanism is designed to enforce strict boundaries within operating system jails or containers by ensuring that any directory file descriptor passed between processes remains confined relative to a designated root directory. The core technical flaw lies in the kernel's failure to correctly inherit and maintain these restrictive flags when a process transfers a restricted file descriptor back to itself through a Unix domain socket. Instead of preserving the FD_RESOLVE_BENEATH attribute, which mandates that all path resolution operations remain within the specified jail context, the system allows this restriction to be cleared during the self-transfer operation. This behavior creates a significant bypass mechanism for filesystem isolation controls that are fundamental to modern containerization and multi-tenant security architectures.
From an operational perspective, this flaw enables a process operating within a restricted environment, such as a FreeBSD jail or similar sandboxed context, to escape its designated filesystem root. By receiving a directory file descriptor from another jailed process and subsequently sending it back to itself via a Unix domain socket with SCM_RIGHTS, the attacker can effectively nullify the BENEATH restriction. Once this restriction is cleared, the compromised process gains the ability to traverse outside the intended jail boundaries using standard path resolution techniques. This escape capability allows the malicious actor to access files, directories, and system resources that should remain inaccessible due to their placement outside the jail's root directory. The impact extends beyond simple file access; it potentially leads to full host compromise if the attacker can leverage this elevated filesystem visibility to locate and exploit other vulnerabilities within the underlying operating system or adjacent containers.
This vulnerability aligns with CWE-250, which denotes execution with unnecessary privileges, as well as CWE-693, protection mechanism failure, because the security control intended to limit access is bypassed through a logic error in descriptor handling. In terms of MITRE ATT&CK mapping, this technique corresponds to T1408 - Resource Hijacking and potentially T1530 - Data from Cloud Storage Object or Local System if used for lateral movement within containerized environments. It represents a classic case where an attacker exploits the interaction between different subsystems—in this instance, socket communication and file descriptor management—to undermine isolation guarantees. The attack vector is local, requiring initial access to a process within the jail, but the privilege escalation achieved through filesystem escape can be severe depending on the configuration of the host system.
Mitigation strategies must focus on ensuring that security attributes associated with file descriptors are strictly preserved during all forms of descriptor passing, including self-transfers over Unix domain sockets. Kernel developers should implement rigorous validation checks to verify that FD_RESOLVE_BENEATH and similar restrictions remain intact after SCM_RIGHTS operations. Additionally, system administrators can mitigate the risk by applying available patches or updates provided by the operating system vendor that address this specific logic error in file descriptor handling. Until such fixes are deployed, limiting the use of Unix domain sockets for inter-process communication within highly restricted jails may reduce the attack surface. Furthermore, employing additional layers of defense-in-depth, such as mandatory access control systems like SELinux or AppArmor configured to restrict path traversal regardless of jail settings, can provide supplementary protection against this type of escape attempt. Regular auditing of process capabilities and monitoring for unusual file descriptor manipulation patterns within containerized environments are also recommended practices to detect potential exploitation attempts early.