A single asterisk broke SSH authentication on Alpine Linux
At 09:03 UTC on November 5, 2026, OpenSSH developer Damien Miller sent out an unusual release announcement. Portable OpenSSH 10.6p2 dropped the dry, understated tone that OpenBSD and OpenSSH advisories normally use. Miller told administrators running Linux systems built on the musl C library without Pluggable Authentication Modules (PAM) to stop reading and immediately set PasswordAuthentication=no, or shut their SSH daemons down entirely.
Only about twenty-four hours had passed since Özgün Kültekin of Wakefield reported the bug to the project on November 4. Kültekin called it *sshole (documented at sshhole.com), a nod to the single ASCII character at the center of the exploit: *, hex 0x2a.
On an affected machine, most commonly Alpine Linux running its default openssh-server package, or embedded targets built with OpenWrt, Buildroot, or Yocto, an unauthenticated remote attacker can open a plain TCP connection to port 22, target an account with no password set, send a password string between 257 and 1,024 bytes long, and land in an authenticated shell.
There’s no heap manipulation involved, no race condition to time, no memory corruption. It works on the first packet exchange because two unrelated layers of the Unix authentication stack happen to use the same symbol for different things: how /etc/shadow marks an account that has no password, and how musl’s crypt(3) signals that it failed to compute a SHA-256 or SHA-512 digest.
How /etc/shadow marks passwordless accounts
When an administrator creates an account meant only for SSH key authentication, or when a distribution ships a locked-down default account in a base cloud image, the second field in /etc/shadow has to hold something that no real password hash could ever produce. Unix systems settled on two common tokens for this: !, usually set by passwd -l or usermod -L to lock an account, and *, used by tools like BusyBox’s adduser -D and by provisioning scripts to mark an account where password login is disabled but other access (SSH keys, cron) still works.
On Alpine Linux base images from version 3.16 onward, root carries * in /etc/shadow. So does the default alpine user on official Alpine cloud images on AWS and Azure. Under normal conditions nothing you feed into crypt(const char *key, const char *salt) will hash to the literal string "*", because every standard Unix password hash is either a 13-character DES string or a modular crypt string starting with $id$.
Why crypt() returns an asterisk on failure
The failure happens because crypt(3) is an old C API from before structured error returns existed. Its signature returns a single char *. When it hits an unrecoverable error, an unrecognized hash prefix, a malformed salt, a key that breaks an algorithm’s rules, it has two options: return NULL, or return a pointer to a static dummy string guaranteed not to match any real hash.
Returning NULL used to crash a lot of 1980s and 1990s daemon code that fed the return value straight into strcmp(encrypted, pw->pw_passwd) without checking for a null pointer first. To stop those crashes, POSIX and X/Open specs let crypt() implementations return a static failure token instead, and across BSD, Solaris, libxcrypt, and musl that token is "*" (or "*0"/"*1" in some implementations, depending on the input salt).
On its own, returning "*" on error is only a problem if the caller compares it directly against a /etc/shadow entry that also happens to be "*". If you pass "*" as the salt to crypt(password, "*"), a well-behaved C library notices the setting string is already "*" and either returns NULL (glibc’s approach for decades) or flips the failure token to "*0" or "*1" (OpenBSD and modern libxcrypt), specifically so strcmp(crypt(pw, "*"), "*") can never evaluate to zero.
So why did musl’s crypt() return a bare "*" when authenticating an account whose shadow entry was "*"? Because sshd never passed "*" as the salt. Thanks to a timing-attack mitigation added to Portable OpenSSH ten years ago, sshd swaps the target user’s "*" shadow entry for a real $6$ or $5$ salt borrowed from a different account on the machine.
📬 Stay Ahead of Cyber Threats
Get the latest cybersecurity news, critical vulnerabilities, threat intelligence, tutorials, and exclusive giveaways delivered straight to your inbox. No spam. Unsubscribe anytime.
Tracing the bug through OpenSSH and musl’s source
To see how a 2016 timing defense and a 2012 denial-of-service limit in musl combined into a 2026 authentication bypass, it helps to trace the exact code path sshd takes when UsePAM is off (UsePAM no, or a build compiled without --with-pam).
When a client sends an SSH2_MSG_USERAUTH_REQUEST packet using the “password” method, sshd processes it in auth2-passwd.c and hands the plaintext password to auth_password() in auth-passwd.c. The first thing that function does is enforce a hard length cap:
c
MAX_PASSWORD_LENintauth_password(struct ssh *ssh, const char *password){ Authctxt *authctxt = ssh->authctxt; struct passwd *pw = authctxt->pw; int result, ok = authctxt->valid; if (strlen(password) > MAX_PASSWORD_LEN) return 0;
This check sets the upper bound on the exploit window. Any password of 1,025 bytes or more gets rejected before sshd ever touches the system’s authentication backend. If the password is 1,024 bytes or shorter, and the binary was built without PAM, auth_password() calls sys_auth_passwd(ssh, password).
In Portable OpenSSH’s auth-passwd.c, that function pulls the user’s password hash (from /etc/shadow via auth-shadow.c), hashes the supplied password through OpenSSH’s xcrypt() wrapper, and compares the two:
c
intsys_auth_passwd(struct ssh *ssh, const char *password){ Authctxt *authctxt = ssh->authctxt; struct passwd *pw = authctxt->pw; char *encrypted_password, *salt = NULL; /* Just use the supplied fake password if authctxt is invalid */ char *pw_password = authctxt->valid ? shadow_pw(pw) : pw->pw_passwd; if (pw_password == NULL) return 0; /* Check for empty password */ if (*pw_password == '\0' && *password == '\0') return 1; /* Encrypt the candidate password using the stored hash as salt */ salt = (pw_password[0] && pw_password[1]) ? pw_password : "xx"; encrypted_password = xcrypt(password, salt); /* * Authentication is accepted if the encrypted passwords * are identical. */ return encrypted_password != NULL && strcmp(encrypted_password, pw_password) == 0;}
Look at the ternary that sets salt: (pw_password[0] && pw_password[1]) ? pw_password : "xx". When the target’s shadow field is "*", pw_password[0] is '*' and pw_password[1] is '\0'. Since the string is only one character long, pw_password[1] is false, so sys_auth_passwd() falls back to the dummy salt "xx" and calls xcrypt(password, "xx").
If xcrypt() simply handed "xx" to musl’s crypt(password, "xx"), musl would run its legacy 56-bit DES routine, which truncates at 8 characters and returns a 13-character hash starting with "xx". That would never match "*", and the login would fail the way it’s supposed to.
But in July 2016, while fixing CVE-2016-6210 (a timing side-channel that let attackers distinguish valid users with $6$ hashes from locked or invalid accounts by how fast the dummy "xx" salt resolved), the OpenSSH portable team added a helper called pick_salt() to openbsd-compat/xcrypt.c:
c
static const char *pick_salt(void){ struct passwd *pw; char *passwd; static char salt[32]; if (salt[0] != '\0') return salt; strlcpy(salt, "xx", sizeof(salt)); setpwent(); while ((pw = getpwent()) != NULL) { passwd = shadow_pw(pw); if (passwd[0] == '$' && passwd[1] != '\0') { strlcpy(salt, passwd, sizeof(salt)); break; } } endpwent(); return salt;}
Inside xcrypt(), before calling the system’s crypt(3), OpenSSH checks whether the incoming salt starts with $ (a modern hash like $5$, $6$, or $2b$). If it doesn’t, which is exactly the case whenever sys_auth_passwd() passes "xx" for a locked or passwordless account, xcrypt() calls pick_salt() instead. That function walks the local user database looking for the first account with a $-prefixed hash, copies its salt into a static buffer, and uses that as the salt for crypt().
This is why exploiting a passwordless account requires at least one other local account with a real $5$ or $6$ hash. If every account on the box has * or !, pick_salt() never finds a $ entry and falls back to "xx", which routes to DES and never errors on long passwords. And if the first $ hash pick_salt() finds is bcrypt ($2a$ or $2b$), musl’s blowfish backend just truncates input at 72 bytes silently. Only a $5$ or $6$ salt sends xcrypt() into __crypt_sha256 or __crypt_sha512.
Now look at what happens inside musl (src/crypt/crypt_r.c, crypt_sha256.c, crypt_sha512.c) when xcrypt() calls crypt(password, "$6$rounds=..."):
c
/* From musl src/crypt/crypt_r.c */char *__crypt_r(const char *key, const char *salt, struct crypt_data *data){ char *output = (char *)data; if (salt[0] == '$' && salt[1] && salt[2]) { if (salt[1] == '1' && salt[2] == '$') return __crypt_md5(key, salt, output); if (salt[1] == '2' && salt[3] == '$') return __crypt_blowfish(key, salt, output); if (salt[1] == '5' && salt[2] == '$') return __crypt_sha256(key, salt, output); if (salt[1] == '6' && salt[2] == '$') return __crypt_sha512(key, salt, output); } return __crypt_des(key, salt, output);}
__crypt_sha512() (and its SHA-256 counterpart) hand the actual computation off to sha512crypt() and run one validation check before returning. Both files define a constant added in August 2012 by Szabolcs Nagy and Rich Felker:
c
KEY_MAX SALT_MAX ROUNDS_DEFAULT ROUNDS_MIN ROUNDS_MAX
Drepper’s original SHA-crypt spec doesn’t cap password length. Musl added the cap because the algorithm’s inner loop runs thousands of rounds whose cost scales with both round count and key length, plus buffering overhead for the “P-bytes” sequence. To avoid unbounded allocations inside a libc function that needs to behave in low-memory environments, musl caps the input at 256 bytes using strnlen(key, KEY_MAX + 1):
c
klen = strnlen(key, KEY_MAX + 1);if (klen > KEY_MAX) return 0;
When klen > 256, meaning the SSH password is at least 257 bytes, sha512crypt() returns 0, and the outer wrapper converts that into musl’s documented failure string:
c
char *__crypt_sha512(const char *key, const char *setting, char *output){ static const char testkey[] = "Xy01@#\x01\x02\x80\x7f\xff\r\n\x81\t !"; static const char testsetting[] = "$6$rounds=1234$abc0123456789$"; static const char testhash[] = "..."; char testbuf[128]; char *p, *q; p = sha512crypt(key, setting, output); /* Self-test and error handling */ q = sha512crypt(testkey, testsetting, testbuf); if (!p || q != testbuf || memcmp(testbuf, testhash, sizeof testhash)) return "*"; return p;}
Put the whole chain together:
- The attacker connects as a user whose shadow field is
"*"and sends a 257-byte password. auth_password()checks the 1,024-byte limit, passes, and callssys_auth_passwd().sys_auth_passwd()sees the one-byte"*", substitutes"xx"as the salt, and callsxcrypt(password, "xx").xcrypt()sees"xx"doesn’t start with$, callspick_salt(), finds another account’s$6$hash, and calls musl’scrypt(password, "$6$...").__crypt_sha512()seesklen == 257 > KEY_MAX, aborts, and returns"*".xcrypt()checks forNULL(it isn’t one; it points to"*") and returns"*"as the encrypted password.sys_auth_passwd()runsstrcmp("*", "*") == 0and returns success.
Neither codebase broke its own rules in a way that unit tests would catch. Musl’s crypt_sha512.c even documents the behavior in its own comments: key length is limited, and on error it returns "*". A musl mailing list thread from December 2024 even discussed the 256-byte cutoff after someone noticed odd behavior feeding a 257-character password to BusyBox’s passwd, but nobody connected that to OpenSSH’s pick_salt() substitution at the time.
Why most distributions escaped this bug
Tracing the call graph also explains the sharp boundaries of who’s affected.
Accounts locked with !, !!, or !<hash> are safe. The chain through pick_salt() and __crypt_sha512() still runs the same way, and musl still returns "*", but the final comparison becomes strcmp("*", "!"), which fails. OpenSSH’s allowed_user() function in auth.c also checks for a leading ! and rejects the account before password verification even starts. Only an exact single-character "*" shadow entry matches.
Systems on glibc, or distributions linking against libxcrypt (Debian, Ubuntu, Fedora, Arch, RHEL), aren’t affected even with UsePAM no set. Neither glibc nor libxcrypt enforces musl’s 256-byte cap; they’ll hash a 257-byte or even 1,024-byte password into a full digest. If you force a failure, glibc historically returns NULL, which xcrypt() catches and treats as a failed login. libxcrypt’s failure tokens are "*0" or "*1", two bytes, which never match a one-byte "*" shadow entry.
Enabling PAM also avoids the bug, even on musl systems like Alpine running openssh-server-pam. With PAM active, sshd skips sys_auth_passwd() and xcrypt.c entirely and hands authentication to the PAM stack, which reads the real shadow entry without running pick_salt()’s substitution. But installing the PAM package alone isn’t enough: if UsePAM no is still set in sshd_config, which is the upstream default unless a distribution patches it, sshd falls straight back into sys_auth_passwd().
OpenBSD itself never hits this path at all. It doesn’t use /etc/shadow, musl, or openbsd-compat/xcrypt.c. It uses BSD Auth and crypt_checkpass(3), where every valid hash in /etc/master.passwd is bcrypt, and crypt_checkpass() rejects * and other non-hash strings outright.
Who was actually exposed: Alpine servers, not containers
When *sshole hit Hacker News and security mailing lists, people quickly debated how many production machines actually meet all four conditions at once:
- sshd linked against musl, running without PAM.
PasswordAuthentication yesactive (the upstream default unless overridden).- At least one account with
*in/etc/shadow. - At least one other local account with a
$5$or$6$hash, sopick_salt()has something to grab.
It’s tempting to write off Alpine as “just a Docker base image nobody runs sshd on.” That’s largely true. Alpine maintainer Natanael Copa pointed out that containers without sshd, and default OpenWrt installs running Dropbear instead of OpenSSH, aren’t exposed. Copa and musl author Rich Felker both audited Dropbear’s source and confirmed it’s unaffected; OpenWrt users are only at risk if they swapped Dropbear for openssh-server.
The real exposure is bare-metal and virtualized Alpine hosts: lightweight KVM hypervisors, edge routers, bastion jump hosts, CI/CD runners, and industrial Yocto/Buildroot appliances. On a fresh Alpine install, when an administrator sets a password through setup-alpine, BusyBox writes a $6$ SHA-512 hash to /etc/shadow. That alone satisfies condition 4 for the lifetime of the sshd process. Condition 3 gets satisfied just as easily: any deployment account, Git runner user, or SSH-key-only account created with adduser -D gets * in its shadow field. On Alpine images since 3.16, root itself ships with * by default.
Official Alpine cloud images (versions 3.18.11 through 3.24.3) on AWS and Azure provision a default alpine user with SSH keys, * in shadow for both root and alpine, and passwordless doas escalation to root. As long as nobody on the instance has ever set a password, there’s no $5$/$6$ hash anywhere, pick_salt() falls back to "xx", and the box is safe by accident. The moment someone runs passwd on any account, say, to set up a recovery console password, a $6$ hash lands in shadow and pick_salt() starts using it. From then on, anyone can run:
bash
ssh alpine@target-host# When prompted for password, paste 257 'A' characters:# AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA... (257 bytes)
sshd hashes the 257 bytes against the $6$ salt, gets "*" back, matches it against the alpine user’s shadow entry, drops the attacker straight into /home/alpine, who then runs doas su - to become root. It takes one TCP connection, leaves a completely ordinary Accepted password for alpine line in /var/log/messages, and defeats every assumption behind a “key-only” account. Directory-backed users resolved through musl-nscd or LDAP are just as exposed if their shadow representation comes back as *.
The patch, and a disagreement over whose bug it is
Who owns a bug that only exists in the gap between two components? OpenSSH’s 10.6p2 release notes put it plainly: the project considers the root cause to sit outside sshd, but exploitable through it. Musl maintainer Rich Felker disagreed, arguing that crypt(3) returning "*" on invalid input has been documented behavior across Unix implementations for well over a decade, and that comparing the result against an unvalidated shadow field, without checking whether that field is actually a hash rather than the "*" sentinel, is a logic error in sshd itself.
Both arguments hold up. Musl can’t produce a valid hash when a caller exceeds KEY_MAX, and "*" is the POSIX-sanctioned non-null error token. __crypt_sha512() has no way of knowing sshd passed it a real $6$ salt while planning to compare the result against "*". From OpenSSH’s side, crypt() was handed a syntactically valid salt pulled from a real account, and failing because the input was 257 characters instead of 256 is a quirk specific to musl’s implementation.
Rather than settle the philosophical question, OpenSSH shipped a direct fix in 10.6p2. In the password verification path, sshd now refuses to treat a stored hash as eligible for comparison if it’s shorter than 4 characters. The shortest legitimate hash is a 13-character DES string, and modern hashes run from 50 to well over 120 characters, so nothing valid is ever shorter than 4 bytes. One- and two-character sentinels like "*", "!", "!!", "*0", "*1", and "x" are now rejected before comparison, regardless of what a given libc’s crypt() returns on error.
Alpine backported the fix across every active and legacy branch back to 3.16 (originally released May 2022): 10.6_p2-r0 on Edge, 10.3_p1-r2 on 3.24 (point release 3.24.4), 10.2_p1-r1 on 3.23 (3.23.8), 10.0_p1-r11 on 3.22 (3.22.8), 9.9_p2-r1 on 3.21 (3.21.10), and 9.7_p1-r6 on 3.20, with additional commits to the 3.16 through 3.19 branches.
Why OpenSSH scrapped its usual two-week embargo
Critical OpenSSH flaws have traditionally followed a set pattern: validate the report, write a patch quietly, request a CVE, and send it to the linux-distros mailing list under a seven-to-fourteen-day embargo so Debian, Red Hat, Ubuntu, SUSE, and Alpine can all stage patched packages at once.
That didn’t happen here. Kültekin reported the bug on November 4, and Miller pushed 10.6p2 to public mirrors on November 5, before a CVE number was even assigned. Miller explained the shift directly in the release notes:
“We have seen a number of cases where a security bug identified by AI tools is subsequently independently discovered by a different researcher. This suggests that adversaries who do not report bugs to OSS projects are likely to be able to discover these bugs too. Given this, the OpenSSH team will, for now, be making more frequent releases to get bugfixes into users’ hands more quickly rather than batching them until the next planned release.”
Miller added that the team had seen multiple cases of autonomous AI agents independently rediscovering the same bug, sometimes within hours, and that long embargo periods primarily benefit attackers.
Coordinated disclosure has worked for twenty-five years on an assumption: an embargo only protects users if the odds of an independent attacker finding the same bug during the embargo window stay close to zero. When bug hunting relied on human code review or unguided fuzzing, the gap between independent discoveries of a subtle cross-component bug was usually measured in months or years, so a ten- or fourteen-day embargo was a clear net win for defenders.
In 2026, large language models and agentic code-auditing pipelines have changed that math. The OpenSSH team acknowledged that a lot of raw AI-generated bug reports don’t hold up without human triage, but the capable end of AI-assisted vulnerability research is sweeping through open-source C codebases and finding the same bugs within hours or days of each other. Once a fix is being discussed or tested across dozens of downstream packagers during a two-week embargo, a metadata leak, or simply multiple offensive teams running the same frontier models against the same codebase, hands attackers up to two weeks of unpatched exposure while defenders sit on a ready patch.
Cutting the turnaround to roughly 24 hours and shipping frequent, unbatched point releases has two immediate consequences for anyone running production infrastructure. First, vulnerability scanners that rely purely on NVD CVE feeds (Qualys, Nessus, Trivy, Grype, Amazon Inspector) will show nothing during the most critical hours of a rollout, since 10.6p2 shipped before a CVE number existed. Second, monthly patch windows don’t work in a world where upstream projects ship emergency releases the day after a bug is found. Teams running musl-based appliances or bastion hosts need to be able to deploy updates within hours of an advisory, not weeks.
What else shipped in 10.6p2
Because 10.6p2 was cut directly from the stable branch to rush out the *sshole fix, it also carries several cryptographic and stability updates that had been queued up, along with two deprecation notices.
Hybrid post-quantum CA signatures. The release enables ssh-mldsa44-ed25519 as an allowed Certificate Authority signature algorithm in both ssh(1) and sshd(8). OpenSSH has defaulted to post-quantum hybrid key exchange for session confidentiality for several releases now, but authentication signatures, the keys that prove host and user identity, had stayed classical. ssh-mldsa44-ed25519 pairs NIST’s ML-DSA-44 (FIPS 204, derived from CRYSTALS-Dilithium) with Ed25519: both signatures have to validate for the overall signature to pass. Organizations using SSH certificates can now sign user and host certificates with a hybrid post-quantum CA key, protecting the root of trust in large SSH PKI deployments against future quantum forgery without giving up Ed25519’s track record.
CPU spin and seccomp fixes. The release also fixes a bug where configuring ChannelTimeout could trigger a brief but 100%-CPU spin loop while polling channel inactivity timers. It’s a sub-second event, but on high-concurrency jump hosts handling thousands of multiplexed channels, repeated spins waste cycles and add latency. On the seccomp side, sshd(8) now explicitly permits restart_syscall(2) inside its pre-authentication sandbox filter, fixing cases where the kernel’s automatic restart of an interrupted syscall (after a SIGCHLD or SIGALRM) could get the sandboxed child killed by SIGSYS. Other portability fixes repair builds on legacy targets defining SKIP_PRIVDROP, fix ssh-agent socket creation on systems without openat(2), correct signal handling when SIGINT or SIGQUIT arrives mid-passphrase, and fix Azerbaijani locale handling where the dotless-i case conversion breaks naive ASCII tolower()/toupper() logic.
Deprecations. scp -R, which copies files between two remote hosts by logging into the origin and running scp directly on it, is being phased out. It requires forwarding or storing credentials remotely, and constructs shell commands subject to the remote shell’s quoting rules, which can mean command injection on shells with nonstandard quoting (csh, fish, restricted shells). Since OpenSSH 9.0 moved scp to SFTP by default, remote-to-remote transfers already route safely through the local client. Passing -R now prints a deprecation warning; it’ll eventually be ignored entirely. Separately, sshd(8) will drop support for ancient platforms that lack both file-descriptor passing over AF_UNIX sockets and unprivileged PTY allocation, specifically SCO OpenServer 5 and QNX 6, since maintaining those fallback paths adds unnecessary complexity to privilege-separation code that’s security-critical.
How to check if your servers are exposed
If you run Alpine, another musl-based distribution (Void Linux musl, Gentoo musl, Sabotage, Adelie), or embedded Linux with OpenSSH instead of Dropbear, don’t wait on a CVE scanner. Check the host directly.
Step 1: Check exposure without touching sshd
You can confirm whether a host meets all four conditions by checking the linked C library, the running sshd configuration, and the shape of /etc/shadow:
bash
# 1. Verify if sshd is linked against musl libc and check PAM linkageldd $(command -v sshd) | grep -E 'musl|libpam'# 2. Check the effective runtime configuration of sshd for PasswordAuthentication and UsePAM# (Note: Always use sshd -T rather than grepping sshd_config, as Match blocks or defaults apply)sshd -T | grep -E '^(passwordauthentication|usepam|permitrootlogin)'# 3. Check /etc/shadow for (a) accounts with '*' as the password field, and (b) accounts with $5$ or $6$ hashesawk -F: ' $2 == "*" { star_users = star_users " " $1 } $2 ~ /^\$(5|6)\$/ { sha_hashes++ } END { print "Accounts with literal * in /etc/shadow:" (star_users ? star_users : " NONE"); print "Accounts with $5$ or $6$ SHA-crypt hashes: " sha_hashes; if (star_users != "" && sha_hashes > 0) print "STATUS: SHADOW CONDITIONS MET FOR *SSHOLE BYPASS"; else print "STATUS: SHADOW CONDITIONS NOT MET"; }' /etc/shadow
If ldd shows musl, sshd -T reports passwordauthentication yes and usepam no (or PAM isn’t compiled in at all), and the awk command finds both a * account and a $5$/$6$ hash, the server is exploitable by a single 257-byte password unless it’s already on 10.6p2 or a patched distribution build.
Step 2: Patch and apply immediate mitigations
On Alpine, update and restart sshd, since apk upgrade replaces the binary on disk but leaves the vulnerable running process in memory:
bash
apk update && apk upgrade opensshrc-service sshd restartapk info -v | grep openssh
Confirm your installed version meets or exceeds the fixed release for your branch: 10.6_p2-r0 for Edge, 10.3_p1-r2 for 3.24, 10.2_p1-r1 for 3.23, 10.0_p1-r11 for 3.22, 9.9_p2-r1 for 3.21, or 9.7_p1-r6 for 3.20.
If you can’t upgrade the binary right away, disable password authentication, check that no Match block further down sshd_config re-enables it for specific subnets or users, test key-based login in a separate session before closing your current one, and restart:
bash
echo "PasswordAuthentication no" > /etc/ssh/sshd_config.d/00-disable-passwords.confsshd -t && rc-service sshd restartsshd -T | grep -i passwordauthentication
As an extra precaution on musl systems, converting a shadow entry from * to ! (usermod -p '!' username, or editing /etc/shadow through vipw -s) breaks the strcmp("*", pw_password) match. Note that on some non-PAM configurations, ! can lock the whole account, including SSH key login, unless PAM or explicit key handling allows it, so test key-based access in a separate session before you close your root shell.
Step 3: Look for signs of compromise
What makes this bug hard to catch after the fact is that a successful exploit doesn’t crash anything or flood logs with failed-password lines. Since any 257-to-1,024-byte string works on the first try, a successful break-in looks exactly like a normal password login in syslog, except for one detail: the account that logged in with a password didn’t have one set.
Run this against /var/log/messages (Alpine’s default syslog target) and /var/log/auth.log, including rotated .gz files, to cross-reference every Accepted password for <user> event against accounts currently holding * in /etc/shadow, and to check for follow-on privilege escalation:
bash
# Extract all users currently holding '*' in /etc/shadow and search syslog for password logins by those usersfor user in $(awk -F: '$2 == "*" {print $1}' /etc/shadow); do grep -E "sshd\[[0-9]+\]: Accepted password for ${user} from " /var/log/messages* /var/log/auth.log* 2>/dev/nulldone# Audit doas and sudo escalation logs and check for unauthorized persistence in authorized_keysgrep -E "(doas|sudo):" /var/log/messages* /var/log/auth.log* 2>/dev/nullfind /home /root -name "authorized_keys" -mtime -7 -ls 2>/dev/null
If you find even one Accepted password for entry for root, alpine, a service account (git, postgres, nginx, deploy), or any user with * in shadow, treat the host as compromised. Isolate it from the network, preserve disk and memory snapshots, rotate every SSH key, API token, and certificate stored on the instance, and rebuild from a patched image.
*sshole will likely end up as a standard teaching example in systems security courses: a 2012 denial-of-service cap in musl, a 1980s C error convention, a 1990s shadow-file placeholder, and a 2016 OpenSSH timing fix, each reasonable on its own, sat untouched for a decade until they combined into a full authentication bypass. And as AI agents keep shrinking the time it takes to connect those dots across unrelated codebases, from decades down to hours, the two-week security embargo looks like it’s done.







