News for hackers. Stuff that matters.
Re:Writing secure Go code by tptacek on Monday November 04, 2024 @03:58PM (#42045903)
It's easy to demonstrate contrived abuses of Go concurrency that break memory safety, but despite the enormous popularity of the language, actual shipping vulnerabilities --- mistakes in concurrency, not deliberately-engineered pathological cases, that yield attacker-controlled control over memory --- are basically nonexistent (I can't think of a single one; there must be one somewhere!).

Basically this is about as credible an argument as claiming that Rust isn't memory safe because its libraries have so much `unsafe` code. And that claim: not super credible.

Basically, the takeaway in both cases is that it's not safe to allow an attacker to write code for you in the language. But everybody assumes that's the case anyways, because it's the case with virtually every other language (with one very notable, fraught, and well-understood exception), too.

Re:Writing secure Go code by shitter on Monday November 04, 2024 @04:37PM (#42046238)
What is that exception?
Re:Writing secure Go code by tptacek on Monday November 04, 2024 @04:41PM (#42046272)
Browser Javascript.
Re:Writing secure Go code by pansa2 on Monday November 04, 2024 @05:19PM (#42046597)
Also embeddable scripting languages like Lua
Re:Writing secure Go code by ViewTrick1002 on Monday November 04, 2024 @04:42PM (#42046273)
Instead there’s a whole host of subtle footguns which while not leading to true memory unsafety will lead to complete junk data.

https://www.uber.com/en-SE/blog/data-race-patterns-in-go/

Re:Writing secure Go code by tptacek on Monday November 04, 2024 @04:44PM (#42046285)
I don't care to litigate program correctness and ergonomics. Those are extremely subjective, and I don't feel like I ever get anywhere useful in those kinds of conversations. The most popular backend programming language in the industry is almost certainly Python, and it barely even has types. I still wouldn't dunk on it.

This thread is about a much narrower question, which is code security. There, I feel like I'm on much firmer ground drawing and defending conclusions, and my conclusion is that there isn't a mainstream general-purpose modern language that is meaningfully more secure than Go (or than Rust, or than Python, etc).