Skip to content

feat(vmm): support secure netd socket activation - #1069

Open
kvinwang wants to merge 1 commit into
nextfrom
codex/netd-socket-activation
Open

feat(vmm): support secure netd socket activation#1069
kvinwang wants to merge 1 commit into
nextfrom
codex/netd-socket-activation

Conversation

@kvinwang

Copy link
Copy Markdown
Collaborator

Summary

  • change self-bound netd sockets from world-writable to configurable socket_mode = 0o660
  • accept exactly one systemd-activated Unix stream listener through LISTEN_FDS
  • retain standalone socket binding as a fallback and keep SO_PEERCRED UID authorization
  • document systemd socket/service units and the ownership boundary

The default is defined in vmm.toml; the Rust field does not add a second serde default.

Behavior

  • standalone: netd binds [netd].socket and applies [netd].socket_mode
  • socket activated: systemd owns socket mode/user/group and netd consumes fd 0
  • zero activated descriptors falls back to standalone mode
  • multiple descriptors or a non-Unix-stream descriptor fail closed

Testing

  • cargo fmt --all -- --check
  • cargo test -p dstack-vmm --no-fail-fast (124 passed)
  • cargo clippy -p dstack-vmm --all-targets -- -D warnings

Copilot AI lite review requested due to automatic review settings August 18, 2026 03:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants