
Forensic analysis of CVE-2026-123158 (OpenSSH/musl auth bypass) with a Safe Rust immunity proof, hardened C99 reference implementation, and drop-in patch.
Forensic decompilation, architectural vulnerability analysis, and 100% Safe Rust (#![forbid(unsafe_code)]) formal verification proof for CVE-2026-123158 (colloquially dubbed "sshole" / *sshole), synthesized via the DecodeIQ CodeTruth Engine (AST-SLS Synaptic Topology).
On November 5, 2026, security researcher Özgün Kültekin disclosed a critical remote authentication bypass (CVE-2026-123158, CVSS 8.1) in OpenSSH (sshd) on Linux systems utilizing musl libc without PAM (most notably default installations of Alpine Linux 3.16 through edge).
The vulnerability allows remote, unauthenticated attackers to obtain unauthorized root or target account access on systems where the target account has password login disabled (designated by an asterisk * in /etc/shadow) simply by sending an oversized password between 257 and 1,024 bytes.
The bug originates from a lethal interaction between C99's lack of algebraic sum types, an in-band sentinel error convention in musl libc, and OpenSSH's user-enumeration defense logic:
[Attacker sends 300 'A's]
│
▼
[OpenSSH auth-passwd.c]
│
▼
[musl crypt() SHA-512] ──(Input > 256 bytes!)──► Returns "*" as error token string
│
▼
[OpenSSH evaluates]: return encrypted != NULL && strcmp(encrypted, pw_passwd) == 0;
│
▼
Target account in /etc/shadow: root:* ──► pw_passwd is "*"
│
▼
strcmp("*", "*") == 0 ──► TRUE! ACCESS GRANTED AS ROOT!
/* OpenSSH auth-passwd.c (Prior to commit 4353fdc / 10.6p2) */
return encrypted_password != NULL &&
strcmp(encrypted_password, pw_password) == 0;
In C, raw char* pointers conflate valid data with error states. musl libc signaled an out-of-band error via an in-band string literal *. Because Unix shadow files also use * to designate locked/disabled accounts, raw strcmp() evaluated them as identical.
In idiomatic, Safe Rust (#![forbid(unsafe_code)]), such a vulnerability is physically impossible to compile or execute:
enum ShadowState), not untyped strings:
pub enum ShadowState {
Disabled, // Stored as "*" in shadow
Locked, // Stored as "!..." in shadow
Empty, // Passwordless
Hashed(String), // Valid salt + hash
}
musl_crypt_safe returns Result<String, CryptError>. Errors can never masquerade as hash output.Disabled account rejects password authentication before any cryptographic hashing or string comparison takes place.All exploit vectors and edge cases are verified with 100% test passing and 0 warnings:
$ cargo test
running 5 tests
test tests::test_empty_password_handling ... ok
test tests::test_crypt_length_error_propagation ... ok
test tests::test_locked_account_with_exclamation_is_rejected ... ok
test tests::test_valid_user_authentication ... ok
test tests::test_exploit_cve_2026_123158_is_physically_impossible ... ok
test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
$ cargo clippy -- -D warnings
Finished dev profile [unoptimized + debuginfo] in 0.60s (0 warnings)
For legacy environments unable to migrate immediately to Safe Rust, a fail-closed hardened C99 implementation and diff patch are provided in c/:
c/auth_passwd_hardened.c: Defensive wrapper with fail-closed sentinel checks and timingsafe_bcmp().c/sshole_c99_patch.diff: Minimal drop-in patch for OpenSSH auth-passwd.c.Synthesized by CobolIQ / DecodeIQ Research Labs.
Cheers from Poland :) Cobol.iQ IT Team 🦀🛡️
Licensed under the Apache License, Version 2.0.