by ndesaulniers · 7y ago · 0 comments
Current static analyses are imprecise, while dynamic analyses require actual execution which can be difficult.
Modern research is looking to combine the two. Rather than brute force fuzzing (dynamic analysis), static analyze the source to better mutate the input to a few potentially interesting cases.
I would go so far as to say in any non-trivial codebase it's virtually impossible to avoid introducing a bug of this nature. SQLite is probably the codebase that has the highest chance of being safe from this, due to its extremely thorough test suite and amount of fuzzing that's been done, but even that codebase was found to have a significant bug (I forget the details) in one of the optional first-party extensions, as that extension did not have the same rigorous test suite that the SQLite core did.
To be clear, when I say thorough test suite, IIRC SQLite's test suite has 3x as many lines of code as the code being tested. And I think there's some sort of instrumentation to ensure the test suite covers every single code path.
Actually it has a shocking 662x as many lines of tests as it has code[1].
I agree though, SQLite is an amazing piece of software.
It’s kind of testing every possible valid, invalid and malicious input the program can take in.
Gets even crazier with race conditions and such.
Testing is really hard. And given how many companies skip on testing I am led to believe security is a myth. There’s gonna be someone somewhere with an exploit getting your info.
C++? In C++ that means take C, make it better but use the original.
Give me a strongly typed language and check for overflows and the like!