4 ms·
How many times does this have to happen before we start rejecting components written in unsafe languages?
by Gigachad 4y ago
How many times does this have to happen before we start rejecting components written in unsafe languages?
- bradleyjg 4y agoYou first. What browser and OS are you posting from?
- throwawaymaths 4y agoIf your server is in Erlang, it's probably dodged this (Erlang dodged heart bleed because it only uses ssl libs for cryptographic primitives)
- speedgoose 4y agoNot OS or browser but my SSH servers use Teleport and my HTTPS servers use Traefik or Caddy. Caddy, Traefik, and Teleport are written in Golang and not using OpenSSL. It’s a start.
- timdoug 4y agoI adore Go, but it seems to be impacted too: https://groups.google.com/g/golang-announce/c/dRtDK7WS78g https://groups.google.com/g/golang-announce/c/dRtDK7WS78g
- woodruffw 4y agoThis is almost certainly a different bug. I don't believe Go's standard library uses OpenSSL.
- timdoug 4y agoYou’re right re: implementation —- I’m drawing a conclusion solely from the coordinated disclosure that it’s a similar crypto/TLS issue. If the Go issues were distinct I’d imagine they’d choose a different day to disclose/release?
- woodruffw 4y ago> If the Go issues were distinct I’d imagine they’d choose a different day to disclose/release? I think it's just a funny coincidence. That's going based on what I know about the OpenSSL one; I don't know anything about the Go one. We'll find out!
- komuW 4y agoit's unrelated; https://news.ycombinator.com/item?id=33382369 https://news.ycombinator.com/item?id=33382369
- deleted 4y ago[deleted]
- speedgoose 4y agoIndeed, it doesn’t sound like a coincidence.
- komuW 4y agoFilippo Valsorda(FiloSottile), who is the maintainer of Go's cryptography libraries said on Go's slack channel that the patch is unrelated. See screenshot of the slack conversation: https://paste.pics/f5622033ae711b36e0bbcda393a67866 https://paste.pics/f5622033ae711b36e0bbcda393a67866
- tester756 4y ago>You first. What browser and OS are you posting from? The ones that use Rust - Firefox and Windows
- formerly_proven 4y agoFirefox uses NSS for TLS, no?
- bradleyjg 4y agoNeither Firefox nor Windows are written wholly, or even substantially, in rust. I thought “we” were rejecting programs written in unsafe languages?
- pjmlp 4y agoTrue, but outside the kernel Windows has enough infrastructure running in .NET code. Additionally even if C++ is unsafe, it is still better than plain old C, which since Vista has been the migration path from kernel code. Nowadays there are even template libraries that can be used on kernel and drivers like WIL. Finally the Microsoft Security Guidelines are: 1 - use managed languages if one can afford it 2 - use Rust 3 - use C++, alongside SAL and Core Guidelines checkers
- fulafel 4y agoThe start has happened, but it's happening unevenly with different users. Lots of TLS servers (in reverse proxies but also in backend apps and even Apache httpd[1]) are in memory safe languages. For example Go, while not totally memory safe, has shipped their Go-implemented crypto/tls library for a long time. (And also had some crypto correctness bugs - reminding us that memory safety is "necessary but not sufficient" for a TLS implementation) [1] https://www.memorysafety.org/blog/memory-safe-httpd/ https://www.memorysafety.org/blog/memory-safe-httpd/
- valenterry 4y agoWell, Go isn't really a great language for safety either. Memory safety maybe yes, but not in general. Rust or Zig do much better here.
- nine_k 4y agoWhat makes Zig safer than Go, to your mind?
- valenterry 4y agoFeatures such as sum types (enums) that you can pattern match on. Or generics (well now Go got them as well, for a reason). Maybe it doesn't immediately sound as if this is related to security, but it is. If it is hard to model your data and hard to work with it, then people will go the "easy and fast" path. Think Java: for each type you have to create a new file. Even with modern tooling that is still annoying. So people often shortcut and just use "String". Now you have "String password" and "String userid" and you can swap it up and print the password by accident. Artificial example, I know, but I hope it explains what I mean in general.
- pjmlp 4y agoNo you don't, only for public types , types internal to the package can stay on the same file.
- 4y ago
- tedunangst 4y agoSeven.
- dylan604 4y agoincluding this one?
- userbinator 4y agoI want it to be never. Controversial opinion: as long as those who use "security" to oppress us have the upper hand, code written in "unsafe languages" will always leave a path to freedom from the authoritarian dystopia of corporations and governments who will seek to increase their control over our lives. We've already seen the battle start at DRM, jailbreaking/rooting, etc. IMHO the periodic but not-too-often occurrence of vulnerabilities like this, just like a nonzero amount of (cyber)crime, is a justifiable cost that we must continue to tolerate and pay for the sake of our freedom.
- progbits 4y agoWhat are you on about? Using a library written in memory-safe language won't oppress you.
- danhor 4y agoSoftware inhibiting user freedom (like drm) often gets broken using buffer overflows, string parsing mistakes, ... (as seen on many game consoles). Broken (drm) software allows for more user-freedom. If this software was using Rust, it would be much harder to break them than is currently the case. And tbh, I have to concur (somewhat). I have lost little-to-nothing due to software exploits, but have gained significantly. For example, reading epubs with my kindle or loading homebrew on game consoles.
- woodruffw 4y agoThe idiom for this is “biting your nose off to spite your face.” You should do good things consistently, not bad things to offset worse things. If DRM is a serious problem in your life, put your money and time where your opinions are and avoid hardware and software products that enforce it rather than mandating insecurity for everyone else.
- danhor 4y agoIt's impossible to get AAA games (and most AA games) without some form of DRM (with some notable exceptions), the same as high(er) budget media productions. The Kindle was already 8 years old when I got it, isn't it better to re-use it with more current software? The same with router hardware that gets exploited to flash OpenWRT. It's very hard to get a modern Smartphone (with acceptable cameras, battery life, performance and software availability) with manufacturer-intended root access. While I agree that people should adopt Rust (and other approaches) for their security porperties, it's not hard to see how it may lead to exploits getting rarer and to more categories of devices & content that can't be reasonably used in a "free" way, even if not intended by the manufacturer. Thus making it much harder to have control over the devices you own (without becoming some kind of luddite).
- robalni 4y agoAll languages are unsafe because programming is inherently unsafe. Otherwise I look forward to the day when we stop driving unsafe cars, whatever that means. Accidents can always happen.
- pjmlp 4y agoIndeed lets abolish seat belts! Needless gizmos.
- jeroenhd 4y agoWe have no indication that memory safety is even involved in this bug. For all we know, it could be a timing vulnerability that allows factoring key material, data being copied from the wrong object, or a protocol flow bug that let's the attacker bypass validation. You can create a vulnerability by adding || where you meant && in any programming language, even Rust without unsafe code enabled.
- Genghis_9000 4y agoits hilarious how HNers on the "pro memory safety" side of the fence have this moronic attitude that memory disclosures are likely to happen in memory-safe languages. its simply false. you may be right in 1% of cases, but no more.
- tomjen3 4y agoThis isn't a problem with unsafe languages. This is a problem with primarily OpenSSL, but also the entire structure around SSL, which does too much, which means the potential attack surface is too high. Wasn't there a fork the last time they fucked up badly with a security issue anyway?
- pjmlp 4y agoUntil we finally get liability widespread across the industry and not only in domains where human lives are at risk, just like in every other industry. When the pocket money gets affected all companies will care about security. Things are thankfully moving into that direction, US security bill already calls out that one needs to think about delivering software written in C and C++. Only a matter of time until one needs some kind of clearance to deliver software to government agencies with unsafe languages.