sshole

A newly revealed SSH vulnerability, branded “sshole,” allows passwordless accounts on systems using musl libc and OpenSSH (without PAM) to accept any 256–1024‑character password, effectively turning disabled logins into backdoors under specific but common configurations (e.g., some Alpine and embedded setups). The flaw arises from a chain of design choices: musl’s crypt() returning "*" instead of NULL on error, OpenSSH’s timing-attack mitigations that reuse another user’s hash, and long‑standing in‑band error signalling conventions in C. Commenters debate how widespread the real-world exposure is, criticize musl’s compatibility hacks and C’s error-handling model, note that OpenSSH has already shipped mitigations, and highlight that the bug was found with AI-assisted code analysis, reinforcing both the promise and the unease around AI in security work.

Scope of the vulnerability & affected setups

  • Bug requires a specific stack: OpenSSH sshd built against musl, without PAM, with PasswordAuthentication enabled, and at least:
    • One account whose password field in /etc/shadow is * (or similar “no password” marker).
    • One other account with a real SHA-256/512 ($5$/$6$) hash.
  • Alpine Linux (musl-based) without PAM is highlighted as a main at-risk platform; especially cloud images that ship a passwordless user with password auth on.
  • Many argue there are “few” such systems in practice (most Alpine use is containers without sshd); others counter that even a small percentage of a huge Alpine/embedded base is a large absolute number.
  • Some confusion about mitigation: one commenter incorrectly claims it works even with password auth disabled; multiple others state clearly that disabling password auth stops this bug because it’s purely about password hashing.

How the bug arises (musl, OpenSSH, C design issues)

  • musl’s crypt() returns "*" on error instead of NULL, to avoid crashes in code that never checked for NULL despite the POSIX spec.
  • OpenSSH added timing-attack mitigations that, for accounts with */! hashes, reuse another user’s real hash as a fake salt while still comparing against the original * entry.
  • With very long passwords, musl’s SHA-2 crypt path errors and returns "*"; under these conditions the fake hash and the stored * compare equal and password auth is bypassed.
  • Long subthreads debate blame:
    • musl criticized for deviating from spec and reusing *.
    • OpenSSH criticized for convoluted logic and depending on undocumented crypt() behavior.
    • Many argue the real root is C’s weak error-handling model and in-band signaling (magic strings, NULL, sentinel values) instead of structured result types.

Reproduction, patches, and practical notes

  • Multiple users attempt repro on Alpine; discover that even EOL releases were patched quickly, so older OpenSSH builds or manual downgrades are needed to see it.
  • Mitigations discussed:
    • Upgrade OpenSSH packages (Alpine has shipped fixed versions across supported lines).
    • Or set PasswordAuthentication no and/or use PAM-based OpenSSH.
    • Check configs with sshd -T and logs for suspicious “Accepted password” entries for * accounts.
  • Embedded systems (OpenWrt, routers, appliances) mostly use Dropbear or glibc/uClibc; many appear unaffected, but edge cases remain a concern.

AI involvement and reaction to the write-up

  • The author says a swarm of AI agents found the bug; many see this as validation of AI-assisted security research (good at “footguns” and semi-obvious logic bugs).
  • Others complain about “AI slop” style: low information density, theatrical scroll-jacked site, casual lowercase tone, and suspected LLM phrasing.
  • Some argue constant “was this AI?” policing is unproductive noise; others still strongly prefer concise, text-only advisories.

Broader lessons & meta-discussion

  • Many call this a textbook case against:
    • In-band error signaling and magic strings like "*" for both “no password” and “hash error”.
    • Silent compatibility hacks that mask bugs instead of failing loudly.
  • Long debate over whether C (lack of sum types, enforced error handling, etc.) is fundamentally unsuitable for modern security-sensitive APIs; Rust/Go-style Result types are frequently cited as safer patterns.
  • Several reiterate that on Internet-facing systems, password auth for SSH should already be disabled and access gated via keys or VPN (WireGuard, SSM, etc.), though some push back that strong passwords can be acceptable in constrained environments.