7 ms·
Fuzz rising
- phoe-krk 7y ago> Linux distros are the de facto package manager for C code, and C++ to a lesser extent It's not a conclusion I'd end up with, but after a moment of thought, I agree with it.
- d33 7y agoIs it just me or this pie chart is extraordinarily terrible because the legend is not in order and there's just too many similar colors? And I'm not even colorblind.
- tinus_hn 7y agoIt’s terrible because there are just too many colors. There is no focus so the graph explains nothing.
- titzer 7y agoThis would be easily fixable. 1. Sort quantities in both the list and the chart by descending proportion. 2. Assign colors systematically, e.g a spectrum from red to purple, or shades of primary colors (bonus if you pick better colors for certain types of color blindness).
- masklinn 7y agoThe legend seems to be in order for me, the top-to-bottom legend matches the clockwise progression of the slices (from the 12:00 position). The Color similarity is problematic indeed though.
- jononor 7y agoA stacked barplot would have been better. And then annotations or another stacked barplot next to it to illustrate the groups the author wanted to talk about. Piecharts are generally best avoided...
- deleted 7y ago[deleted]
- dinglejungle 7y agoThe title of this submission ("Fuzzing makes memory-unsafe languages untenable") makes no sense[1] and is not found anywhere in the linked article. [1] perhaps the intended meaning of the title was "fuzzing shows that memory-unsafe languages are untenable", but that's certainly not the meaning of the current title
- masklinn 7y agoIt's the tagline the author used on Twitter: https://twitter.com/justincormack/status/1153060402495991808 https://twitter.com/justincormack/status/1153060402495991808 and seemed clearer than the actual title. > perhaps the intended meaning of the title was "fuzzing shows that memory-unsafe languages are untenable", but that's certainly not the meaning of the current title No, fuzzing makes these languages untenable because it provides a tool for automating memory unsafety issues. Without mature fuzzing tools, most of these issues can remain unfound, but fuzzing surfaces them — and their potential for exploitation — rather easily. It's a bit of a "security by obscurity" thing, but I think there's a point to this view: fuzzing takes the existing crack / fault of memory unsafety[0] and blasts it open so wide you can get a truck through.
- nullc 7y ago> fuzzing makes these languages untenable because it provides a tool for automating memory unsafety issues. Sans mature fuzzing tools, most of these issues can remain unfound, <Pointy-haired Boss>Fuzzing is now forbidden in our offices. Next problem?</phb>
- snaky 7y agoJokes aside, Pointy-haired Boss ask why should we care about security issues from the business standpoint. Do we know any company went out of business due the security breach?
- gmueckl 7y agoNot yet, but fines due to GDPR violations might have that effect in the near future. That only requires that a security hole leads to a massive data breach.
- praptak 7y agoMaybe this will fuel some much needed advances in static analysis, although the most popular memory-unsafe languages are also very hard to model formally.
- blodovnik 7y agoSo what are the alternatives for system programming? Rust, Golang? Any other true contenders?
- masklinn 7y agoIt really depends what you mean by "system programming". If you mean things like foundational libraries & network stacks, then go is not a contender[0]. If you mean system daemons and the like, then languages like ocaml, D, … should also work (and that's assuming you want / need the performance of a native binary, if you don't then the world's your oyster). [0] to my understanding — and I may be completely mistaken here — memory-safe ADA with dynamic allocation and without GC is pretty much an active research field so fails either "memory safe" or "suitable for going fast"
- gmueckl 7y agoD with its conservative GC may run into random issues on 32 bit platforms. I have seen this effect in some rather trivial programs that should have used only a few MB of memory, but ended up eating up their whole address space and crashing. Not all D programs are affected all the time, mind you. But it's a bummer if it happens. Having made this experience, I doubt that conservative GC can ever be declared safe, unlike completely precise GC.
- skocznymroczny 7y agoD 2.085 added support for precise garbage collector.
- gmueckl 7y agoIt is still not enabled by default, though. I would suspect that you need to audit your code for pointers stored in integers amd other shenanigans before enabling it in production.
- titzer 7y ago> then go is not a contender[0] > [0] ... memory-safe ADA with dynamic allocation and without GC is pretty much an active research field so fails either "memory safe" or "suitable for going fast" Why would D with a conservative collector be "more efficient"? How does being conservative (with stack roots, presumably) fundamentally make a GC better? Why would OCaml be better than Go? OCaml is garbage-collected, no opting out.
- jplayer01 7y ago> Look to smaller more nimble Linux distributions that start shipping memory safe code Are any distributions moving in this direction yet? Seems to me like C/C++ applications are so foundational to Linux that this would be a huge undertaking. Are there even any memory safe window managers? Hell, even then you're reliant on X or Wayland. PulseAudio/Alsa are also hard to replace. edit: Quick google search only gives me https://github.com/mesalock-linux/mesalock-distro https://github.com/mesalock-linux/mesalock-distro which is trying to replace common tools with Rust/Go counterparts. I'm not sure how active it is. The main repo only has one main contributor.
- masklinn 7y ago> Are there even any memory safe window managers? I assume "non-toy" is included in there, but there's xmonad at least.
- pjmlp 7y agoSawfish, which used to be GNOME's one for a couple of years. https://sawfish.tuxfamily.org/ https://sawfish.tuxfamily.org/ As for userspace in Go, check https://github.com/gokrazy https://github.com/gokrazy. Google has a couple of talks with it.
- tinktank 7y agoI'm getting really tired of these clickbait headlines. Nowhere in this article does it assert the title
- tinktank 7y agoI just read it again, and this comes off as another indirect push for Mirage/Unikernels. I hope it isn't and I'm just being cynical.
- justincormack 7y ago(author here, ex-C programmer) its not. Its just against C, and the dependence we have built on it, and the huge number of issues we are seeing now. I don't care what memory safe language you use. A safe userspace for Linux is achievable without as much change as unikernels.
- masklinn 7y agoAlthough it uses different words (as noted in an other comment, the title here is based on the line the author used on Twitter), but the conclusion is the same sentiment worded differently: > Memory unsafe languages are not going to get better, or safe. It is time to move on. and this is based on an entire article making the case that fuzzing is what reveals the vulnerabilities, and thus both shows and makes memory-unsafe languages untenable: fuzzing by white hats reveals how full of holes these programs are, but fuzzing by black hats shows them what has exploit potential in a much more significant and systematic manner than manual exploit research.
- pjmlp 7y agoMaybe it would help to write those guidelines here instead of complaining all the time: https://news.ycombinator.com/submit https://news.ycombinator.com/submit It is not like everyone is aware of some magical comment describing the HN submission rules.
- pron 7y agoIt's worth mentioning that there are sound static analysis tools that guarantee no undefined behavior in C programs (e.g. https://trust-in-soft.com/ https://trust-in-soft.com/). Much cheaper and more realistic than a rewrite. Tenable or not, much of the software we rely on will remain written in C in the next few decades.
- deleted 7y ago[deleted]
- 0815test 7y ago> Much cheaper and more realistic than a rewrite. I really have to dispute this, these tools are not simple to use. You'll probably have a far easier time rewriting the code piecemeal, i.e. function-by-function (which will involve a lot of unsafety initially, since you're not using the idiomatic global patterns of a memory-safe language!) and then refactoring into something idiomatic for the language you're using. Projects like Firefox are basically taking a similar approach, only "rewriting" small portions of the codebase that can be deployed immediately once rewritten. Where similar tools might be useful is for preventing logic-related issues that are not encompassed under simple memory safety. Unfortunately it's still not possible to endow, e.g. Rust code with automatically-checkable proofs, showing that the logic in the code preserves some appropriate conditions/invariants; while this is feasible, e.g. in Agda or Idris. Hopefully by the time these concerns become pressing, practical memory-safe languages will also offer this.
- pron 7y agoWhen you want to verify functional properties these tools are not easy to use. For safety, they are easier than a rewrite and largely automatic. Large, sensitive codebases have been verified (for undefined behavior, not functional correctness) relatively quickly. In general, they cover more ground significantly more quickly and cheaply than a rewrite.
- titzer 7y ago> are sound static analysis tools that guarantee no undefined behavior in C programs Proof left as an exercise for the reader, maybe? Seriously, UB is a very, very pernicious problem and without a formal specification of C/C++ and a machine-checked proof that this analysis is sound and complete, I am not going to believe it. The academic research community still regards this as an unsolved problem. (It's a shame, too. With UB, we did this to ourselves.)
- pjmlp 7y ago> Most of the C and C++ code that causes the majority of open source CVEs is shipped in Linux distributions. On what is usually a very strict patch review process, with kernel sanitizers and yet....
- masklinn 7y agoAFAIK most of the CVEs are not for the kernel itself (and the article doesn't say anything about replacing or rewriting the kernel itself), it's for everything that's built upon it. That's also a point Brian Cantrill makes in one of his talks: > the safety argument just doesn't carry as much weight for kernel developers, not because the safety argument isn't really, really important. It's just because it's safe, because when it's not safe, it blows up, and everyone gets really upset. We figure out why. We fix it. And we develop a lot of great tooling to not have these problems.
- pjmlp 7y agoGoogle has a talk where they mention 68% of them are. That is why they started the Kernel Self Preservation Project and have been sponsoring cleaning the kernel from C bad practices like VLAs.
- rlpb 7y ago> Cut down your dependencies on Linux distributions. I think the author has this backwards. Distributions don't play language favourites[1], and distributions like Debian celebrate the packaging of alternatives to give users choice. The author is right in observing that most C code is shipped by distributions and not elsewhere for packaging reasons, but then later inverts the causal relation. If good replacements for components [that are currently] written in C appear, then distributions will package them, and the author's problem will go away. [1] Except that distributions dislike toolchains that embed libraries into builds instead of dynamically linking them, since then they can't issue a security update for a library just by updating that library; a world rebuild is required. This isn't a language or safety issue though, and could easily be changed without changing the language. For example, gcc's golang implementation supports shared libraries now.
- pjmlp 7y agoProbably someone can post a link to this, as it doesn't seem to exist anymore. The GNU project used to have a manifesto page from the early days stating that C should be the preferred language to deliver GNU software, except in cases where it did not made sense like libraries for other languages, followed with a list of endorsed alternative languages.
- rlpb 7y agoPerhaps that's because it made sense back then, but makes less sense now? :)
- pjmlp 7y agoIt only made sense in the context of cloning UNIX software and its relation to C. Regarding safety it never made sense. Morris worm is now around 30 years old and lint was designed in 1979, with the expectation that every C developer would actually use it.
- rlpb 7y ago> Regarding safety it never made sense. What suitable and sufficiently performant languages existed back then?