ALEXKRI.NET
Resume Contact
← Back

Passwordless SSH accounts on Alpine accept any 257-byte password

Two reasonable decisions from 2012 just collided. musl’s crypt() returns "" when it fails, and it fails on passwords over 256 bytes. Alpine stores "" as the password field for passwordless accounts. So sshd compares "" to "", they match, and a 257-byte password logs you into a key-only root. Fix is OpenSSH 10.6p2, or PasswordAuthentication no right now 😅

Read the source ↗