# An OpenSSH bug that took 46 years to ripen. Source: https://x.com/officer_secret/status/2119269219388755979 Kiwi News: https://news.kiwistand.com/stories/An-OpenSSH-bug-that-took-46-years-to-ripen?index=0x6af0c55a6a009b440bf3016edaad8721f1dddc2b2c1df18eb71a44a0de8787017089db24 Submitted by misha on 2026-11-08 UTC, 1 upvote, 0 comments ## Summary A chain of individually reasonable changes spanning 46 years let anyone log in as root over SSH with a password longer than 256 characters, tracked as CVE-2026-123158 and nicknamed *sshole. In 2012, musl libc began returning * from crypt() on failure, and it rejects passwords longer than 256 bytes by returning that same error value. In 2022, Alpine Linux changed the locked root password in /etc/shadow from ! to *, so the stored value matched the error output and the comparison succeeded. The bug is fixed in OpenSSH 10.6p2 and in Alpine packages. ## Article An OpenSSH bug that took 46 years to ripen! 1980 UNIX puts * in the password field of system accounts. The idea is simple: it’s not a real hash, so it can’t be brute-forced and you can’t log in with a password. 2012 The musl libc developers decide that returning NULL from crypt() on failure is dangerous - programs often forget to check it and crash with a segfault. So they return an error string instead. Guess which one? The same asterisk: *. Three weeks later they add a length limit: passwords longer than 256 bytes burn CPU. Anything longer is rejected. And since it’s an error, crypt() returns *. 2016 OpenSSH fixes a timing attack (CVE-2016-6210). If a user doesn’t exist, the server still hashes the password with a fake/borrowed salt so an attacker can’t tell valid usernames by response time. 2022 Alpine Linux changes the locked root password in /etc/shadow from ! to * so SSH keys work properly on cloud images. … and the loop closes! You connect over SSH as root (whose shadow entry is *). You type any password longer than 256 characters (e.g. 300 As). crypt() hits the length limit → returns * → OpenSSH compares it with the value in the database → that value is also * → you’re in as root. That chain took 46 years (!!!) to complete. Every individual change was reasonable. Together they produced a perfect * == * authentication bypass (CVE-2026-123158, nicknamed *sshole). Fixed in OpenSSH 10.6p2 and Alpine packages.