Live data from Hacker News

Remote code execution vulnerability in SQLite

blade.tencent.com

41–50 of 161 posts

Re: Remote code execution vulnerability in SQLite

#41

An RCE in a non-networked component is interesting (in other words, obvious hyperbole). Either this is your usual corruption bug/vuln triggerable in some/many programs using SQLite, or an actual bug in SQLite itself, e.g. query preparation (a fix/workaround being committed to SQLite doesn't necessarily imply one or the other). Whether the RCE hyperbole is justified remains to be seen. Edit: Apparently the exploit vec…

[deleted]

Re: Remote code execution vulnerability in SQLite

#42

SQLite is the most thoroughly tested codebase I'm aware of [1]. It has seven times more test code than non-test code. 100% branch coverage. If even SQLite can have a RCE vulnerability, I'm convinced that it is not feasible for anybody to write safe C code. [1] https://www.sqlite.org/testing.html

100% branch, line coverage means nothing. It's about logical coverage. What are you testing for? You are not testing lines of code, but logic.

This is exactly why I don't find code coverage tools useful. Now, a tool that can show what the tests assert against? THAT would be useful.

Re: Remote code execution vulnerability in SQLite

#43

SQLite is the most thoroughly tested codebase I'm aware of [1]. It has seven times more test code than non-test code. 100% branch coverage. If even SQLite can have a RCE vulnerability, I'm convinced that it is not feasible for anybody to write safe C code. [1] https://www.sqlite.org/testing.html

SQLite can by principle not suffer from a RCE.

Not sure why this is being downvoted, but you're correct. Now, a networked application that exposes some level of access to sqlite? That's another story. The question I think we all are asking is just how much "leg" does sqlite have to show to be vulnerable?

Re: Remote code execution vulnerability in SQLite

#44

SQLite is the most thoroughly tested codebase I'm aware of [1]. It has seven times more test code than non-test code. 100% branch coverage. If even SQLite can have a RCE vulnerability, I'm convinced that it is not feasible for anybody to write safe C code. [1] https://www.sqlite.org/testing.html

100% branch, line coverage means nothing. It's about logical coverage. What are you testing for? You are not testing lines of code, but logic.

Isn't that the definition of branch testing, to test all possible branches within code and also testing the logic in all of those branches?

Re: Remote code execution vulnerability in SQLite

#45
post #42

Earlier quoted context omitted.

100% branch, line coverage means nothing. It's about logical coverage. What are you testing for? You are not testing lines of code, but logic.

This is exactly why I don't find code coverage tools useful. Now, a tool that can show what the tests assert against? THAT would be useful.

What you’re describing sounds very similar to “mutation” testing. https://en.m.wikipedia.org/wiki/Mutation_testing

Re: Remote code execution vulnerability in SQLite

#46
post #39
post #13

Earlier quoted context omitted.

They mention the example of browsing to a web page. Not quite a fully fledged remote execution bug but close enough. I think what they're really saying is they're aware of remote execution cases. An example of that might be a web services that's backed by a SQLite query.

JavaScript code has access to SQLite. So any webpage where the attacker controls/can inject JavaScript is vulnerable.

Firefox has never supported WebSQL...

Re: Remote code execution vulnerability in SQLite

#47
post #44

Earlier quoted context omitted.

100% branch, line coverage means nothing. It's about logical coverage. What are you testing for? You are not testing lines of code, but logic.

Isn't that the definition of branch testing, to test all possible branches within code and also testing the logic in all of those branches?

Consider a line like:

    value = 1 / input;
You can get "100% coverage" if you test that with `input = 1`, but unless you check with `input = 0` you're missing a quite important logical check.

Re: Remote code execution vulnerability in SQLite

#48
post #44

Earlier quoted context omitted.

100% branch, line coverage means nothing. It's about logical coverage. What are you testing for? You are not testing lines of code, but logic.

Isn't that the definition of branch testing, to test all possible branches within code and also testing the logic in all of those branches?

You test all possible executions of your program when you test with all possible data inputs, which is infinite.

Re: Remote code execution vulnerability in SQLite

#49
post #36

Remote implies it can be accessed remotely, is that true, or did they mean “remote if an attacker can remotely send data to SQLite”?

Sounds like they mean “remote” because chromium uses SQLite and JavaScript loaded into your machine comes from a remote source. So because a website can run JS that can exploit chromium they’re calling it an RCE.

Re: Remote code execution vulnerability in SQLite

#50

SQLite is the most thoroughly tested codebase I'm aware of [1]. It has seven times more test code than non-test code. 100% branch coverage. If even SQLite can have a RCE vulnerability, I'm convinced that it is not feasible for anybody to write safe C code. [1] https://www.sqlite.org/testing.html

Or lets wait and see what the bug is and why it wasn't detected in the testing coverage.
Post reply on HN