Replies: 2 comments
|
@ogulcancelik my apologies in tagging you in this thread, but I really would like to discuss some security issues which I found analyzing the project and that restricting me to keep using it in my enterprise life due to security compliance. I wouldn't like to break the trust you gave me as a contributor and starting spamming PRs, so that's why I started this thread. I'm always up to contributing to herdr to make more people able to use it. |
|
Adding a data point from the enterprise-adoption side, since this is still open at 0.8.0. Both items are unchanged in
Another issue worht mentioning is that the optional-checksum path isn't hypothetical on stable: Separately, and maybe the bigger adoption blocker: the release binaries aren't code-signed. On the 0.8.0 macOS build, Cheapest wins first, if useful:
|
Uh oh!
There was an error while loading. Please reload this page.
Two trust boundaries in
masterare currently open: the auto-updater installs binaries it never cryptographically verifies, and the local control socket accepts any peer that can reach it. Either one is a code-execution path — supply-chain for the first, local privilege for the second.Details below. I'm happy to implement the fixes if the direction is approved.
1. Auto-update has no cryptographic trust in the downloaded binary (
src/update.rs)The updater's only integrity guarantee is TLS to herdr.dev, and it can be bypassed:
sha256: Option<String>) — if a manifest entry omits it, the binary installs with no content check at all (CWE-494).curl -sfL, sohttp://is accepted andhttps://can be redirect-downgraded (CWE-494).Together these turn an origin/CDN compromise, a mis-issued TLS cert, or a network MITM into code execution on next launch. Direction I'd propose: sign artifacts with an offline key + verify before install, make the integrity check mandatory, and pin the transport to HTTPS with no downgrade.
2. Local control socket has no peer authentication (
src/ipc.rs,src/api/server.rs)Access control is filesystem-only (
chmod 0o600applied afterbind, leaving a race window), with noSO_PEERCRED/getpeereidcheck, and no ACL on the Windows named pipe. On a shared host another local account can reach the full API (keystroke injection into agent panes, process spawn, server stop). Direction I'd propose: peer-UID assertion on accept + tighten the bind so the socket is never briefly world-accessible, and a per-user SID ACL on Windows.I have file/line-level notes and suggested fixes ready. If either direction sounds right, let me know how you'd like to proceed (convert to issue, private disclosure, etc.) and I'll pick it up.
Environment
All reactions