Skip to content

fix(vm): harden compute driver socket#1248

Merged
drew merged 3 commits intomainfrom
vmm-sec-review
May 8, 2026
Merged

fix(vm): harden compute driver socket#1248
drew merged 3 commits intomainfrom
vmm-sec-review

Conversation

@drew
Copy link
Copy Markdown
Collaborator

@drew drew commented May 7, 2026

Summary

Harden the VM compute-driver management socket while keeping it state-local under the VM driver state directory. The socket now lives under a private run directory, validates ownership and symlink safety, restricts socket permissions, and verifies UDS peer credentials for gateway-spawned drivers.

Related Issue

N/A

Changes

  • Move the VM driver socket to <state-dir>/run/compute-driver.sock and create run/ with owner-only permissions.
  • Reject unsafe state/socket paths, including symlinks, wrong-owner directories, group/world-writable state dirs, and non-socket stale files.
  • Restrict the bound UDS to 0600 and require matching UID plus gateway PID for gateway-spawned driver clients.
  • Document the new socket location and note that standalone TCP mode remains local-development only.

Testing

  • mise run pre-commit passes
  • Unit tests added/updated
  • E2E tests added/updated (if applicable)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

@drew drew requested review from a team, derekwaynecarr, maxamillion and mrunalp as code owners May 7, 2026 20:24
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

TaylorMutch
TaylorMutch previously approved these changes May 7, 2026
@drew drew merged commit 8ab5ee8 into main May 8, 2026
23 checks passed
@drew drew deleted the vmm-sec-review branch May 8, 2026 03:03
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