5 ms·
> For memory in particular, it's been understood what it takes to have a safe abstraction for quite a long time now, and numerous widely-available languages pro
by 2trill2spill 11y ago
> For memory in particular, it's been understood what it takes to have a safe abstraction for quite a long time now, and numerous widely-available languages provide one. Use one of those instead of C.
That advice doesn't really help the OpenSSH team at all. OpenSSH is a C project and it certainly is not going to be rewritten in a safer language. Their are many reasons for that, first reimplementing OpenSSH would take lot's of effort, and the OpenSSH(OpenBSD) people don't have much man power to spare. Secondly OpenBSD is a C shop for better or worse, like most open source operating systems. Thirdly what language can fulfill all the constraints of OpenSSH and be memory safe? Let me try and explain, OpenSSH is included in many operating systems, like OpenBSD, FreeBSD, most of the linux distros, etc. Most of these groups are not going to want to include languages that require big complicated runtimes into their base operating systems. So that get's rid of any JVM based language, erlang, and any other non compiled language. So that leaves languages like Go or rust, which most certainly are safer languages than C, but can they run on all the platforms listed on OpenSSH portable?[1] And just as importantly will Operating systems add another programming language to their base system, which increases the effort required for maintenance just so they can switch the implementation of a working program. I personally don't think most major operating system would make the switch. Finally OpenSSH has a pretty good track record when it comes to security, especially considering how little funding they receive, it would probably require less effort to continue improving OpenSSH then to ditch it and start over and get everyone to use the new version.
[1]: http://www.openssh.com/portable.html http://www.openssh.com/portable.html
- twic 11y agoI take your point, but OpenSSH is almost a counterexample. The OpenSSH team's goal is to make the best possible SSH daemon for OpenBSD; it's a nice bonus that they can make a portable version as well. They're doing this as part of the broader OpenBSD effort. OpenBSD is a cohesive, relatively small (for a full-blown operating system!), independent, and tightly focused project; they are in a better position than anyone to introduce a new language. Plus, they already have a track record in throwing away old software and replacing it with something entirely new [1] [2]. You're right that languages with big runtimes would probably not be worth the cost, and new languages like Rust and Go are still too risky. But how about something like Ada or Modula 2? Both are well-established (virtually ancient) languages with mature compilers, small runtimes, and proven use in systems development. [1] http://www.openbsd.org/papers/httpd-asiabsdcon2015.pdf http://www.openbsd.org/papers/httpd-asiabsdcon2015.pdf [2] http://www.openntpd.org/ http://www.openntpd.org/
- 2trill2spill 11y agoYour probably right about OpenBSD being able to introduce a new language if they wanted to seeing as they are a more cohesive and smaller group. I thought about Ada too, but the one thing that gave me pause is the shortage of Ada programmers relative to more mainstream languages.