Skip to content

Honor explicit Unix socket grants in the Linux managed sandbox - #45534

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/2695b945ad3e59fcb3faf7662d852a26650af16c
Sep 14, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/2695b945ad3e59fcb3faf7662d852a26650af16c

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Honor explicit Unix socket grants in the Linux managed sandbox

Why

Linux proxy-routed sandboxing denied standalone Unix sockets even when the effective network policy enabled dangerously_allow_all_unix_sockets.

What changed

  • Carry Unix socket permissions in ManagedNetworkSandboxContext and pass the prepared context through Linux sandbox launches with --managed-network.
  • Allow AF_UNIX socket creation in proxy-routed mode when dangerously_allow_all_unix_sockets is enabled, while preserving network namespace isolation and restrictions on other socket families.
  • Keep standalone Unix sockets denied by default and for path-only grants. Default missing fields in older serialized contexts to restrictive values.

Testing

Add coverage for policy preparation and transport, legacy deserialization, and malformed policy rejection. Add a Linux integration test covering default denial, path-only denial, and explicit allow-all access, while checking that direct TCP access and AF_NETLINK/AF_VSOCK sockets remain blocked.

## Why

Linux proxy-routed sandboxing denied standalone Unix sockets even when the effective network policy enabled `dangerously_allow_all_unix_sockets`.

## What changed

- Carry Unix socket permissions in `ManagedNetworkSandboxContext` and pass the prepared context through Linux sandbox launches with `--managed-network`.
- Allow `AF_UNIX` socket creation in proxy-routed mode when `dangerously_allow_all_unix_sockets` is enabled, while preserving network namespace isolation and restrictions on other socket families.
- Keep standalone Unix sockets denied by default and for path-only grants. Default missing fields in older serialized contexts to restrictive values.

## Testing

Add coverage for policy preparation and transport, legacy deserialization, and malformed policy rejection. Add a Linux integration test covering default denial, path-only denial, and explicit allow-all access, while checking that direct TCP access and `AF_NETLINK`/`AF_VSOCK` sockets remain blocked.

GitOrigin-RevId: 2695b945ad3e59fcb3faf7662d852a26650af16c
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/2695b945ad3e59fcb3faf7662d852a26650af16c branch from 67637cf to 99914f4 Compare September 14, 2026 22:40
@copyberry
copyberry Bot merged commit 99914f4 into main Sep 14, 2026
1 check passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/2695b945ad3e59fcb3faf7662d852a26650af16c branch September 14, 2026 22:40
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant