3 ms·
Why do You think creating a browser in a 'safe' language would prevent security bugs from occurring?
by Xeamek 2y ago
Why do You think creating a browser in a 'safe' language would prevent security bugs from occurring?
- hollerith 2y agoBecause 70% of the security holes in C code bases tend to be things that never happen in a memory-safe language.
- Xeamek 2y agosource?
- dist1ll 2y agoFrom the chromium website > Around 70% of our high severity security bugs are memory unsafety problems (that is, mistakes with C/C++ pointers). Half of those are use-after-free bugs. https://www.chromium.org/Home/chromium-security/memory-safety/ https://www.chromium.org/Home/chromium-security/memory-safet...
- rvz 2y agoI mean, it doesn't get any more clearer that the Chromium team is already considering integrating Rust in Chromium to mitigate these sort of memory corruption vulnerabilities found in C and C++ and that is the main motivation here. [0] Given that Ladybird is yet another C/C++ browser, it will be riddled with these vulnerabilities waiting to be exploited. I don't think many here are thinking about the costs involved with security fixes and maintenance, at it is in the hundreds of millions of dollars a year just to keep up with Firefox alone. That is the minimum requirement for any serious competing browser. There's a clear reason why Chrome, Safari and Firefox need hundreds of millions of dollars of developer maintenance a year. [0] https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/rust.md#why https://chromium.googlesource.com/chromium/src/+/refs/heads/...
- dtx1 2y agoNice Strawman. My Argument is that it takes likely 10s of millions of dollars to secure a large CPP Browser from the metric shitload of memory safety issues the average C/CPP Programmer leaves behind. If you want to compete with Google, either you use a memory safe language and spend your time securing the other millions of security issues that arise from writing a web browser or you waste time and money to build something no one in their right mind should be using for anything given the state of the modern web.
- marcus0x62 2y agoIt might prevent 70%[0] or so of exploitable bugs. Which is better than C++, which, after almost 40 years of effort, continues to be the source of most of that 70% in the first place. 0 - https://www.zdnet.com/article/microsoft-70-percent-of-all-security-bugs-are-memory-safety-issues/ https://www.zdnet.com/article/microsoft-70-percent-of-all-se...
- Xeamek 2y agoThat's really great that you are quoting a generalized stat, but we are taking about browsers here, which are inherently runtimes allowing anyone to run anycode they want. Just saying 'c++ bad' isn't really a serious analysis...
- timeon 2y agoAre you suggesting that decreasing surface area is not worth it?
- marcus0x62 2y agoSaying that super complex C++ code bases are less exposed to memory safety issues is what is not a serious argument. Have a nice day. Edit: here's a report from the Chromium team, if that makes you feel any better. It reports similar figures. https://www.chromium.org/Home/chromium-security/memory-safety/ https://www.chromium.org/Home/chromium-security/memory-safet...
- zihotki 2y agoIt won't prevent all, but may prevent many. Quote: If you have a very large (millions of lines of code) codebase, written in a memory-unsafe programming language (such as C or C++), you can expect at least 65% of your security vulnerabilities to be caused by memory unsafety. The quote is from https://alexgaynor.net/2020/may/27/science-on-memory-unsafety-and-security/ https://alexgaynor.net/2020/may/27/science-on-memory-unsafet...