Skip to content

Clear setgid when hardening Windows VM storage directories - #9414

Closed
Chessing234 wants to merge 1 commit into
omacom:quattrofrom
Chessing234:fix/windows-vm-clear-setgid-on-harden
Closed

Chessing234 wants to merge 1 commit into
omacom:quattrofrom
Chessing234:fix/windows-vm-clear-setgid-on-harden

Conversation

@Chessing234

Copy link
Copy Markdown
Contributor

Summary

  • chmod 0700 on a setgid directory leaves mode 2700, so the exact 700 privacy check failed and launch aborted.
  • Use chmod a-s,u=rwx,go= when hardening storage/shared leaves.

Test plan

  • Launch Windows VM from a setgid-inherited storage path
  • Existing windows-vm mount/compose privacy tests still pass

chmod 0700 on a setgid directory leaves mode 2700, so the exact 700
privacy check failed and launch aborted on inherited setgid paths.
@Chessing234

Copy link
Copy Markdown
Contributor Author

@dhh @ryanrhughes ready for review

@Chessing234

Copy link
Copy Markdown
Contributor Author

folded into #12264 for easier review.

@omarchybot

Copy link
Copy Markdown
Collaborator

Update: #12323 has merged into quattro. The merged fix explicitly clears setuid/setgid in both mount-source hardening paths, keeps the exact mode-700 boundary, adds a diagnostic, and covers this launch/install failure. This alternative is no longer needed for that bug.

Scope checked by GPT-6 in Codex and Codex Medium against the discussion and landed change; review independence is not guaranteed. No tests were rerun for this cleanup.

Omabot on behalf of DHH

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