News for hackers. Stuff that matters.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by throwa356262 on Thursday November 05, 2026 @10:10AM (#50380071)
Discussion from a few hours ago:

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

Re:Alpine Linux Security advisory: OpenSSH-server password a... by tomhow on Thursday November 05, 2026 @11:02PM (#50388012)
Comments moved thither. Thanks!
Re:Alpine Linux Security advisory: OpenSSH-server password a... by NewJazz on Thursday November 05, 2026 @10:23AM (#50380253)
[delayed]
Re:Alpine Linux Security advisory: OpenSSH-server password a... by hnfong on Thursday November 05, 2026 @10:39AM (#50380490)
There's a very detailed trace of how the bug was developed over decades at sshhole.com and the relevant discussion in https://news.ycombinator.com/item?id=50378228
Re:Alpine Linux Security advisory: OpenSSH-server password a... by NewJazz on Thursday November 05, 2026 @10:56AM (#50380733)
[delayed]
Re:Alpine Linux Security advisory: OpenSSH-server password a... by NewJazz on Thursday November 05, 2026 @02:52PM (#50383600)
[delayed]
Re:Alpine Linux Security advisory: OpenSSH-server password a... by api on Thursday November 05, 2026 @10:49AM (#50380622)
TBH that sounds like a straight up bug in that it deviates dangerously from the spec.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by NewJazz on Thursday November 05, 2026 @11:57AM (#50381453)
[delayed]
Re:Alpine Linux Security advisory: OpenSSH-server password a... by silisili on Thursday November 05, 2026 @12:54PM (#50382110)
> adhering to the spec

Pedantic, but more "author's understanding of the spec" which isn't always correct.

> assume nonstandard behavior

I go back and forth on this one (spec vs standard behavior). It feels like at some point the most widely used impl -is- the spec, as we've seen in other places (web standards).

Re:Alpine Linux Security advisory: OpenSSH-server password a... by mort96 on Thursday November 05, 2026 @01:27PM (#50382569)
The spec is pretty unambiguous here: https://pubs.opengroup.org/onlinepubs/9799919799/functions/c...

> Upon successful completion, crypt() shall return a pointer to the hashed password [...]. Otherwise, it shall return a null pointer and set errno to indicate the error.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by shakna on Thursday November 05, 2026 @03:35PM (#50384140)
You need to add that the spec _also_ only defines a singular error state, that isn't applicable here.

> The crypt() function shall fail if:

> [ENOSYS]

> The functionality is not supported on this implementation.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by mort96 on Thursday November 05, 2026 @07:25PM (#50386551)
I don't think those error sections are generally meant to be exhaustive?
Re:Alpine Linux Security advisory: OpenSSH-server password a... by pdw on Thursday November 05, 2026 @07:01PM (#50386349)
To the best of my knowledge, only OpenBSD and Fedora have a crypt(3) that returns NULL. Everybody else returns a string starting with "*" on error.

For example on Debian the manpage says:

> Upon error, crypt_r, crypt_rn, and crypt_ra write an _invalid_ hash to the output field of their _data_ argument, and crypt writes an invalid hash to its static storage area. This string will be shorter than 13 characters, will begin with a ‘*’, and will not compare equal to _setting_.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by shakna on Thursday November 05, 2026 @03:33PM (#50384117)
[delayed]
Re:Alpine Linux Security advisory: OpenSSH-server password a... by worksonmine on Thursday November 05, 2026 @11:02AM (#50380822)
Apparently because some devs didn't check for NULL which resulted in crashes. Weird choice to fix other peoples' bad programming by deviating from the spec.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by cyphar on Thursday November 05, 2026 @11:33AM (#50381179)
[delayed]
Re:Alpine Linux Security advisory: OpenSSH-server password a... by mik1998 on Thursday November 05, 2026 @12:26PM (#50381802)
[delayed]
Re:Alpine Linux Security advisory: OpenSSH-server password a... by sysguest on Thursday November 05, 2026 @02:42PM (#50383474)
hmm why not make some fake-users just for this stuff?
Re:Alpine Linux Security advisory: OpenSSH-server password a... by forthac on Thursday November 05, 2026 @08:46PM (#50387122)
you mean like daemon?
Re:Alpine Linux Security advisory: OpenSSH-server password a... by cyphar on Thursday November 05, 2026 @09:47PM (#50387524)
[delayed]
Re:Alpine Linux Security advisory: OpenSSH-server password a... by mannyv on Thursday November 05, 2026 @07:42PM (#50386696)
This is either a bad engineering choice or an intentional bug. An empty string would have been better. Why '*' instead of, say, a tilde, @ symbol, or something that generally isn't used?
Re:Alpine Linux Security advisory: OpenSSH-server password a... by NewJazz on Friday November 06, 2026 @02:14AM (#50389168)
[delayed]
Re:Alpine Linux Security advisory: OpenSSH-server password a... by slopinthebag on Thursday November 05, 2026 @11:56AM (#50381447)
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.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by my-huge-pony on Thursday November 05, 2026 @12:12PM (#50381630)
How would using a language different than C help here? At it's core this bug is a logic bug, where "*" == crypt(x), because crypt in musl started returning "*" in some cases some years ago. This could be Rust. This could be Go.

Not every C vuln is a memory safety problem.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by realharo on Thursday November 05, 2026 @12:16PM (#50381667)
>because crypt in musl started returning "*" in some cases some years ago

In Rust, the type of the return value would be a `Result<T, E>`, which means the chain of events that led to this would never have started in the first place.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by my-huge-pony on Thursday November 05, 2026 @12:18PM (#50381696)
In C the return value would be NULL, except it was changed by musl at some point.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by realharo on Thursday November 05, 2026 @12:28PM (#50381826)
The type of the value in C is `char*`.

That's what led some people to write code where it crashes without checks. Which is still their mistake. But if the type was something that can't be implicitly used like an always-present value, that would have prevented the situation, even with those same people.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by uecker on Thursday November 05, 2026 @02:47PM (#50383542)
A pointer is a type where a null pointer can't be used as a regular value but leads to a trap when dereferenced.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by realharo on Friday November 06, 2026 @02:33PM (#50397216)
By "can't be used as a regular value", I meant that it would be a compile-time error.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by uecker on Friday November 06, 2026 @05:22PM (#50399300)
I see. For safety a run-time check is enough though.

But it turns out one can have a compile-time error forthis in C as well: https://godbolt.org/z/8E9z66cfs

Re:Alpine Linux Security advisory: OpenSSH-server password a... by atomicUpdate on Thursday November 05, 2026 @02:04PM (#50383014)
You mean could be a `Result<T, E>`. There’s nothing in Rust that forces that.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by rhdjebejdbd on Thursday November 05, 2026 @12:17PM (#50381679)
Another comment said that returning a * was to avoid returning null which would crash users of the library who didn't check for null. That seems like a C smell to me
Re:Alpine Linux Security advisory: OpenSSH-server password a... by ethin on Thursday November 05, 2026 @01:19PM (#50382441)
Not really. This is like if the char* were an Option<String> but you had programs which stupidly didn't check if the Option had something and assumed it always did. As others have said, Rust would not prevent this.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by K0nserv on Thursday November 05, 2026 @01:34PM (#50382667)
`Option<String>` or `Result<String>` forces the check at the callsite. Unlike C, you cannot forget that the function can error. This absolutely helps prevent issues like this.

Now, the decision to return `"*"` instead of letting poorly written code crash on `NULL` is not good either.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by pheggs on Thursday November 05, 2026 @02:09PM (#50383071)
I don't think it's that people forget it while writing the code, it's that people want their program to work with as little effort as possible and decide to ignore it "for now". And that definitely can happen with Option and Result as well. There's no protection for not checking return values, and it's probably not even possible to protect against
Re:Alpine Linux Security advisory: OpenSSH-server password a... by _flux on Thursday November 05, 2026 @02:24PM (#50383248)
Well they would use `unwrap` if they were lazy, but at least that would be quite visible in the code and would not result in undefined behavior due to operating on a null value. And there might be a group of developers who first choose to use .unwrap. I hope it is the minority.

Given how easy it is to just forward that error to the caller, I think most Rust developers would just choose to do that.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by uecker on Thursday November 05, 2026 @02:46PM (#50383526)
While dereferencing a null pointer is technically UB, it practice it leads to a safe trap. So .unwrap is the right comparison. If you always forward the error to the caller, it will also just lead to some random error message at some point, not really different to a crash.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by K0nserv on Thursday November 05, 2026 @02:26PM (#50383274)
> There's no protection for not checking return values, and it's probably not even possible to protect against (in entirety)

That's exactly what you get with Result and Option, it's impossible to forget.

Compare:

    char* hash = crypt(key, salt);

    // We crash here on the hash derefence, it's no clear from the code
    // that we were supposed to check for NULL or that we forgot. 
    if (!strcmp(hash, expected)) {
    }
To:

    let result: Result<Vec<u8>, Error> = crypt(key, salt);
    // We MUST write this line, which is a very clear signal
    // that we can panic here.
    // This can be grepped for or forbidden.
    let hash: String = result.unwrap();

    // if result == expected { would type error
    if hash == expected {
    }
Re:Alpine Linux Security advisory: OpenSSH-server password a... by pheggs on Thursday November 05, 2026 @02:32PM (#50383347)
That's exactly what I mean. And I have seen a huge amount of unchecked unwraps in production code in the past years
Re:Alpine Linux Security advisory: OpenSSH-server password a... by K0nserv on Thursday November 05, 2026 @02:35PM (#50383386)
Sure, but it's far better than the C code and I don't think in Rust a library would start returning `Ok` with sentinel values to "fix" shit calling code. Maintainers would, rightfully, tell people to fix their code.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by pheggs on Thursday November 05, 2026 @02:45PM (#50383510)
Don't get me wrong, I think rust has some great features and does some things extraordinarily good. But at the same time I can see that for 99% of cases it's just as prone to bugs, including security and supply chain attacks, as any other language. I think I could just as much argue that any "->" is clearly de-referencing that needs checking, which is also pretty easy to see.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by K0nserv on Thursday November 05, 2026 @02:52PM (#50383591)
Agree to disagree I guess :)
Re:Alpine Linux Security advisory: OpenSSH-server password a... by slopinthebag on Thursday November 05, 2026 @03:37PM (#50384160)
this is theoretically, empirically, and objectively wrong. akin to saying that you can get into an accident in a truck as well as a motorcycle, so in 99% of cases there is no difference in safety.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by pheggs on Thursday November 05, 2026 @04:14PM (#50384540)
different kind of programming languages change the kinds of bugs and their properties, but it does not change the amount of bugs per line of code. in respect to C and rust for example, rust may have less memory bugs - which LLMs seems to be able to spot now - but it did increase supply chain attacks for example.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by orf on Thursday November 05, 2026 @05:15PM (#50385256)
> but it does not change the amount of bugs per line of code

You are really uninformed: different programming languages have very different volumes of bugs per line of code

Re:Alpine Linux Security advisory: OpenSSH-server password a... by pheggs on Thursday November 05, 2026 @06:28PM (#50386053)
With all the respect but I don't think I am: https://arxiv.org/html/1901.10220v2
Re:Alpine Linux Security advisory: OpenSSH-server password a... by slopinthebag on Friday November 06, 2026 @01:35AM (#50388931)
that only tries to show a single study is flawed, nothing else

do you think bugs/loc is the same between brainfuck and rust?

Re:Alpine Linux Security advisory: OpenSSH-server password a... by pheggs on Friday November 06, 2026 @04:00AM (#50389875)
> that only tries to show a single study is flawed, nothing else

no the study failed to show any difference in bug count for a specific set of common used languages, where C and Python were both part of the dataset.

I don't think programming languages have a big impact on bugs per line when every line is written by a human. Now given that I was talking about bug counts, not severity.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by slopinthebag on Friday November 06, 2026 @06:36AM (#50391114)
it showed errors in the methodology of an earlier study, it did not produce a novel result.

kind of reminds me how the "research" suggests that there are no practical differences between dynamically typed and statically typed languages...except we know from practical experience that there is, and the literature there is horribly flawed.

we have real-world evidence that rust leads to significantly less bugs in the real world

https://blog.google/security/rust-in-android-move-fast-fix-t...

Re:Alpine Linux Security advisory: OpenSSH-server password a... by pheggs on Friday November 06, 2026 @08:26AM (#50392028)
> it showed errors in the methodology of an earlier study, it did not produce a novel result.

It showed that there's no big difference. From the link:

> Combining corrections for all of these aforementioned items, the reanalysis revealed that only 4 out of the original 11 languages correlated with abnormal defect rates, and even for those the effect size is exceedingly small.

--

> we have real-world evidence that rust leads to significantly less bugs in the real world

no, we only have evidence for memory bugs, that's not what I was talking about

Re:Alpine Linux Security advisory: OpenSSH-server password a... by slopinthebag on Thursday November 05, 2026 @12:17PM (#50381680)
why does this logic bug exist? why are they returning a string, why not a result type, (nil, err), or something else?

oh right, because c is a crusty old language with barely any features.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by bmacho on Thursday November 05, 2026 @12:58PM (#50382153)
[delayed]
Re:Alpine Linux Security advisory: OpenSSH-server password a... by Gibbon1 on Thursday November 05, 2026 @03:07PM (#50383786)
I write firmware where the program has to run for years unattended.

You are right, C with manual memory management, no lifetime management, lack of phat pointers and a culture of leet has problems with deranged maddening bugs that other languages don't have.

But this bug first shows how inband signaling is bad news usually. But worse it's a failure to adhere to the spec properly. If you implement a library and you don't adhere to the spec you're going to bone someone.

Perhaps even worse is obviously the spec doesn't come with any standard testing framework. That was also the root of Apples infamous goto bug.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by anonreplier on Thursday November 05, 2026 @12:14PM (#50381650)
guess what, this kind of sentinel value mistake could even be made in rust
Re:Alpine Linux Security advisory: OpenSSH-server password a... by slopinthebag on Thursday November 05, 2026 @12:18PM (#50381694)
no rust programmer would ever return a sentinel string like this.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by ethin on Thursday November 05, 2026 @01:21PM (#50382459)
Are you sure about that? When backwards compatibility comes into the picture people tend to bend over backwards.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by _flux on Thursday November 05, 2026 @02:25PM (#50383268)
Backwards compatibility with what? Rust has always has had enum also for this exact case, to avoid encoding sentinels as strings or pointers.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by slopinthebag on Thursday November 05, 2026 @03:43PM (#50384230)
you literally sound insane. its like an assembly fanboy saying C isn't any better because you could write inline asm, and therefore whatever bugs C prevents, well, it doesn't prevent them at all.

people like you are holding back software and security by decades.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by slopinthebag on Thursday November 05, 2026 @03:49PM (#50384301)
im quite positive the only rust programmer who would do this is a C programmer who doesn't understand rust
Re:Alpine Linux Security advisory: OpenSSH-server password a... by anonreplier on Thursday November 05, 2026 @03:11PM (#50383848)
why, because they all use agents to do the coding and don't check it?
Re:Alpine Linux Security advisory: OpenSSH-server password a... by slopinthebag on Thursday November 05, 2026 @03:46PM (#50384257)
because rust has features that makes doing it pointless.

in theory could someone do it? yeah, just like in theory someone could use unsafe and return a raw char pointer for some reason.

but in practice would anyone do it? no.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by woah on Thursday November 05, 2026 @12:44PM (#50381994)
Cars without seatbelts and airbags chopping off driver's heads in relatively slow collisions? Well guess what, that could happen in a modern car as well if the driver sticks their head out the window while going through a very tight tunnel!
Re:Alpine Linux Security advisory: OpenSSH-server password a... by anonreplier on Thursday November 05, 2026 @03:12PM (#50383858)
you followed up an incorrect comparison with another one, are you sure you're a rust programmer?
Re:Alpine Linux Security advisory: OpenSSH-server password a... by oguz-ismail2 on Thursday November 05, 2026 @12:14PM (#50381653)
What exactly do you mean "push"? What do you think is going to make musl developers switch languages?
Re:Alpine Linux Security advisory: OpenSSH-server password a... by slopinthebag on Thursday November 05, 2026 @12:21PM (#50381729)
it's unbelievable to me that there isn't a larger movement of developers to move away from c towards better & safer languages. look at how much pushback the rust4linux folks get, primarily from c developers who are simply afraid of change. imagine engineers not adopting safer building practices because "they prefer the old way"....it's disgusting honestly.

what will it take to move away from c? older devs retiring. Planck said that "science advances one funeral at a time" and i fear it will be the same for software.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by bigbadfeline on Thursday November 05, 2026 @12:57PM (#50382144)
> what will it take to move away from c? older devs retiring.

I'll take forking and porting, thank goodness for LLMs.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by anonymous908213 on Thursday November 05, 2026 @01:53PM (#50382871)
It will indeed take everyone dying, but it's not because of developers being afraid of change. In large part, it's because of people like you who make Rust insufferable. Rust is the only language I have antipathy for, because of its community. No other programming language broadly has people who make it their life's mission to tell other programmers they're programming wrong because of their choice of language. When your arguments for why they're wrong are also vapid, eg. "C is bad because of an insane developer committed a logic bug that blatantly violates a trivially-written spec" when an insane developer could just as easily write Rust code that violates the spec, it reinforces that there is no reason to switch.

Rust is a fad among HN-types. It is not used in the real world. You see logic errors reported in C/++ because 99.99% of the world's system code is written in it. The only reason you don't see headlines about logic errors in Rust is because nobody uses Rust in production code. Rust certainly does not prevent you from producing the most dogshit software imaginable, eg. https://jepsen.io/analyses/particledb-1.1.4 , which is far worse than any C/++ database anybody uses.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by hollowonepl on Thursday November 05, 2026 @02:05PM (#50383023)
Moving away from C in any POSIX system is in fact stop being POSIX system as POSIX and linux being unix like system is built on standard that is defined as C library specification.

Rewriting it to Rust is fine attempt, just hard to call it is unix/posix anymore. It may not matter but semantically true.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by rpdillon on Thursday November 05, 2026 @12:15PM (#50381660)
musl's crypt function could be written in Rust, Python, or JavaScript, and still return * when the key is too long.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by ethin on Thursday November 05, 2026 @01:18PM (#50382413)
Rust would not save you here as this is a logic bug. Nor would, well, really any other language. I suppose someone might claim that Rust's result type would save you but it really wouldn't: I can easily make the error type a String or pretty much any other type with little consequence.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by iknowstuff on Thursday November 05, 2026 @01:24PM (#50382519)
It would, due to Result<T> and #[must_use] on it. Nobody would return “*” as a sentinel in Rust.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by K0nserv on Thursday November 05, 2026 @01:30PM (#50382610)
Rust would absolutely have saved you here. Even with `Result<String, String>`, which is pretty poor design, there's no confusing `Ok(s)` with `Err(s)`. Sure you can go out of your way to write something like

    let hash = match result {
        OK(s) => s,
        Err(s) => s,
    };
but at that point I feel like the library is forgiven (except for the poor error design).

@my-huge-pony does make a good point elsewhere in the thread: if the potential error was not foreseen and the code was written originally to return `String` instead of `Result<String, Error>` then even Rust would be in a pickle.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by slopinthebag on Thursday November 05, 2026 @03:47PM (#50384276)
languages with more features would mean developers aren't choosing between unchecked NULLs or sentinel strings.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by 0x457 on Thursday November 05, 2026 @12:45PM (#50382006)
I keep saying that no one should be using alpine or musl, but people keep replying that static linking is totally worth it.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by Muromec on Thursday November 05, 2026 @12:53PM (#50382102)
Docker is a static binary and HTTP is a new command line. I don't care what's inside, nothing good anyway.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by pheggs on Thursday November 05, 2026 @01:04PM (#50382228)
both alpine and musl are great in my opinion, and as far as I know theres no empirical evidence that it is more or less secure overall than alternatives. would you like to elaborate your opinion?
Re:Alpine Linux Security advisory: OpenSSH-server password a... by thewillowcat on Thursday November 05, 2026 @01:13PM (#50382337)
More evidence than allowing root to log in with any long password?
Re:Alpine Linux Security advisory: OpenSSH-server password a... by ceejayoz on Thursday November 05, 2026 @01:31PM (#50382627)
This particular flaw sat latent for a decade.

There's a good chance similar flaws will be discovered elsewhere.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by cluckindan on Thursday November 05, 2026 @04:08PM (#50384473)
”Flaws” or ”intentionally planted backdoors” a la xz? That one was targeting openssl as well.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by pheggs on Thursday November 05, 2026 @02:02PM (#50382995)
I have to admit that I am a bit disappointed in this kind of thinking. There's vulnerabilities everywhere as especially the past few weeks have shown.

One occurrence is not a statistic and should not be used as evidence - it's just an example of a vulnerability that due to various bad circumstances lead to a particularity bad outcome. This logic is in my opinion equally flawed as calling alpine safe now because this particular vulnerability has been fixed.

I'm not a big fan of blaming and I think it's just a result of bad circumstances, but it's interesting to see how some seem to blame musl, but one could argue further that musl documented the behavior of their API which was ignored by openssh and so on

Re:Alpine Linux Security advisory: OpenSSH-server password a... by 0x457 on Thursday November 05, 2026 @04:47PM (#50384910)
IMO only good thing about alpine is that it's a good environment to build stuff that links musl statically.

Never understood why Alpine is used to actually run anything in a container - if you statically link binary, then you don't need alpine as a base and if you don't what is the point? Don't @ me about image size, even without layer caching we're talking about tiny difference that is often dwarfed by size of your runtime.

Musl itself is a great example of taking "simple and lightweight" so seriously that everyone else gets to deal with the complexity. Slow allocator, underoptimized memcpy/string routines, limited locale support, no NSS, and endless glibc compatibility headaches.

But hey, at least libc is small. %%Proceeds to pull in megabytes of <any other>malloc, and other libraries to replace the slow parts of musl.%%

And now sshhole.com is a particularly spectacular example of what happens when "simple" meets the rest of the software ecosystem.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by Sohcahtoa82 on Thursday November 05, 2026 @07:38PM (#50386662)
Static linking makes distribution easier, but it's an absolute security nightmare.

With dynamic linking, you just upgrade the library on your system and you're done. With static linking, every binary that uses the library has to be rebuilt.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by muvlon on Thursday November 05, 2026 @09:44PM (#50387508)
So then rebuild everything? I don't see the problem. NixOS shows how it's done.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by drob518 on Thursday November 05, 2026 @12:49PM (#50382057)
Given Alpine’s broad use in the Docker ecosystem, this is going to hit a lot of folks, I think.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by NewJazz on Thursday November 05, 2026 @01:09PM (#50382291)
[delayed]
Re:Alpine Linux Security advisory: OpenSSH-server password a... by apexalpha on Thursday November 05, 2026 @01:13PM (#50382334)
People generally don't expose SSH from within a Docker container I think.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by AtNightWeCode on Thursday November 05, 2026 @02:29PM (#50383310)
Considering how much people whined about the MinIO images I would expect that it is not that uncommon.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by eddyfromtheblok on Thursday November 05, 2026 @03:56PM (#50384356)
no, ssh INTO a running alpine container. who runs sshd in a container when you can just attach a terminal?
Re:Alpine Linux Security advisory: OpenSSH-server password a... by folmar on Thursday November 05, 2026 @05:09PM (#50385192)
you'll be surprised, ssh gives more ergonomic terminal, multiple connections, more convenient file sync and so on
Re:Alpine Linux Security advisory: OpenSSH-server password a... by 0127 on Thursday November 05, 2026 @12:53PM (#50382100)
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

Re:Alpine Linux Security advisory: OpenSSH-server password a... by Lt_Riza_Hawkeye on Thursday November 05, 2026 @12:58PM (#50382167)
It seems it used to return NULL, but they changed it for "convenience"
Re:Alpine Linux Security advisory: OpenSSH-server password a... by mahboi on Thursday November 05, 2026 @06:42PM (#50386190)
How is this more convenient, being able to display it as text?
Re:Alpine Linux Security advisory: OpenSSH-server password a... by adrianN on Thursday November 05, 2026 @01:02PM (#50382202)
I guess this is where the culture around rust shines. You can write crypt that returns a string in rust just fine, just like you can write crypt that returns a tagged union in C. Cultural differences and syntactic sugar change which version is idiomatic.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by mort96 on Thursday November 05, 2026 @01:19PM (#50382432)
The downstream is downstream of the design IMO. In general, people write the API that is obvious. In C, returning a string is obvious, while defining a custom OptionalString type is high friction. In Rust, returning Option<String> is as easy and obvious as returning a String.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by asveikau on Thursday November 05, 2026 @03:41PM (#50384211)
In a C function returning a string, two or three idioms are common for signalling an error.

One is to return NULL for errors.

Another is to make the string result a parameter and use a return code to signal error.

A third, less common but still out there, is an error parameter.

Failure to observe these is on the caller. Forcing the caller to consider the error is probably where rust shines.

But a good C programmer is thinking about these idioms when they encounter a function signature for the first time, or they write one.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by dabinat on Thursday November 05, 2026 @04:05PM (#50384448)
Sure, you could write deliberately bad code in Rust by unwrapping everything everywhere, but the point is that it is a distinct choice to do so. You can’t forget to handle errors - you have to make the choice to disregard them. If you forget to check for NULL in C it won’t complain and it’s dependent upon you to remember to do so.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by mahboi on Thursday November 05, 2026 @06:46PM (#50386228)
Unwrapping everything isn't even bad, that's what most webservers will do
Re:Alpine Linux Security advisory: OpenSSH-server password a... by mahboi on Thursday November 05, 2026 @06:45PM (#50386222)
All the standard Rust libs use results. The standard C and C++ libs use errorno, return 0, return -1, return nullptr, maybe exceptions if C++, ...
Re:Alpine Linux Security advisory: OpenSSH-server password a... by spullara on Thursday November 05, 2026 @01:22PM (#50382481)
always has amazed me that there was so much hate for java checked exceptions where handling errors ought to be the norm.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by kaoD on Thursday November 05, 2026 @01:29PM (#50382599)
I agree but I think was also because Java didn't have sum types (or still doesn't? years I haven't read Java) and rethrowing is super easy, while Rust kinda nudges you into the right direction (if you need to rethrow at all, think if you want to rethrow verbatim or wrap with a semantic error type).

Right idea at the wrong time.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by zmmmmm on Thursday November 05, 2026 @03:49PM (#50384299)
yep, 90% ergonomics in my view. If it had its time again with modern ergonomics thing could look very different.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by groestl on Thursday November 05, 2026 @01:35PM (#50382678)
The question is _where_ the error needs to be handled. It's almost never directly at the call site. And then there's a few issues with checked exceptions and Java language things (RMI, closures, etc) which make checked exceptions cumbersome. An exception (checked or not) might be worse than sum types, but they're still a thousand times better then returning an error in-band.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by spullara on Thursday November 05, 2026 @02:56PM (#50383646)
Rust and Go literally have you handle it at the call site by default and if you don't want to you have to pass it on.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by groestl on Thursday November 05, 2026 @06:36PM (#50386142)
Which (at least the way it was done in Go) is ignoring 20 years of experience in programming language design.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by mahboi on Thursday November 05, 2026 @06:41PM (#50386182)
Go doesn't require you to handle it at all. Rust made the right compromise with !
Re:Alpine Linux Security advisory: OpenSSH-server password a... by drdec on Thursday November 05, 2026 @02:57PM (#50383668)
> The question is _where_ the error needs to be handled. It's almost never directly at the call site.

Which is why exceptions in Java can bubble up the stack? You don't have to catch it in a particular method you can let it go to the caller of the method, and so on.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by mahboi on Thursday November 05, 2026 @06:40PM (#50386173)
Checked exceptions must be handled or declared. You end up with everything saying it can throw several random things like IOException.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by javier2 on Thursday November 05, 2026 @01:36PM (#50382701)
They were overused, but some actually make sense, such as the IOException and SQLException
Re:Alpine Linux Security advisory: OpenSSH-server password a... by cloverich on Thursday November 05, 2026 @03:26PM (#50384023)
The problem with them all always comes when the ever-steady march of abstractions, features, and edge cases results in one routine throwing the same two error classes but in different places, and how you handle them is different despite being the same wrapper. Add a thousand developers and several years of churn, and poof you get extremely complex bugs that result from errors seeming to come from one place, but actually coming from another.

Having been on the receiving end of debugging that a few times, I no longer mind the in-band error handling, although admittedly I'm inexperienced enough to be confident its better. Just for the random code I've had to read where I just need to know exactly how something I didn't write and will never read again works, and whether the error is handled and how, i love reading in-band error handling, even if I too dislike the way an error laden routine must be written. Over time I've come to appreciate elegance "in the large" as opposed to the code I see in any individual function.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by Terr_ on Thursday November 05, 2026 @01:56PM (#50382925)
[delayed]
Re:Alpine Linux Security advisory: OpenSSH-server password a... by sieve on Thursday November 05, 2026 @02:00PM (#50382964)
In the vast majority of programs, errors and non-results are irrelevant at the call site. You want to program for the happy path and not wrap every single call with error checking code or `try/catch/finally`.

    h = file_open(path)
    data = file_read(h)
    file_close(h)
    return data
is the code you want to read. This essentially is:

    return file_open(path).success(h -> h, file_read(h)).success(h, data -> file_close(h); data)
A language with thoughtful error handling primitives will support such code.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by spullara on Thursday November 05, 2026 @02:58PM (#50383676)
that is the same as saying the method throws IOException
Re:Alpine Linux Security advisory: OpenSSH-server password a... by sieve on Thursday November 05, 2026 @03:28PM (#50384052)
It might throw one. There is a difference between documenting what exceptions can be thrown and forcing every consumer to handle them.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by spullara on Thursday November 05, 2026 @04:10PM (#50384489)
returning a non-success you either handle it or pass it up the chain, potentially with not a lot of information about what originally caused it. with an exception you can retain the full information about what happened by either rethrowing it, throwing your own exception with it embedded as the cause or declaring that you don't handle it by saying you can throw it.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by sieve on Thursday November 05, 2026 @04:42PM (#50384856)
I generally prefer exceptions to result codes. You can even use the mechanism to throw useful results across nested function calls.

I do prefer Maybe/Option/Either style returns in some cases though. Makes for a cleaner API.

So each method has its uses.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by spullara on Friday November 06, 2026 @06:00PM (#50399656)
I also have this nuanced view. I am glad my hashmaps don't throw KeyNotFoundException.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by mahboi on Thursday November 05, 2026 @06:34PM (#50386128)
Eh, it's weird. You usually don't care exactly what type of exception is thrown. If you do, usually you only care about that one type and the rest fall into the "unexpected error" category. HTTP did this well with 4xx being client's fault and 5xx being server's fault.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by pandemic_region on Thursday November 05, 2026 @04:30PM (#50384713)
IOException must be #1 on the list of most ignored exceptions. Like okay what am I supposed to do really I'm just trying to run a select against my db
Re:Alpine Linux Security advisory: OpenSSH-server password a... by pie_flavor on Thursday November 05, 2026 @06:12PM (#50385889)
Well, for example, if you had opened a file to put the data into, you might delete the file or restore from a backup. But even if the answer is nothing, bubbling it all the way up to main is not the wrong answer. The point isn't whether you can do something, it's whether someone can do something.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by zmmmmm on Thursday November 05, 2026 @03:48PM (#50384285)
> You want to program for the happy path

This is the root of a lot of the evil. Yes, humans want to program for the happy path. It is a lot more fun. However, that bias leads to so much lack of diligence to properly deal with the unhappy path.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by sieve on Thursday November 05, 2026 @03:54PM (#50384347)
Syntax is not going to solve logic errors. No amount of checked exceptions or forced unwrapping of a result will help with TOCTOU or any number of similar vulnerabilities in code.

You ideally want to attack the problem at two ends:

- make the syntax noise-free so you can see what is happening

- build primitives at the syscall and stdlib level for common footguns

You would still need to deal with domain-specific logic errors, but you have at least reduced the surface area exposed to casual attacks.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by mahboi on Thursday November 05, 2026 @06:30PM (#50386069)
People using exceptions want to handle the unhappy path, just usually not at the call site.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by groestl on Thursday November 05, 2026 @06:43PM (#50386207)
> This is the root of a lot of the evil

It is not. Being extremely restrictive in the happy path, throwing all over the place, but have generic error handling code at the top level (e.g. HTTP entry point) makes for some pretty robust, stable, easy to read software. Albeit it typically has somewhat rough user experience.

The thing is, that's a pretty good place to start. From there on, you can handle exceptions one by one, surgically, and make things nicer.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by mahboi on Thursday November 05, 2026 @06:54PM (#50386290)
I keep hearing how diligent it is to handle errors at the call site, always by people who end up making services that either crash for preventable reasons or bury errors.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by _flux on Thursday November 05, 2026 @02:21PM (#50383219)
I always thought the ideas was great, but type system was holding it back. If you could have expressed that your thrown exceptions are the same as some other method's (e.g. a method of a class given as a parameter), and some other classes, then it could have been a lot less annoying. Powerful, even! But Java did take its sweet time to get even type parameters.

I have written very little Java, though, so this is more of an armchair analyst position.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by 0x457 on Thursday November 05, 2026 @04:29PM (#50384709)
Better design breeds better habits. In Java, you can end up handling a DNS exception 20 layers up the stack, even if your call never actually triggers a DNS lookup, simply because some method deep in the call stack declares it as possible. The culture is to propagate or wrap exceptions rather than translate them into domain-specific errors near the source.

Rust makes handling and mapping `Result` locally more ergonomic, even though `?` makes propagation easy too. Rust, however, also makes it easy to lose the context during propagation and end up with useless `Error`.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by lakeviewterrace on Thursday November 05, 2026 @04:52PM (#50384970)
Yeah too bad your adult-diaper language can't even host itself on most of the architectures where musl is relevant.

Another Rust self-suck session rendered completely irrelevant. Again.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by creatonez on Friday November 06, 2026 @09:30AM (#50392720)
Unfortunately this is also an area where a Rust programmer would likely just reach for the platform libc, because you really want to be compatible with exactly how the platform is hashing passwords. Once you know about the inconsistency, you can make predictable wrappers around it, but platform legacy is gonna keep throwing these curveballs.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by j45 on Thursday November 05, 2026 @01:50PM (#50382837)
It's nice to see how quickly this is being addressed, and likely monitored for any unintended side effects.

Looking at the unpatched Ubuntu things in my life, and I'm pretty close to asking Claude to update things to see how quickly Alpine can get close, assuming responsiveness can stay this fast and quality.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by nodesocket on Thursday November 05, 2026 @01:52PM (#50382863)
This is brutal because a lot of docker containerized apps are very slow to update the base image if at all.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by pishpash on Thursday November 05, 2026 @06:54PM (#50386295)
They shouldn't be including any sshd.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by ls612 on Thursday November 05, 2026 @09:55PM (#50387591)
Docker images are generally not affected because they don’t ship ssh.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by feearent on Thursday November 05, 2026 @02:02PM (#50382986)
Not really related to the topic, but AI-popular sentences and language structure stand out to people right away these days right? I noticed some.

"If you cannot update yet, at least disable password logins: set PasswordAuthentication no in your sshd configuration and restart sshd. Either one closes the hole." (only AI would characterize a critical SSH implementation vulnerability as a hole closing game)

An attacker who can reach your SSH port can log in without knowing any password. It takes one connection, works every time, and needs no retries. (It sounds like the writer is bragging about the exploit instead of describing it. AI does this)

The attacker needs the name of an account whose password field is * (an account with no password set, which is normal for key-only accounts), and needs the machine to have at least one other account with a $5$ or $6$ password hash. The attacker then sends a very long password (257 to 1024 bytes). One user with a password is enough: it makes every account without one reachable. (same as above made stronger with the 'statement: statement2' format)

"Users coming from a directory service through musl-nscd (nslcd, winbind, sssd), since they have no shadow entry." (a human would be more clear about what a shadow entry is and give more context, I think)

Hmm the rest of the article (the remaining 70-80%) seems quite human.

Anyway, not sure why I spent 10+ minutes on this. It just jumps at me right away.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by beepbooptheory on Thursday November 05, 2026 @02:43PM (#50383483)
[delayed]
Re:Alpine Linux Security advisory: OpenSSH-server password a... by feearent on Thursday November 05, 2026 @03:16PM (#50383907)
Thank you for your comment, it's very refreshing (and comforting for me actually). Have a good day.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by monk_grilla on Thursday November 05, 2026 @08:04PM (#50386861)
Agreed, I think all the tells you identified are correct. It is really off-putting to me still.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by AtNightWeCode on Thursday November 05, 2026 @02:31PM (#50383334)
I always use certificates with SSH. Saved me this time.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by theteapot on Thursday November 05, 2026 @03:18PM (#50383925)
You have at least one local account with a $5$ or $6$ password hash?
Re:Alpine Linux Security advisory: OpenSSH-server password a... by getfacl on Thursday November 05, 2026 @02:39PM (#50383439)
I run Alpine on hardware. I was not effected by this as while I do use ssh keys, there are no user accounts without passwords on my server.
Re:Alpine Linux Security advisory: OpenSSH-server password a... by Kuraj on Thursday November 05, 2026 @04:57PM (#50385050)
> You are affected if all of the following are true: (...) At least one local account has a $5$ or $6$ password hash.

Can someone explain this part to me? https://sshole.com doesn't appear to mention anything like this, and something tells me this makes all the difference.

Re:Alpine Linux Security advisory: OpenSSH-server password a... by Kuraj on Thursday November 05, 2026 @05:19PM (#50385304)
> At least one local account has a $5$ or $6$ password hash.

I'm not sure this gets the point across when it effectively means "any other user with a real password"

Re:Alpine Linux Security advisory: OpenSSH-server password a... by alanfranz on Thursday November 05, 2026 @08:55PM (#50387181)
> set PasswordAuthentication no in your sshd configuration and restart sshd.

Funnily enough, they don’t recommend checking pubkey auth is enabled and working. By blindly (or agenticly) following those instructions the risk is getting locked out of some machine.