OpenSSH Pre-Auth Double Free – Writeup and Proof-of-Concept
jfrog.com
jfrog.com
spot checking, debian stable, ubuntu 22.04 lts and rhel 7/8/9 all ship pre-9.1 openssh which aren't affected, if that helps put anyone else's mind at ease a bit.
[1] https://news.ycombinator.com/item?id=34713862
[2] https://github.com/archlinux/svntogit-packages/commit/796878...
That would be a huge problem.
I don’t care about DoS or crashes!
Though I think I heard some criticism of what counts and what does not for that tally, maybe 20 years ago.
The project was fairly innovative of including now-standard practices like having the daemon drop its privileges.
Very unfair of OpenBSD (and other security conscious OSes) to not compete on equal terms there.
It was a relatively recent exploit, I remember being at an RSA conference when the remote ssh exploit was announced and everyone’s pager started going off and people hustled out of there. Fun times!
Where locked accounts were treated as password-less accounts, and would allow direct ssh access.
In Debian's defence, this was caught in the unstable distro and never made it out to a stable release.
Be very, very concerned with any vulnerabilities that cause crashes. Someone may discover a way to control where the process points to, and now you have a way more serious issue.
A DoS attack that crashes a forked worker process is much less severe than a DoS that crashes an important daemon, but they will both receive a “High” Availability impact CVSS rating.
How is this even considered a DoS at all? You're forking a process and then immediately crashing it. You're only Denying Service to your own connection that you just made.
1. I'm not sure this is very useful but I was thinking that if someone follows one of the security hardening standards, their servers are configured to hang until the audit log buffer can be flushed but you could more easily hit that by failed login requests unless they have something like fail2ban installed.
I think the audit log stuff is a red herring because regular denied connections are already written to the audit log.
> OpenSSH server (sshd) 9.1 introduced
https://security-tracker.debian.org/tracker/CVE-2023-25136
Is this even exploitable in any distributed configuration, considering that it requires enabling old deprecated key exchange algorithms?
On the face of it this seems quite lenient. Seems like the only thing holding the gate from preauth ssh rce is the sandbox now, how confident are we about it?
You mean if you find a bug, you're not allowed to point it out unless you have a PR ready that fixes it? Not sure what you're saying.
“Here’s a specific bug you should fix” is different because it’s multiple orders of magnitude less work and doesn’t involve throwing out a ton of perfectly serviceable code.
In the world we live in, that's just not possible. Can you right every wrong you've ever witnessed?
Some of us see systemic and bigger problems and point those out. In your example it's fair to conclude "writing mission-critical code in C is an unjustified risk". Case in point, in a world where Heartbleed actually happened, that should've led to maintainers admitting that their language of choice isn't the right tool for the job.
As engineers we must be pragmatic. Yet many act like you're attacking their kids if you say "your programming language of choice is ill-suited for writing safe code".
This surprises me to this day, though I guess it really shouldn't. Like you, I imagine a perfect world.
Consider whether this is more useful than saying “you know, you should probably find more time to go to the gym”. Anyone writing C code has heard this by now, and repetition probably isn’t going to help.
What could work is what we have seen successfully with Firefox, Linux, Chrome, Android, etc. where people didn’t demand a massive rewrite but instead showed up to work and picked something small where benefits could be seen quickly. Rust has excellent interoperability so you can do that well but you might run into challenges on projects like OpenSSH which have been ported to all kinds of obscure platforms.
(And, to be clear, I like Rust. It’s just I also understand open source maintainer burnout having had plenty of people suggest huge changes they thought were super important but still not enough that they personally wanted to help.)
Framing the whole thing like "saying C isn't cutting it anymore isn't a useful thing to say" is disingenuous.
As professionals we have to keep ourselves to higher standards. Currently I work in a company where the CTO said "screw you all" and forced a rewrite. And you know what? Recently we released the rewrite and it's going better and better each day.
These things do happen. Informed people with political capital to spend do exist.
It's a shame that the industry at large is mostly just comprised of followers.
(As for gradual rewrites, look at this thread. People are getting worked up just by saying the word "Rust". It's very sad but also kinda hilarious observing [supposed] adults act like that.)
Trying to keep you from going to hell is spam? mmmkay. <takes notes>
Spelling it out for you: some safety is better than none. That was the topic. And that people call "cult" whatever they don't like in a very vain attempt to discredit it.
Try and keep up.
to the point that it has become cultism, if you're not being paid to spam
Ada is memory safe too.
Why not Ada?
Also you claiming something has "become" cultism does not make it a fact.
I'll go the other way around and say that your side in these discussions is the cult of "get off my lawn".
I'd equate you to the people who resisted the use of iron and concrete and claimed you can make tall buildings only out of wood. Anti-progress folks.
If it makes you sleep better then go for it. You're still wrong.
have you ever considered the same is true for the hundreds of thousands of OSS projects out there that are writing their code in the language they know best and provides a wider range of opportunities?
If the advocacy for safe languages revolves only around _one_ language, it's spam.
It's the same thing of "excuse me sir do you have time to talk about our lord and savior Jesus Christ?"
There are so many imaginary godlike beings, why stop at the one?
> Also you claiming something has "become" cultism does not make it a fact.
spamming without being paid it's cultism.
It's the definition and it's not up for dispute.
> I'd equate you to the people who resisted the use of iron and concrete and claimed you can make tall buildings only out of wood. Anti-progress folks.
False premise.
I've never resisted to Rust, in fact I write Rust code when I need it.
Your argument is deeply flawed.
Because it comes from cultism, not from reasoning.
Whether somebody is spamming you, on a discussion forum that nobody holds a gun at your head to read, is very much up there in the air.
Claiming subjective feelings are facts is kindergarten stuff, I'm really interested how that's not obvious to an adult.
I write in 3 languages lately, Rust included, so stop trying to discredit what you dislike. People will keep pointing out Rust is a better fit for a number of projects and happily there's nothing you can do to stop it. Because it comes from experience and analysis, not cultism.
and many other people who have replied to the original message saying "enough with this Rust thing, we know, now write the code or STFU"
> I write in 3 languages lately, Rust included, so stop trying to discredit what you dislike
I literally said I write Rust too... and other 20 some languages.
maybe you're just too focused on accusing other people, instead of actually reading and understanding what they are trying to say to you?
Just like a cultist would do?
> People will keep pointing out Rust is a better fit for a number of projects and happily there's nothing you can do to stop it.
Saying and doing are 2 different things.
I can do one thing though: keep pointing out that cults are bad.
<waves goodbye>
it's not about credibility.
repetita iuvant.
Yes, Can we be honest about this.
Promoting Rust by attacking C or other legacy languages that do not have equivalent memory safety is simply not constructive dialogue. Whenever the subject comes up concerning C/C++, or vulnerabilities discovered in common software packages someone always shows up to gripe about lack of memory safety in other language and then regurgitate the same litany of Rust vs C/C++ talking points. It gets old and it's not helping win over the developers the Rust community needs if they actually want to re-write the millions of lines code from the many open source projects to fix these problems.
The handful of Rust bros who show up to condemn C/C++ at every opportunity just make the Rust proponents look like a bunch of elitists, which is not fair to Rust or the community.
just nitpicking
it's billions.
at one LOC per second it would take 11.6 days to rewrite one million of them, but 32 years to rewrite a billion of them.
Waiting to put a star on your Github repo.
Maybe I even send $5 as a support for your work.
because that's what I want from an SSH client/server.
Like, yeah, this one's nice but
Host hostnameOrIPaddress
HostKeyAlgorithms +ssh-rsa
PubKeyAcceptedKeyTypes +ssh-rsa
to ~/.ssh/config fixed the issue. I'm wondering if doing this makes me more vulnerable? Or is bad practice somehow? NB: using iTerm2 3.5.0beta9 and Oh My Zsh master (a1c54e0).On debian-like, remove host keys and run dpkg-configure openssh-server.
On redhat-like, remove host keys and restart sshd.
---------------------------------------------
Not vulnerable, not a bad practice. Newer algorithms are faster (in practice not perceptible, people usually don't need state of the art performance for SSH connections), with smaller keys and probably better algorithms (not subject to side channel attacks, which are still hard to abuse) but RSA is not broken. It may be in a few years with quantum computing but it's still far to be sure.
https://www.schneier.com/blog/archives/2021/03/no-rsa-is-not... updated last december.
No need to rekey all accounts or servers, just switch to ecdsa or ed25519 progressively.
The systems you are trying to SSH to are using outdated host keys, you need to actually update to get security fixes, it will regenerate host keys.
You shouldn't be worried about this CVE, it sounds like you have quite a few years of CVE's you've neglected to patch anyways.
No you don't. rsa-sha2-256 and rsa-sha2-512 are still enabled by default and can use the same key.
OpenSSH and OpenSSL are completely different projects run by completely different people
Hell, The OpenBSD folks had a "fun" time forking OpenSSL to create "LibreSSL" (before it was promptly ignored by the rest of the open source community unfortunately)
Well, shttp was a thing: https://www.rfc-editor.org/rfc/rfc2660.html