You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(sidecar): resolve handoff control files without following symlinks (#69)
* fix(sidecar): resolve handoff control files without following symlinks
The per-volume handoff dir is writable by the sidecar UID (65534) so the sidecar can drop ready/error markers. A workload able to act as that UID could replace a control file (token/args/error) with a symlink; the privileged hostPID node plugin would then follow it (e.g. to /proc/1/root/<host-path>) during republish, giving host-side file create/truncate/chown and blind host reads. .volumes/ and <hash> are root-owned and cannot be swapped, so resolving each control file relative to a dirfd via openat2(RESOLVE_NO_SYMLINKS|RESOLVE_BENEATH) with fchown over the fd makes a planted symlink or magic-link fail (ELOOP) instead of escaping to the host. No handoff-protocol change.
* test(webhook): add explicit return after t.Fatalf to satisfy staticcheck
golangci-lint (pinned to 'latest', now v2.12.2) reports SA5011 on the sc.Env deref after the 'if sc == nil { t.Fatalf }' guard because it does not model t.Fatalf as terminating. Add an unreachable return to clear it. Pre-existing, unrelated to the handoff fix; bundled to unblock this PR.
* chore(helm): default sidecar to hf-mount-fuse v0.9.1
v0.9.1 carries the repo-revision allowlist (huggingface/hf-mount#216). Bumps the chart default and the raw daemonset manifest from v0.7.2 so the CSI symlink fix ships paired with a sidecar that also rejects revision smuggling.
0 commit comments