2 ms·
> There are bugs in the code--probably in your code--right now. Some might be CVEs because of how little guarantees you have when you stumble into UB. Pick any
by lenkite 4y ago
> There are bugs in the code--probably in your code--right now. Some might be CVEs because of how little guarantees you have when you stumble into UB.
Pick any medium/large project written in any language that hasn't undergone extensive formal verification+testing and this statement will likely be true.
- tialaramex 4y agoThis won't quite be true for Safe Rust because it doesn't have Undefined Behaviour. So while it's possible there are bugs, and it's possible those are security bugs, they can't be caused by UB as they would often be in C++. Your program had defined behaviour - it's possible this behaviour wasn't what you intended, but it's what you wrote. A lot of cases which might invoke UB in C++ will just be a Denial of Service in Rust, as you panic because an unhappy path wasn't catered for properly in your software and most likely your panic handler just terminates the program. That DoS might still be a CVE, but it's probably not the severity you'd have seen for the equivalent C++ bug.