Forgot your password?
typodupeerror
Security Linux

OpenSSH Flaw Lets Attackers Log Into Password-Disabled Linux Accounts (bleepingcomputer.com) 68

A newly disclosed OpenSSH flaw dubbed "*sshole" can allow attackers to log in to password-disabled accounts on certain musl-based Linux systems simply by submitting a password longer than 256 bytes. "Apparently certain varieties of musl Linux (Alpine, OpenWrt, Buildroot, Yocto, etc.) have had this OpenSSH vulnerability for about a decade," writes longtime Slashdot reader AlteredEgg. "Upgrade now!" BleepingComputer reports: Security researcher Ozgun Kultekin, who discovered and released details on the vulnerability today, says the flaw has existed since 2016 and stems from how OpenSSH handles password verification errors on systems using the musl C library. Linux accounts can be configured to prevent password logins by replacing their password hash with an asterisk (*) in the /etc/shadow file. Because this is not a valid password hash, no password should allow access to those accounts. However, a patch introduced in OpenSSH in 2016 to fix a username enumeration vulnerability tracked as CVE-2016-6210 changed how OpenSSH handled accounts without usable password hashes.

To prevent attackers from identifying valid usernames through different response times, OpenSSH was modified to perform password hashing even when an account had no usable password hash, including accounts configured with * to block password logins. The problem is that the musl C library's crypt() function also returns * when password hashing fails, including when a submitted password exceeds its 256-byte limit. This means an attacker can submit an oversized password and cause OpenSSH to compare the returned * against the account's stored *, resulting in a successful login.

To be clear, the flaw does not allow attackers to bypass passwords on accounts with valid password hashes. [...] Admins who can't immediately install the update can mitigate the issue by turning off SSH password authentication with PasswordAuthentication no in their SSH server configuration and restarting SSH. Kultekin says admins can also check for signs of exploitation by examining SSH authentication logs for password-based logins for accounts that should not allow them.

OpenSSH Flaw Lets Attackers Log Into Password-Disabled Linux Accounts

Comments Filter:
  • by Valgrus Thunderaxe ( 8769977 ) on Thursday November 05, 2026 @05:02PM (#66412103)
    that's not how anybody should be authenticating with SSH. But this has been known for 20 years.
    • by machineghost ( 622031 ) on Thursday November 05, 2026 @05:52PM (#66412203)

      On Hacker News the headline for a similar article was "AI is forcing us to pay off 40 years of technical debt".

      I think that sums it up well. Like you said, it's been known for 20 years ... and yet it's still relevant today. AI is forcing us to deal with our tech debt.

    • by gweihir ( 88907 ) on Friday November 06, 2026 @03:05AM (#66412635)

      There is nothing wrong using passwords for ssh authentication. Nothing at all. You are barking up the wrong tree. Obviously, this needs to be done with a long and random password, but, for example, having an emergency login password in a sealed envelope that has > 100 bits of entropy is perfectly fine.

      I should also remark that you are calling for the removal of the _mechanism_ as the vulnerability is specifically for the mechanism being there but "disabled" in a slap-dash way. Removing the mechanism is a crazy thing to ask for.

    • Yes, you should use certs. That way when a hacker gains access on an admin's device, they can access everything on the network.
  • by ffkom ( 3519199 ) on Thursday November 05, 2026 @05:13PM (#66412135)
    From what I read about this issue, the flaw is more on the side of the musl C library, rather than on OpenSSH's side. (However OpenSSH can defuse the situation by adapting to the unexpected return value from musl.)
    • by Junta ( 36770 ) on Thursday November 05, 2026 @05:21PM (#66412161)

      Yeah, crypt() *should* return a NULL pointer, *not* some arbitrary string when there's a fault. Entirely musl's bug.

    • No, if you read the man page for crypt, a failed return is supposed to start with the "*" character while a successful run will not contain a * character anywhere. GNU libc returns a * followed by additional characters while musl C only returns the *. OpenSSH failed to check whether the crypt output started with *, signaling an error.

      That's an OpenSSH bug.

    • by gweihir ( 88907 )

      Yes. musl messed up string comparison. A beginner's mistake. This should not happen, it should be caught in review, and it should be caught in testing. A sign of gross incompetence on their part. Not that they are any worse than a lot of commercial software creation. They are probably still better than average quality in the software space.

      • Look at the man page for crypt [debian.org]. Having it return a non-POSIX return value is/was configurable on some distros. This isn't a problem on OpenBSD, the true system.

        BTW a lot of SV startups allow login with an empty password, despite a suite of unit tests. No one likes to write negative tests, so here we are.
      • musl messed up string comparison.

        musl does no string comparison there. The string comparison is done by openssh, in openssh code.

        musl's "mistake" was (and FWIW, still is) that it was also returning the same "*" error string when the password was longer than some arbitrary limit (easy to trigger remotely), not just when the salt was garbage/unsupported (very unlikely to happen at all and impossible to trigger without root access to the server).

        tl;dr; you're stupid and clueless

    • That's what the openssh people are saying. As usual, they're shamelessly using their "reputation" to shift blame

      Go read more about the actual exploit -- openssh was actually accepting "*" as returned by crypt() as a valid hash, and they were comparing it against the "*' password-placeholder from system "users" like "games" or "daemon", which they were picking at random from /etc/shadow (search for "pick_salt()").

    • by shess ( 31691 )

      I don't read it that way. OpenSSH uses a shadow password selected from some other user to mitigate a timing attack, which is fine. But then it determined success based on whether the encrypted password was equal to the stored password. Note that the stored password was not the password of the user being logged in! If root has a * placeholder, you should NEVER be able to login as root, even if they match because you gave the placeholder account's correct password. This potentially turns a user exploit i

  • The way I read this is that libraries like OpenSSH are now run through security checking AI models, but those models can't catch issues in parent libraries like musl. The kind of unexpected breakout from tunnel vision like https://xkcd.com/538/ [xkcd.com]

    Do you read Sutter Cane? They are spreading.

    • by gweihir ( 88907 )

      To be fair, regular security testing would have nicely found this issue. Even somewhat competent fuzzing would have caught it. Or code review looking at border conditions. But apparently nobody bothered to do it.

      Because LLMs are not priced realistically at this time and the LLM scammers are desperate to create the illusion their tools have far more worth than they actually have, they are burning money on these tests. Good on one hand, but a certificate of incompetence for the ones getting caught.

  • by whoever57 ( 658626 ) on Thursday November 05, 2026 @05:57PM (#66412215) Journal

    Linux accounts can be configured to prevent password logins by replacing their password hash with an asterisk (*) in the /etc/shadow file

    I typically use "!" to prevent logins (and change the shell to one of the nologin alternatives, dependent on the exact Linux version).

    • by PPH ( 736903 )

      Until someone uses "!" to signal some other error condition.

      In-band error handling == bad.

      • by gweihir ( 88907 )

        I completely agree. Unless it is a standard flag that is specified and gets recognized directly. "May not hash to this value" is too indirect. It is cryptographically sound, but my intuition is this is "clever coding" which has no place in anything relevant to security.

    • by gweihir ( 88907 )

      The second step (changing the shell to block logins) is probably effective here as well. And you should always do this type of redundancy if possible, it gives you an additional level of safety or security. Also important because there may be many system accounts that have login blocked in this way. I am even more paranoid and set a long random password and forget it, because I find the "*"/"!" mechanism a bit suspicious. Looks my intuition was not wrong on that one.

    • Except "!" has an already defined different meaning to the library that reads the passwd database, so you're just creating a new problem.

  • Ah, I see they named it after Theo...

    (I kid, I kid)

  • by SlashbotAgent ( 6477336 ) on Thursday November 05, 2026 @06:00PM (#66412223)

    I have a nasty feeling that this bug will significantly impact Docker containers and many/most of them will not be updated anytime soon.

    Root for all.

    • If you are putting SSH into a docker container, you are doing it VERY wrong.

      • by Wolfrider ( 856 )

        I don't disagree, but there are other types of containers. Proxmox LXC Debian-based containers usually have ssh enabled by default, which is actually convenient.

    • by G00F ( 241765 )

      likely appliance type things like routers smart devices that remove PAM for a simpler lighter linux.

    • by gweihir ( 88907 )

      Probably. The dark secret about all containers is that containers need almost full system administration. I expect a lot of container users never realized that and are unaware what a can of worms they put on their systems.

  • Why wouldn't this work for the command prompt? Does PAM not use crypt? Or does it do something different when it sees an account with an asterisks as the password hash?

    • no because PAM reads /etc/shadow, see that the hash is invalid (*, ! or other invalid characters) and stop there before even trying to call crypt()
      • by gweihir ( 88907 )

        Good to see that somebody was careful. To be fair, the PAM developers are secure software people while the musl people are just regular developers. It makes a difference. And we need to get to a state where anybody touching anything security critical is actually in the secure software camp. Just "getting it to work" has run its course and cannot cut it anymore.

  • by MIPSPro ( 10156657 ) on Thursday November 05, 2026 @06:42PM (#66412273)
    I find it amusing that OpenSSH has been under development for a very long time by regular humans. Then these piss-ants want to vibe code an exploit in 15 minutes... but they juuuuuust cannot do it. How frustrating that must be! After IBM, Cisco, Oracle, Microsoft and many others took the code and rolled their own versions but couldn't be bothered to give squat to the project in the way of donations (or some pittance like Microsoft). Yet they still stand. Metric shittons of MS slopware and plenty of black eyes for Linux (including TCP/IP stack problems like CVE-2026-98432).

    Just goes to show you that being a conformist just gets you a bigger attack surface.
    • by gweihir ( 88907 )

      Just goes to show you that being a conformist just gets you a bigger attack surface.

      Yes. And monocultures are a very bad idea because it gives attackers a lot more targets and hence motivations. Works for agriculture and IT security just the same, only that the attackers are more intelligent in IT security.

      • by gweihir ( 88907 )

        Oh, and look. Some blithering idiot moderated this down. Explains nicely why IT is not mature at all: Too many idiots with insufficient education in it.

        • Probably because you brought up agricultural practices. Farmers are very touchy about that, and now you've made them mad. Don't be surprised to find a burning tractor on your lawn tonight.
          • by gweihir ( 88907 )

            Well, I thought these people at least understood the very basics of their job. Apparently I massively overestimated their competence level.

  • by F.Ultra ( 1673484 ) on Thursday November 05, 2026 @07:39PM (#66412373)
    Note also that OpenSSH must be configured without PAM support and pam must be disabled in sshd.conf for this to work since PAM catches this before even calling crypt().
  • I just looked at a few musl-based hardware devices and network gear and they're all using dropbear due to the same constraints as needing musl.

  • by gweihir ( 88907 ) on Friday November 06, 2026 @02:42AM (#66412611)

    First, "musl" is not the default c library in most distros. It is in some, make sure to check.

    Second, disabling password login via "*" is something you may or may not do. What I do is set a long, random password and then not note it down. Same effect. The "* cannot hash to a legitimate password" idea has cryptographic merit, but I did find it somewhat suspicious. Funny coincidence my intuition was correct. I did not follow up on system accounts, so my intuition only did half of the job. Take care that distros may use this (Debian/Devuan does some system default accounts with "*" and with "!"), so the real "I am not affected" criteria may be musl or libc.

    That said, on my Debian/Devuan installations all these accounts with "*" and "!" have /usr/sbin/nologin or /bin/false as shell, so a login should still not be possible. Does anybody know whether that is a reliable protection against this vulnerability?

    • That said, on my Debian/Devuan installations all these accounts with "*" and "!" have /usr/sbin/nologin or /bin/false as shell, so a login should still not be possible. Does anybody know whether that is a reliable protection against this vulnerability?

      It should be easy enough to test. "sudo adduser a" then "ssh a@localhost." Carefully modify your passwd file to change the shell to /usr/sbin/nologin and try again. You should be logged out immediately.

      I just tried it on Mint and /usr/sbin/nologin prevented logins.

      • it only prevents logins because your local ssh client expects an interactive shell at the other end. So it is the client here that decided to disconnect, not the server.
    • There's more to ssh than just interactive shell access, and a few passes with sftp to upload a new key that's bound to executing the shell is why you don't rely on a flawed interpretation. Don't guess when it comes to things in /etc/passwd and /etc/shadow. Go and read the docs carefully.

    • have /usr/sbin/nologin or /bin/false as shell, so a login should still not be possible. Does anybody know whether that is a reliable protection against this vulnerability?

      Fuck no. That "/usr/sbin/nologin as login shell" shit is so easy to bypass it isn't even funny

    • having the shell set to /bin/false is not to prevent logins, it is just there to deny an interactive shell (say you have a service that only needs to do file transfer, then there is no need for a full shell). If you really want to disable ssh access for a user, list them space separated after a DenyUsers in sshd_config.
  • It leaves things wide open. Remote penetration without authentication.

    • No, it's a funny name but not a good one. You don't want your new term to be one that can't be used by the news. Doctorow was being too clever by half with "enshittification", which is never discussed by major news outlets because they can't. This falls into the same category. Also how the hell do you pronounce it? Starsshole? Sssss hole?

      Yes, it's a little better since it doesn't actually contain an obscenity, but it is clearly meant to imply one. That impacts the ability to inform people about it

  • Seems like a rewrite of interfaces (and, everything), in Rust would be of large benefit.

    How many more code-injection vectors do we tolerate? Especially, with automated fuzz testing (etc) of agentic connectomes.

    Seems like the 20th century modality needs to go the way of DOS 1.0 EDLIN. It's bad for UI/UX, and is poor separation of concerns/security from the implementation/integration/maintenance side. :/

    • by jsonn ( 792303 )
      Nothing about this vulnerability is about C. The exact same thing would have happened with Rust.

grep me no patterns and I'll tell you no lines.

Working...