r/AlpineLinux • u/SkyCompetitive148 • 27d ago
OpenSSH 10.6p2: Critical Password Bypass on Alpine/musl Linux

Here is what is actually going on under the hood with the new OpenSSH bypass on Alpine/musl systems:
- The Logic Bug: When an account has no password set (like key-only users or default cloud accounts), Linux stores an asterisk (
*) in/etc/shadowto block password logins. - The
muslQuirk: Whenmusl’scrypt()function receives an oversized password (over 256 bytes), it fails and returns a single*. - The Bypass: If an attacker sends a 257+ byte password to a passwordless account, OpenSSH checks the returned string against
/etc/shadow. Both are*—the string comparison matches, and SSH grants access without needing the actual key or password. Requirements to Reproduce:
- System runs on
musl libcwithout PAM (like Alpine Linux). PasswordAuthenticationis enabled.- There is an account with a disabled password (
*in shadow) and at least one other account with a standard password hash.
- System runs on
- The Fix in 10.6p2: OpenSSH now explicitly rejects stored hashes that are too short to be valid, stopping the
* == *match entirely.