News for hackers. Stuff that matters.
Re:OpenSSH Pre-Auth Double Free – CVE-2023-25136 – Writeup a... by crablover on Wednesday February 08, 2023 @02:01PM (#34712981)
Fortunately not much real-world impact on this one, but it's a stark lesson in what happens when you insist on writing your codebase in C.

The time is ripe for a Rust rewrite. If the Linux kernel can make a start on this, with all its complexity, OpenSSH developers should seriously consider it too.

Re:OpenSSH Pre-Auth Double Free – CVE-2023-25136 – Writeup a... by jmull on Wednesday February 08, 2023 @02:32PM (#34713575)
> ...when you insist on writing your codebase in C

It's not really a matter of "insisting". Suppose you start writing an open SSH tool for BSD in 1999. What language do you choose?

Now that it's 2023 and OpenSSH in C is widely used, it's not as if it would be good if it were just abandoned (certainly not good from a security perspective). It makes sense for a team to continue maintaining it, right?

There probably is a better language for an open SSH client. It's not going to write itself, though. This is open source. The interested people need to get together and figure out how to do it.

It's just weird to me to imply the openssh people are doing something wrong when -- absent a time machine -- they clearly are not, and in fact are developing and maintaining a very valuable tool (probably aren't getting rich doing it, either).

Re:OpenSSH Pre-Auth Double Free – CVE-2023-25136 – Writeup a... by benibela on Wednesday February 08, 2023 @02:58PM (#34713977)
>It's not really a matter of "insisting". Suppose you start writing an open SSH tool for BSD in 1999. What language do you choose?

Pascal?

Re:OpenSSH Pre-Auth Double Free – CVE-2023-25136 – Writeup a... by jamal-kumar on Wednesday February 08, 2023 @02:30PM (#34713538)
If you're truly interested in this endeavour, there's some people who have a pretty good start on it who I think bear mention [1] [2] [3]

For what it's worth "insisting on writing in C" for a large piece of software that's been a fundamental part of the secure internet for over 20 years now is just matter of momentum. We're talking having to redo the entire stack from the kernel to the drivers, ABI and up in a whole new programming language. It's being done, just keep in mind it's an enormous amount of work to get there.

[1] https://www.redox-os.org/

[2] https://github.com/RustCrypto/SSH

[3] https://github.com/warp-tech/russh

Re:OpenSSH Pre-Auth Double Free – CVE-2023-25136 – Writeup a... by swatcoder on Wednesday February 08, 2023 @02:18PM (#34713311)
A new project in any language invites far more risk than a battle-tested mature project that happens to be written in C.

It would be great if a Rust alternative matures and comes to prove itself, but that’s a gradual, decade-scale transition and somebody should probably still be maintaining what’s there in the meantime.

Re:OpenSSH Pre-Auth Double Free – CVE-2023-25136 – Writeup a... by iueotnmunto on Wednesday February 08, 2023 @02:05PM (#34713052)
quit spending your time talking about it and write a replacement then?
Re:OpenSSH Pre-Auth Double Free – CVE-2023-25136 – Writeup a... by jeltz on Wednesday February 08, 2023 @02:07PM (#34713092)
Writing a security critical code base like that is not something everyone could or should do. You do not even know if the one you replied to is even a programmer. Should the start university and study computer engineering and then specialize in cryptography and then finally write the library?
Re:OpenSSH Pre-Auth Double Free – CVE-2023-25136 – Writeup a... by loloquwowndueo on Wednesday February 08, 2023 @02:11PM (#34713170)
But if not a programmer or knowledgeable about crypto they definitely should shut up about how Rust will save us all from all bugs for all eternity :)
Re:OpenSSH Pre-Auth Double Free – CVE-2023-25136 – Writeup a... by jamespo on Wednesday February 08, 2023 @02:17PM (#34713302)
Created an account 18 minutes ago to lecture everyone to develop in Rust :/
Re:OpenSSH Pre-Auth Double Free – CVE-2023-25136 – Writeup a... by fredoliveira on Wednesday February 08, 2023 @03:09PM (#34714169)
Expected no less from someone named "crablover". If that person isn't going to lecture us all, who will?
Re:OpenSSH Pre-Auth Double Free – CVE-2023-25136 – Writeup a... by IncRnd on Wednesday February 08, 2023 @02:19PM (#34713335)
> You do not even know if the one you replied to is even a programmer.

The person lectured, "The time is ripe for a Rust rewrite." People who read that comment would believe the author to be a programmer.

Re:OpenSSH Pre-Auth Double Free – CVE-2023-25136 – Writeup a... by rastignack on Wednesday February 08, 2023 @02:19PM (#34713325)
The first step would be to bless as much as possible of rust-crypto and promote it to Stdlib.

I sometimes wish the rust foundation would hire someone who does for rust what Filippo Valsorda does for go.

Re:OpenSSH Pre-Auth Double Free – CVE-2023-25136 – Writeup a... by RealityVoid on Wednesday February 08, 2023 @05:29PM (#34716420)
> Writing a security critical code base like that is not something everyone could or should do

I mean... Why not? I know roll your own crypto is bad, but _someone_ has to do it. Might as well be you! Do it in the open, get feedback, attract high skill people to contribute to it and... Tadam! Cool codebase!

I can't shake the feeling that making crypto as this magical thing people show ldnnot dream of is doing a disservice to us all.

Re:OpenSSH Pre-Auth Double Free – CVE-2023-25136 – Writeup a... by 0xbadcafebee on Wednesday February 08, 2023 @02:59PM (#34713991)
We'll just find exploits in the Rust implementation. A moved target is still a target.
Re:OpenSSH Pre-Auth Double Free – CVE-2023-25136 – Writeup a... by HideousKojima on Wednesday February 08, 2023 @06:02PM (#34716875)
"A car with seatbelts can still crash, so why bother driving a car that has seatbelts?"

The class of error in the article is impossible in Rust unless you explicitly choose to use unsafe.

Re:OpenSSH Pre-Auth Double Free – CVE-2023-25136 – Writeup a... by snvzz on Wednesday February 08, 2023 @06:48PM (#34717486)
>why bother driving a car that has seatbelts

The implication openssh has no seatbelts is very wrong.

OpenSSH's internal architecture was engineered for robustness, and has privilege separation and sandboxing.

Re:OpenSSH Pre-Auth Double Free – CVE-2023-25136 – Writeup a... by HideousKojima on Wednesday February 08, 2023 @08:30PM (#34718508)
And yet TFA is about yet another vulnerability caused by something that Rust is immune to.
Re:OpenSSH Pre-Auth Double Free – CVE-2023-25136 – Writeup a... by 0xbadcafebee on Thursday February 09, 2023 @09:41AM (#34724590)
* * *