A decade-old vulnerability nicknamed *sshole allows attackers to log into some Linux devices without a password, according to Ars Technica. The flaw lies in the interaction between OpenSSH and musl, a lightweight C library used by Alpine Linux, when OpenSSH runs with musl and does not use PAM.
Ars Technica reports that exploitation requires three conditions. The system must have at least one account with a password hashed using SHA256 or SHA512. That account must have a "*" in its password field in /etc/shadow, which makes it passwordless. Security firm Checkpoint said the account must also be active.
Alpine maintainers said an attacker who can reach an SSH port "can log in without knowing any password." They said it "takes one connection, works every time, and needs no retries." Ars Technica reports that the attacker gains access by entering more than 256 characters in the password field.
Checkpoint reported that root accounts are safe under the default PermitRootLogin setting, which prohibits password login for root. Accounts with doas or sudo rights can still become root, the firm said.
Ars Technica cites Detectify, which said Shodan lists around 22 million systems with SSH open on port 22. Only a fraction meet the exploitation conditions. The Docker Hub base image for Alpine has more than 1 billion downloads, according to the report.
OpenSSH said it considers the root cause to be outside sshd but exploitable through it, and it issued an update. Musl developer Rich Felker said he does not consider it a musl bug, but an erroneous use by the caller. He also said musl developers plan to change the mechanism in an upcoming release. Alpine has also issued an update.
The discoverer said OpenWRT is affected, though by default it uses Dropbear rather than OpenSSH. The discoverer also named buildroot and yocto, but Ars Technica reports that those claims are not yet confirmed. The report says there is no known CVE designation for the vulnerability.
Ars Technica advises users of Linux systems that combine musl and OpenSSH to check whether they are affected and to install both Alpine and OpenSSH patches on affected systems.