- cross-posted to:
- selfhosted@lemmy.world
- cross-posted to:
- selfhosted@lemmy.world
CVE-2016-6210. ask sshd about a user that doesn’t exist and it says no instantly, cause there’s nothing to hash. [The solution is] sshd grabs some other account’s salt and hashes your password anyway
I’m not sure how this is relevant to what caused this bug. Seems to me like a random point that was added by the AI writing this blogpost without human review.
The article doesn’t clearly explain how all of these fit together, but here’s what I think they mean happens:
- Attacker tries to connect on a user account that should not accept a password, ie the user’s hash is “*”.
- This should be outright rejected (“*” means no password login), but because of the point you highlighted, it just grabs a random salt and tries to calculate the password hash anyway.
- The password is too long so it gets automatically rejected… with the magic value “*”.
- User hash is “" and the “calculated” hash is also "”, so login accepted.
Without the “fix” of using another user’s salt, the process would fail immediately for a password-less account. Note that the other user’s salt never plays a role in the calculation because the password is too long and the hash function doesn’t bother calculating it. But it’s the reason execution continues and allows the rest of the bad behaviors to accept the login.
In hindsight, the mistakes are pretty silly. They shouldn’t actually care if the hash matched the user’s hash if they are one the codepath that is only performing the hash to waste time. Long passwords should be rejected earlier as invalid user inputs instead of reaching the hash functions. These decisions are basically saying “I’m going to do something stupid, but it shouldn’t affect anything because the other parts of the code are surely not doing something stupid at the same time”. It’s obvious why this design philosophy didn’t scale.
openssh on musl linux (alpine, openwrt, buildroot, yocto, and a lot of the docker images you’ve pulled)
do many docker containers have ssh on?
I have 4 accounts on my OpenWRT router with * as their password, but I did try with a random password over 256 characters and I couldn't log into them.
daemon:*:1:1:daemon:/var:/bin/false ftp:*:55:55:ftp:/home/ftp:/bin/false network:*:101:101:network:/var:/bin/false nobody:*:65534:65534:nobody:/var:/bin/falseStill, this is a huge security flaw!
I thought openwrt uses dropbear? Looks like I have password auth turned off anyways so I’m good.
You’re absolutely right. I just read the article and as it pointed out OpenWRT I wanted to make sure and tested it anyway. OpenWRT doesn’t even have any SSHD packages available, so that’s good. But as I’ve installed the OpenSSH-sftp-server package quite a few times I probably got confused on top of that as well.
Why are trying to replace the Gnu tools with non-GPL stuff again?
Money.
Ssh is not a gnu application.
Attacker hacks into a system, sees that it’s running a GPL libc rather than a MIT libc and then politely excuses themselves because they aren’t willing to share their spoils.
Bad code is bad code, no matter what license it’s written in.
musl is far more POSIX compliant, secure, and cleaner code (no dirty hacks) than glibc. Not everything has to be a culture war. Do you use sudo (ISC-style)? Do you use curl (MIT-style, curl license)? Even OpenSSH isn’t GPL (BSD). Not everything is a plot; vulnerabilities happen regardless of what license you pick.
Also in addition to that info, I like about musl to be able to compile without relying on glibc, which is a “common” (notice I set it in quotes, don’t take it literally) source of dependency problem. Often if there is a glibc dependency problem, then you can’t do much about it, because the entire system relies on the correct one. With musl your application doesn’t depend on external library.
maybe they were making a comment on the licensing instead of a culture war since there’s several high profile examples of right shifting underway?
musl is far more …, secure, …
you are funny. i wish i could attend one of your standups 😹
One vulnerability (such as the in the post) does not make a trend.
You want to compare these for me? https://app.opencve.io/cve/?product=glibc&vendor=gnu https://app.opencve.io/cve/?product=musl&vendor=musl-libc
Competition.
Holy crap þat was a journey









