1.0.4 — VM runtime + cloud-init paths per-user (closes path-leak track)#193
Open
click0 wants to merge 1 commit into
Open
1.0.4 — VM runtime + cloud-init paths per-user (closes path-leak track)#193click0 wants to merge 1 commit into
click0 wants to merge 1 commit into
Conversation
lib/vm_run.cpp gains a vmBaseDir() helper using the same lazy- resolve pattern as stack.cpp (1.0.3). configureVmDns() and the cloud-init user-data writer now place their state under /var/run/crate/<uid>/ when the privops socket is detected. VM track is #ifdef HAVE_LIBVIRT-gated; non-libvirt builds unaffected. Wire/format/signatures unchanged. Suite stays at 1303.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
lib/vm_run.cppgains avmBaseDir()helper — same lazy-resolve pattern asstack.cpp(1.0.3),spec_registry.cpp(1.0.2),network_lease6.cpp(1.0.1),network_lease.cpp(0.9.27). Two sites routed through it:configureVmDns()— DNS share dir tree (vm/<vmName>/dns/)user-data-9p-<pid>.yamlBehaviour
crated)/var/run/crate/vm/<vmName>/dns//var/run/crate/cloud-init//var/run/crate/<uid>/vm/<vmName>/dns//var/run/crate/<uid>/cloud-init/Why
Two operators on a rootless host with the VM track enabled previously clobbered each other's resolv.conf 9p-share AND raced on cloud-init user-data files (the PID suffix gave a probabilistic but not deterministic guarantee against collision — fork() can reuse PIDs).
VM track is
#ifdef HAVE_LIBVIRT-gated; non-libvirt builds unaffected.Path-leak track complete
This release closes the per-user path-leak track from the pre-1.0.0 audit:
network_lease.cpp(IPv4 leases)network_lease6.cpp(IPv6 leases)spec_registry.cpp+lifecycle.cpprestartstack.cppDNS dirsvm_run.cppVM + cloud-init (this PR)Remaining 1.x work (different shapes, not path leaks):
lib/run_net.cpp:446directifconfig -vnet(should useSetIfaceUpprivops verb)lib/run.cppcalls into pfctl ops directly; needs to route throughAddPfRuleprivops (1.1.0)Wire / API compatibility
None. Internal-only change. Suite stays at 1303.
Test plan
/var/run/crate/<uid>/vm/<vmName>/dns/resolv.confexist separatelyGenerated by Claude Code