by madmax96 · 6y ago · 0 comments
>Programs written in the language often have security bugs arising from the language’s lack of memory safety.
How often?
“Have things changed now?: an empirical study of bug characteristics in modern open source software” suggests that 8.8-17.2% of security bugs are caused by memory bugs. How many of these can be caught by better testing?
I think the effects of memory bugs on security are often overstated.
https://www.zdnet.com/article/microsoft-70-percent-of-all-se...
> In fact, a brand new project could probably reach 0 (or very close to it) memory bugs in C++ by following modern testing practices and using the variety of dynamic and static analyzers that exist today.
A bold claim to offer without evidence. Unfortunately even the best organizations have so far failed to achieve this.
Right. If you look at the linked article, the Microsoft Engineer claimed 70% of security bugs in Microsoft products are caused by memory errors. Does Microsoft apply the same tools to all their products or only Windows? Do these tools even exist for other products?
> A bold claim to offer without evidence.
If one writes a new C++ program, tested with > 75% code coverage, tested with valgrind, the program passed coverity checks and clang static analysis, and they followed the best practices for hardening the host kernel, and told me that they still had an exploitable memory bug, I would be surprised. Notice that performing all those steps is still less effort than learning Rust and building the program in that. And you’d still have to harden your kernel and test anyway.
The evidence? NGINX and Linux is written in C. If the situation was so dire, why isn’t every computer in the world compromised right this second?
https://www.youtube.com/playlist?list=PLbzoR-pLrL6rF8E5yyknJ...
Plenty of tasty material how Linux ecosystem has benefited from the improvements made by the research community.
I also think that a percentage is a weak indicator in general. With bug bounties we're seeing a massive influx of vulnerability reports for exposed APIs - this is almost always XSS and CSRF. I am not discounting the impact of those vulns, only saying that percentages are very market driven.
How often?