Skip to content

feat(core): block host keyring and IPC access in private commands - #406

Merged
lg2m merged 1 commit into
feat/auto-resource-boundaryfrom
feat/auto-kernel-isolation
Oct 22, 2026
Merged

lg2m merged 1 commit into
feat/auto-resource-boundaryfrom
feat/auto-kernel-isolation

Conversation

@lg2m

@lg2m lg2m commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

Private filesystem commands could still read host kernel keyrings and System V shared memory. A native regression reproduced both leaks using synthetic secrets. Give private commands a new IPC namespace, mount only its message queues, and install an inherited seccomp filter before executing the payload. Refuse host message-queue mounts, including read-only grants.

The filter blocks direct keyring calls, BPF/io_uring bypass paths, filesystem-key ioctls and nonstandard socket families including kernel crypto. Ordinary Unix/IP/netlink sockets remain subject to the existing network policy; descriptor/terminal operations and file cloning remain available. x32 calls are refused and other ABI mismatches terminate the payload. One Linux-only dependency, seccompiler 0.5 with default features disabled; its only dependency is the already-used libc.

Verified on native Linux x86_64: the regression failed before the fix; 65 focused core tests and 41 worker/process tests pass. New tests cover shell/exec secret denial, private shared memory/message queues, ordinary ioctls, key/crypto/indirect syscall denial, x32 and 32-bit compatibility attempts, and host-mount refusal. The explicit delegated resource fixture also passes memory OOM, task limits, cancellation and cleanup with this guard enabled. Formatting, lint and Clippy pass. Full platform checks run in CI per the requested workflow.

Fifth layer after #405. Auto still selects host authority. Kernel crypto, BPF/io_uring and unlisted ioctls are intentionally unavailable to private commands. File/environment credentials, authenticated-operation brokering, hardlink isolation, shared task/server budgets, disk limits and macOS/Windows containment remain before Auto enablement. No comparative performance claim.

@lg2m lg2m added the ci:full label Oct 21, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T23:32:59.157604Z 6a1b1ab Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@lg2m
lg2m added this pull request to stack #403 October 21, 2026 23:08
@lg2m

lg2m commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 6a1b1ab8bb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@lg2m
lg2m merged commit 13cc3d0 into main Oct 22, 2026
13 of 18 checks passed
@lg2m
lg2m deleted the feat/auto-kernel-isolation branch October 22, 2026 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant