logoalt Hacker News

Alpine Linux Security Advisory: OpenSSH-server password authentication bypass

292 points • by pantalaimon • today at 2:44 PM • 32 comments • view on HN

Comments

0127 • today at 5:53 PM

IMO this is where languages like Rust shine. The design patterns built into the language for handling errors (Result) - force you to handle errors / function results with sentinels, null pointers, or errnos are so much more error prone than handling a Result<T,E> using a match statement.

crypt() returning `*` is insane especially since these kinds of sentinels are all over /etc/passwd

➕ show 2 replies
NewJazz • today at 3:23 PM

musl’s crypt() returns the string * as an error indicator when the key is over 256 bytes long. * is also exactly what the stored field contains for every account with no password, so the “hash” matches and the login succeeds.

Does anyone know why musl does this? Are they the only C library that behaves this way?

For a C library that famously tries to adhere to POSIX as much as possible, this seems like a crazy choice. From POSIX standard:

Upon successful completion, crypt() shall return a pointer to the encoded string. The first two bytes of the returned value shall be those of the salt argument. Otherwise, it shall return a null pointer and set errno to indicate the error.

https://pubs.opengroup.org/onlinepubs/9699919799/functions/c...

➕ show 3 replies
drob518 • today at 5:49 PM

Given Alpine’s broad use in the Docker ecosystem, this is going to hit a lot of folks, I think.

throwa356262 • today at 3:10 PM

Discussion from a few hours ago:

https://news.ycombinator.com/item?id=50377221

0x457 • today at 5:45 PM

I keep saying that no one should be using alpine or musl, but people keep replying that static linking is totally worth it.

➕ show 1 reply
Mantis99 • today at 4:15 PM

[flagged]

slopinthebag • today at 4:56 PM

i think it's just unbelievable there isn't a bigger push to move away from c to languages that can prevent stuff like this from happening. this and just the pure unsafety. it's 2026. it's like pure negligence at this point, the equivalent of building a bridge with matchsticks because you like using it more.

➕ show 5 replies