You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Linux sandbox: support safe sandbox-local AF_UNIX sockets (e.g., sccache) #16910
changed the title [-]Sandbox hardening: safer default for host /tmp exposure in workspace-write[/-][+]Linux sandbox: support safe sandbox-local AF_UNIX sockets (e.g., sccache)[/+]on Apr 6, 2026
Note that Landlock added support for pathname-based socket connection rules with LANDLOCK_ACCESS_FS_RESOLVE_UNIX in ABI 9 which I believe has been shipped as part of Linux kernel 7.1.x series so it's only a matter of time before it trickles down to codex itself.
I believe this also prevents the default dotnet restore from working as MSBuild uses multiple nodes by default that communicate through a socket it creates under /tmp..
Ran into this with CUDA on Linux (Codex 0.157.0, NVIDIA driver 580.173.02, network proxy enabled).
After exposing the NVIDIA devices inside the inner bwrap sandbox, CUDA initialization still failed. The trace showed it creating and binding an abstract Unix socket named cuda-uvmfd-.... Allowing Unix sockets with dangerously_allow_all_unix_sockets = true got initialization and a small device-memory allocation/copy test working.
So GPU access needs local IPC as well as device access. A pathname allowlist wouldn't cover this abstract socket. #45534 gives us a working workaround, but is there a way to allow this sandbox-local IPC without the broad Unix-socket grant? This also seems relevant to #3141.
Adding a Unity Licensing Client use case for scoped sandbox-local IPC. These observations were collected through agent-assisted diagnostics in dot's own managed Linux cloud computer on October 9, 2026, not a user-managed local Codex installation.
Environment and evidence boundaries
Debian 13, Linux 6.18.44, x86_64.
Installed Codex package metadata reports 0.159.2; this does not identify every component of the deployed managed-host build.
The visible launcher uses managed proxy-routed networking and the seccomp stage.
Both AF_UNIX cases fail with EPERM (errno 1) during socket creation, before any bind/connect path is supplied. AF_INET and AF_INET6 creation succeeds. A separate C probe reproduces the AF_UNIX failure. Loopback TCP, AF_UNIX socketpair, FIFOs and ordinary pipes also work.
Application impact
Direct Unity Licensing Client startup fails to create both its request and notification named-pipe servers. Sanitized stack sequence:
The client remained alive after these errors and was terminated by the diagnostic's 25-second timeout; this was not a spontaneous exit. Client --help and empty-profile --showEntitlements succeed.
Unity's documented UNITY_NO_AUTH_BROKER=1 compatibility option did not remove the separate licensing-layer failure. Fresh-profile authentication-status checks only showed "signed out"; they do not prove authenticated broker startup works. No login or activation was attempted in these diagnostics.
This behavior is consistent with the default restriction described in #45534 and the 0.159.2 ProxyRouted filter. The empty Unix-socket allowlist means this is not evidence of an ignored explicitly allowed host-socket path as in #39140.
Could this Unity licensing case be included in the scope of #16910? The need is a supported, narrowly scoped IPC mechanism for cooperating processes inside the same managed sandbox, retaining host-socket isolation and existing filesystem/network controls. If such a supported provision exists for dot's managed cloud computer, guidance would be appreciated; otherwise, clarifying the supported limitation would help. A blanket Unix-socket grant is broader than needed.
No credentials, account or conversation identifiers, private project data, full launcher command line, or proxy routing details are included in this report.
I hit the same restriction using sccache as a compiler wrapper in a sandbox that allows cache access but denies local IPC. I’ve opened a draft upstream sccache PR for an opt-in SCCACHE_IN_PROCESS=1 mode, which runs the compile pipeline directly in each wrapper process without contacting the daemon: mozilla/sccache#2955. The branch is rebroad/sccache pr/in-process-sandbox-cache.
The draft is a request for comments while I validate behavior across platforms. In-process mode keeps statistics process-local and disables distributed compilation.
Activity
[-]Sandbox hardening: avoid exposing host /tmp UNIX sockets via writable /tmp mount[/-][+]Sandbox hardening: safer default for host /tmp exposure in workspace-write[/+][-]Sandbox hardening: safer default for host /tmp exposure in workspace-write[/-][+]Linux sandbox: support safe sandbox-local AF_UNIX sockets (e.g., sccache)[/+]futile commentedon Apr 14, 2026
Same issue, can't use
sccacheinside the sandbox, even when adding the cache directory as a writeable root.I shared my log through
/feedback:thread ID 019d8e32-b97c-7da1-ad24-6126b874a132marmeladema commentedon Jul 31, 2026
I was annoyed by this problem too so I took the liberty to implement a file based IPC layer for sccache: https://github.com/marmeladema/sccache/tree/feature/fifo-ipc
In order to use it you need to manually start the server outside of the sandbox like the following:
Then configure codex to allow sccache cache directory as writable:
Note that Landlock added support for pathname-based socket connection rules with
LANDLOCK_ACCESS_FS_RESOLVE_UNIXin ABI 9 which I believe has been shipped as part of Linux kernel 7.1.x series so it's only a matter of time before it trickles down to codex itself.ProTip commentedon Sep 7, 2026
I believe this also prevents the default
dotnet restorefrom working as MSBuild uses multiple nodes by default that communicate through a socket it creates under/tmp..diogovalada commentedon Sep 27, 2026
Ran into this with CUDA on Linux (Codex 0.157.0, NVIDIA driver 580.173.02, network proxy enabled).
After exposing the NVIDIA devices inside the inner bwrap sandbox, CUDA initialization still failed. The trace showed it creating and binding an abstract Unix socket named
cuda-uvmfd-.... Allowing Unix sockets withdangerously_allow_all_unix_sockets = truegot initialization and a small device-memory allocation/copy test working.So GPU access needs local IPC as well as device access. A pathname allowlist wouldn't cover this abstract socket. #45534 gives us a working workaround, but is there a way to allow this sandbox-local IPC without the broad Unix-socket grant? This also seems relevant to #3141.
Liskarm commentedon Oct 9, 2026
Adding a Unity Licensing Client use case for scoped sandbox-local IPC. These observations were collected through agent-assisted diagnostics in dot's own managed Linux cloud computer on October 9, 2026, not a user-managed local Codex installation.
Environment and evidence boundaries
allowLocalBinding=true,allowUnixSockets=[],dangerouslyAllowAllUnixSockets=false.Minimal reproduction inside the managed shell
Both AF_UNIX cases fail with EPERM (errno 1) during socket creation, before any bind/connect path is supplied. AF_INET and AF_INET6 creation succeeds. A separate C probe reproduces the AF_UNIX failure. Loopback TCP, AF_UNIX socketpair, FIFOs and ordinary pipes also work.
Application impact
Direct Unity Licensing Client startup fails to create both its request and notification named-pipe servers. Sanitized stack sequence:
The client remained alive after these errors and was terminated by the diagnostic's 25-second timeout; this was not a spontaneous exit. Client
--helpand empty-profile--showEntitlementssucceed.Unity's documented
UNITY_NO_AUTH_BROKER=1compatibility option did not remove the separate licensing-layer failure. Fresh-profile authentication-status checks only showed "signed out"; they do not prove authenticated broker startup works. No login or activation was attempted in these diagnostics.This behavior is consistent with the default restriction described in #45534 and the 0.159.2 ProxyRouted filter. The empty Unix-socket allowlist means this is not evidence of an ignored explicitly allowed host-socket path as in #39140.
Could this Unity licensing case be included in the scope of #16910? The need is a supported, narrowly scoped IPC mechanism for cooperating processes inside the same managed sandbox, retaining host-socket isolation and existing filesystem/network controls. If such a supported provision exists for dot's managed cloud computer, guidance would be appreciated; otherwise, clarifying the supported limitation would help. A blanket Unix-socket grant is broader than needed.
No credentials, account or conversation identifiers, private project data, full launcher command line, or proxy routing details are included in this report.
utkarshgupta137 commentedon Oct 9, 2026
The following worked for me:
rebroad commentedon Oct 26, 2026
I hit the same restriction using sccache as a compiler wrapper in a sandbox that allows cache access but denies local IPC. I’ve opened a draft upstream sccache PR for an opt-in
SCCACHE_IN_PROCESS=1mode, which runs the compile pipeline directly in each wrapper process without contacting the daemon: mozilla/sccache#2955. The branch is rebroad/sccachepr/in-process-sandbox-cache.The draft is a request for comments while I validate behavior across platforms. In-process mode keeps statistics process-local and disables distributed compilation.