<- Back
Comments (305)
- tonnydouradoAm I missing something or is this written up to seem a lot worse than it actually is?It starts with a bold claim: "ssh accounts that should not accept a password will accept any password between 256 and 1024 characters". But then it keeps adding qualifiers:- sshd compiled with musl- not using PAM- password logins enabled- at least one account with '*' as the password "hash"- at least one OTHER account with a valid password- server is aligned with 2 ley lines- hacker is wearing a blue t-shirt and green socksOk, the last two are an exaggeration, but still. The conditions are all ANDed, miss a single one and you're fine.On top of that, as someone else in these comments reminded, the target account needs to have a valid login shell or other exploitable program assigned to it, and these passwordless accounts tend to have nologin or something similar.To me this seems to fall on the "technically possible, practically very unlikely" bucket, kinda like the PHP vulnerability from the other day. Maybe this has gone unnoticed for so long because it just doesn't happen.
- mpyneOK, I think I see what’s going on with this, in this configuration.The goal from an attacker’s perspective is to get this to be true: `$ret = crypt($pw, $hash); $ret == $hash` when called by OpenSSH’s sshd. This is how sshd validates that the user logging in knew the account password.The `$hash` is the “settings” to the crypt call and will normally look like “$6$--gibberish” for users with passwords set, but could look like “*” or “!” for users not intended to be able to login.The bug is from the intersection of all of these things:1. musl can return “*” for errors, rather than leave the return value NULL. Other libc have adopted something like this too, but seem to use a different result “*0”.2. musl can also return “+” for errors, but only does so if $hash starts with “*”. This is intended to eliminate the possibility of an error causing `$ret == $hash` to be true, however it assumes that applications calling `crypt()` will set $pw and $hash to values corresponding to the `$ret == $hash` comparison to be made immediately afterwards.3. OpenSSH can be convinced to pass the hash of a different user if the hash is “*” or “!” to avoid timing attacks that can enumerate the user list, so it will set $pw and $hash to correspond to different users. $hash will be a real “$6$--gibberish” style hash in this case, and OpenSSH expects `crypt()` to either return NULL or return a hash string. But now there’s two hashes OpenSSH uses. It does: `$ret = crypt($pw, $hash2); $ret == $hash1`;4. This should normally not be a problem because OpenSSH will pass in valid $pw and $hash2 that should not lead to errors in hashing, so the $ret that musl generates should be a real hash that cannot match the “*” or “!” $hash1 for the login-disabled user. However as a DDoS mitigation, musl will return error if the password is too long when using SHA-2-based hashes (the default, it seems).5. This error will result in a non-NULL result of “*” or “+”. Since OpenSSH passed in a real hash ($hash2), musl will return “*”, which compares equal to the actual user hash $hash1 for the disabled-login user.The OpenSSL adjustment ensures a minimum hash length for the user before logging them in, even if crypt() succeeds somehow.
- BoppreHIn-band signaling[1] strikes again. * should not have been used as special value, neither for "no password" in /etc/passwd nor "error while hashing the password" in crypt. I'm afraid we'll find many more of these abuses, specially in string manipulations. The null was ok, an exception (or equivalent) better, and Result<T> (or equivalent) best.[1] https://en.wikipedia.org/wiki/In-band_signaling#Computer_dat...
- amlutoThe whole story is a bit worse than this. Musl already worked around this type of failure. See the second-to-last line here:https://git.musl-libc.org/cgit/musl/tree/src/crypt/crypt_des...(hey, this workaround is wrong if the salt is "x"!)but they forgot to work around it here:https://git.musl-libc.org/cgit/musl/tree/src/crypt/crypt_sha...The vulnerable path in musl is only a little bit vulnerable, because "" is not actually a sha256* encrypted configuration and should not reach this code: musl's crypt(..., "*") will not call that code! Turns out that sshd detects that the password hash is too short and does not forward the salt!https://github.com/openssh/openssh-portable/blob/master/auth...Look, no else statement! If that if doesn't get taken, then salt remains NULL. And the sshd code is really quite messy and doesn't keep track of the fact that this code path is inappropriate for validating an existing password hash.A workaround in the sha256 path in musl wouldn't even have prevented the bug!I'm going to give some credit to musl for unwisely using "*" and some credit to OpenSSH for having nonsensical control and data flow.
- nxobjectAbove all, I’m a little sad that the musl developers decided to make a lot of “well it’s convenient” changes to core crypto functions — at least without the level of auditing that would have caught this! It’s tarnished their reputation in my eyes a little.
- wolrahAlso how many times do we have to learn that letting badly programmed software die when unexpected things happen is the better option because it means people actually notice that there's a problem. Silent compatibility hacks are the worst, they guarantee problems never get fixed and the stack of hacks never gets smaller.Microsoft has historically been one of the leaders on the wrong side of this one, but they have also demonstrated how effective it is to call out badly behaved software and make it annoy the users with UAC. When Vista came out, so many applications needed elevated privileges to run because they were badly designed to write user data in system locations, but now their application was more annoying to use and came with a scary dialog about it making changes to your computer that other better-designed software didn't get.More often than not if a program didn't actually intend to change system settings it was just a matter of badly chosen default paths which are pretty trivial to fix, but so many vendors just would not do it despite years of complaints from NT admins wanting to not have to spend hours with Process Explorer figuring out specific permissions to grant limited users enough access. Once their failures were put front and center, calling their application out as the one getting things wrong every time the user ran it, they suddenly had motivation to fix it.
- evgpbfhnrSo to recap, with a non-upgraded sshd you need:- an account with /etc/shadow hash set to '*'- (note root won't work by default because of PermitRootLogin prohibit-password default)- attempt twice, first attempt fails second long password is accepted (that took me a while to understand)In practice passwd -l seems to lock with a ! prefix, and new account without passwords are created with a single ! which is also not affected, I'm not sure how big the impact actually will be in practice and don't understand the recommendation to upgrade urgently right now... Just don't use `*`?EDIT: ah, some default container images apparently have a default alpine user with that hash, so I guess that's bad for them. This makes a bit more sense now.
- scandinavianDid anyone get it to work? I tried on the official alpine docker image, enabled password login for root. The shadow entry has ! as password by default, this didn't work with a > 256 character password (i also did passwd -l which also does !). I manually changed it to * and it still didn't work.Am I doing anything wrong here?OpenSSH_10.3p1, OpenSSL 3.5.9 29 Sep 2026PRETTY_NAME="Alpine Linux v3.24"
- sidneythekidneyFun!I was able to reproduce this on Alpine 3.23.7 with OpenSSH_10.2p1.Luckily PermitRootLogin [0] hasn't allowed logins with passwords for root since 2015 [1]. I'm guessing that's at least part of why this went undiscovered for so long.0: https://man.openbsd.org/sshd_config#PermitRootLogin1: https://cvsweb.openbsd.org/diff/src/usr.bin/ssh/sshd_config?...
- vova_hn2Offtopic: this is a very cool way to present commits and code excerpts. Love classic Windows styling.Were those pictures with links generated using a publicly available tool that we could use, or were it custom (vibe)coded specifically to create this page?
- 0x0For OpenWRT, AsusWRT etc, I believe they use dropbear ssh by default instead of OpenSSH, which apparently isn't affected?
- neuroticnews25That's a well-made site, yet I feel nothing.
- 0812037123158It's amazing how similar this exploit payload is to the 20+ year-old Quake 3 vulnerabilities found by Luigi Auriemma (aluigi), which also used the exact same 256-to-1024 character range and nothing more than a long string of AAAA.... Here you're feeding >256 A's up to a 1024-byte limit to trip musl's defensive length cap, whereas back in the mid-2000s, Luigi was famous for publishing one-line .cfg scripts where the entire exploit was literally "say aaaaa..." repeated a few hundred times overflowing server's memory.¹ ²A great example is Jedi Academy, a 2003 Quake 3 engine game whose multiplayer is still actively played today (its open-source engine port, openjk, is even in the Debian repos btw). Luigi had two classic scripts for it on his site: Jedi Academy <= 1.011 in-game server buffer-overflow (jamsgbof)¹, which crashed the server just by pushing a string of as past the 1024-byte console buffer, and Quake 3 engine in-game players kicking (q3msgboom)², where a wall of as hit the engine's 1022-char truncation limit and the leftover bytes confused the parser into disconnecting everyone on the server.Kind of wild that 20 years later, the exact same payload goes from crashing Quake 3 matches from the tilde console to getting root on some SSH servers.[1] https://web.archive.org/web/20101227181948/http://aluigi.alt... [2] https://web.archive.org/web/20060522175643/http://aluigi.alt...
- mmollThe musl vulnerability looks a lot like an intentional backdoor, doesn’t it?
- tomaskafkaAt this point it feels to me we aren’t discovering security bugs but a decade of planted backdoors.
- RVuRnvbM2eWait so musl, famously a stickler for standards, just changed the behaviour of a POSIX function?
- NavinFWow. I wonder which of the common fuzzers would have found this a decade ago. If literally any password over 256 chars works, that means nobody has ever fuzzed openssh on musl linux
- p4bl0Nice web site. However, I've got a server with 14 alpine-based docker containers in production. Among them 13 are widely distributed images (like web server, databases, etc.) and one is a custom build image. Only one of them have an SSH server publicly exposed, Forgejo, but it's its own internal SSH server which only accept public keys and Git commands. On the internal network, only 3 of respond to SSH. I haven't tweaked their default SSH config. None were vulnerable to this attack.
- stevenhubertronI’m a smart person and none of this makes any sense to me. It’s like purposefully written poorly.
- illusive4080From the other thread’s source [1], it affects musl without PAM. You can set PasswordAuthentication=no or update to remediate.[1] https://hachyderm.io/@damienmiller/117563026759098135
- hypferWhat is out there that uses musl without PAM and hosts an OpenSSH SSHd with PasswordAuthentication?As in: "Actually out there"The hypothetical Alpine exists, yes, but what runs that like that?
- bspammerThe last few weeks have made me feel very good about my policy of zero internet-accessible ssh ports, ever. On AWS, use SSM. For a VPS or home server, access everything over WireGuard.
- mkjIt would be nice if the passwd crypt functions didn't have timing dependence on password length. Then there'd never need to be hacky workarounds like what musl did, and various tricks to avoid exposing whether users exist on systems.No idea if it's likely to happen though.
- traceroute66To be fair, I have less than zero sympathy for anyone who runs SSH on any platform without `PasswordAuthentication=no` in 2026.Its not asking for trouble, it is there will be trouble, not if but when.As for the people who say "well, I run SSH on port 942329053052". Well guess what, the bots make short work on that. We tried it at $work as an experiment, multiple bots found it in less than a couple of hours. That's why your SSH config must be hardened, preferably running on a hardened OS too.
- KotlopouTangent: Pangram says the text is 60-ish% AI-generated. Not that surprising given the look of the page and the work being done with AI in the first place, but it is interesting to me because this doesn't look like your standard wall-of-text AI purple prose. So it's notable that a) you can generate convincing text in this style and b) Pangram detects it anyway.
- gquereWhy is this not yet published on the official website and why is there no CVE? https://www.openssh.org/security.htmlEdit: My bad as pointed below this is not in OpenSSH but in musl and it appears in the relase notes https://www.openssh.org/releasenotes.html#10.6p2. I had scrolled straight to the bottom of the website because the animations annoyed me. Still would like a CVE for proper tracking though!
- predkambrijRepro in a Docker container: https://github.com/predkambrij/sshhole-repro
- leonjzaManaged to reproduce this, with a lab[0] you can play with.[0] https://github.com/leonjza/sshhole-lab
- passiveDid we declare "break the world Thursday" and nobody told me? I feel like it's three weeks in a row that we've had a once-in-a-decade security issue pop up.
- throoooooThe bugs and commits that "fix" them reveal somewhat of a shitshow for how musl is managed. All projects have bugs, but I can't help but question why the wheel was reinvented here. Many toes have been stubbed along the way.
- draxenI avoided using alpine-based containers ever since finding out a lot of Linux server software is actually Linux + SystemD software. The union set API of both Linux and SystemD seems to be the default "Linux API" today.
- titzerI'm starting to realize that trusting some random people who wrote the gruddiest, boringest, most torturous low-level stuff might have been a bad plan.At this point I feel embarrassed in front of the AIs.
- chekibrekiPSA for OpenWrt users: If you are getting the post quantum message on login which points to openssh.com, you are likely using dropbear nonetheless. Check in System->Software. I was confused and worried why I seemingly had the vulnerable OpenSSH installed, but its just dropbear using an OpenSSH link.So AFAIU, you are fine.
- nasso_devsomething interesting to note here is that while this isn't a memory safety vulnerability, a modern systems programming language with better error handling could have easily avoided this whole situation. error handling in C is a PITA, and we're paying the cost of decades of pretending that it's not a problem
- ghm2180Thanks you to the team that found this. Exceptionally well explained and funny at the same time. What is most important is how people just checking stuff( remember the .xz hack that was tried?) has save the internets ass so many times. We should give good security researchers UBI for life for just doing good work.
- ronfriedhaberReminds one of https://www.openssh.org/txt/buffer.adv.
- plucA+ name
- oefrhaThis is a super duper annoying site for people who just want to know if their systems are vulnerable, after patching like a dozen critical vulnerabilities in other software over the last week and are almost at the breaking point of resigning.Can we have a “don’t treat me like five/toddler” / “idgaf about the explanation” quick link to a section for adults who need to patch systems?(And if your reaction is “just scroll down, stupid”, I’m happy to report that with the scroll jacking, I scroll not enough / past the critical sections nine out of ten times.)Edit: You may want to read https://sshhole.com/#exposure.
- timcobbI just want to point out that, aside from LinkedIn content, I am decreasingly hearing about "AI slop" or "human-in-the loop".
- drob518So, nobody fuzz tested sshd before?!?!
- paaloeyeNot the worst site, but it's clearly a publicity machine from wakefield.co, whom I haven't heard of. Also, exploitation conditions are super narrow, albeit, any password is wild.
- anonundefined
- cube00> except a lot of programs never check for NULL. they just compare whatever crypt() gives back with the stored field, hit the NULL, and crash> so musl (the libc under alpine) goes ok fine, crypt() just won't return NULL anymore. if it fails, it returns a single character instead.Considering it's been accepted that crashing if malloc returns a NULL is your fault, did musl really feel the need to accommodate bad implementations like this or is this just AI speculation?
- qwel-1asjAll that site is lacking is marquee and furry creatures. AI slop sites are so horrible with their blinking animations, l33t dark background and chaotic text.
- dcchambersThis one feels negligent. How does this go uncaught for 10 years? How did it make it into production period?We need to re-think EVERY assumption about security.
- philipwhiukMagic characters are awesome.
- gabucinorich felker was such a f* (funny) guy back in the mplayer days toonever changed i guess
- muddi900I would like to read this but the scrolling is completely broken on iPad Safari
- ChrisRRCan we just have a site with the text and images without the awkward scrolling crap? Hijacking basic features is an instant click away from sites for meEdit: It seems to work fine on mobile. I'm not sure why the scrolling behaviour was added on the desktop version of the site
- ctrlaltdileepThat's kind of shocking. I guess the swarm of AI related vulnerability findings continues.
- bombcarThe real name of this is sshole - the is the "star" of the show, after all.
- stogotOf all the named vulnerabilities, I appreciate the history lesson and screenshots of how it got there
- shaolinspiritcame for the name, stayed for the story
- andreagrandiThis is fine :)
- DonHopkinsThis is bottom-up branding I can get behind. ()*()
- littlecranky67> how did I ran into it? [...] i had agent swarms. a lot of them. let's not get into itCan we please now normalize AI usage in development? Just some other day people asked for "NO AI used" badges for software as measure for quality, and praised i.e. NetBSD for being AI-free. Yes, we come from a phase of AI slop, but it has become obvious that there are plenty of legit usecases where AI beats human-only effort nowadays.
- gosenI really like creativity in the name, the way website built and the content"tl;dr" was a bit of a downgrade though, but that's fineit's a nice way to promote the company behind it
- cowlevelThis is a pretty well done AI generated website, congrats you have proven it's not solely for slop.
- lclcOne more reason to build your (own) Docker images on 'FROM scratch' (basically nothing).
- HackerThemAllI just created an Alpine container, did "apk add openssh" and this doesn't work for me. I assume it's been updated already.
- anonundefined
- MarkBlahHaha insane, great find and write up
- globular-toastTbh the most disappointing part of this is musl (and later glibc) changing the function to stop callers crashing because they didn't RTFM.
- jdw64I liked that this site explained the vulnerability in an easy-to-understand way.
- rvzRelated discussion: [0][0] https://news.ycombinator.com/item?id=50377221
- TZubiriwhat’s the moral of the story?alpine stocks are crashing?musl stocks are crashing?glibc stonks are upalternative implementations in general slightly down
- karel-3ddoes this have CVE or something?
- henry700at this point my only reaction is "are you fucking kidding me"
- v1b3m[flagged]
- sneelaYet another clankered finding creating a clankered website with clankered explanations. To be fair, this one's a lot better than the other clankered equivalents, but I wonder whether these people even know enough about their bug to have their own write-up?Also, what's with this damn trend of typing in lowercase only? Why is this a thing?> oh did i say "i"? sorry. i had agent swarms. a lot of them. let's not get into itStill a cool finding... it's just the communication is becoming a lot worse these days - I want to understand the findings please, not be impressed by your webpage! Biggest gripe in recent memory is https://github.com/xoreaxeaxeax/skitter-creek-bath-salts
- anonundefined
- rom1v[dead]
- mari_dtfy[flagged]
- tremarley[dead]
- dadadat[flagged]