SQLite: Vulnerabilities
sqlite.org
sqlite.org
SQLite definitely still has advantages as a file format, but it would nice if there was bit more consistency in their messaging.
[0]: https://www.sqlite.org/appfileformat.html [1]: https://www.sqlite.org/security.html#untrusted_sqlite_databa...
Of course if that storage is swapped among untrusted users, additional scrutiny is needful.
Size (MB) Quick (s) Integrity (s)
8 0.061 0.47
76 0.39 1.8
582 2.8 13.
2926 14. 79.
I tried my best to do the measurements with a cold filesystem cache, but this is by no means rigorous. For example, the databases for this test are roughly similar in schema and they all consist of many small rows. Few big rows might perform very differently.Ultimately CVEs are numbers given to a certain vulnerability. It helps so two people know they're talking about the same thing. A typical usecase would be that you have a security scanner that tells you your server is vulnerable to CVE-xxxx-xxxx and you can check the changelog of your server software which version fixes that.
A CVE does not mean that a vulnerability is particularly important. It doesn't mean it's relevant for your use case. And a lot of CVEs does not mean the person who found them achieved something of significance.
From a security perspective it makes sense to treat vulnerabilities that are minor and only relevant for rare use cases (or in combionation with other bugs) as vulnerabilities. But when you start counting vulnerabilities as achievements this distorts things. Plenty of shady security companies and research institutions making "statistics" about CVEs don't help either.
> CVS-2019-19317 is an excellent example of a bogus CVE. This CVE describes a bug in an unreleased development version of SQLite. We were working on the new generated columns feature of SQLite, and a third-party hacker found an error in the code under active development, and then wrote a CVE against it. The error was fixed before the problem was ever released, and yet still there is this CVE sitting out there, unresolved, and as far as I can tell unresolveable.
Lot's of great related discussion from drh in this[0] sqlite forum thread.
I've more than once discovered an in-development version of a library I'm working on appear as a package in Debian, for example. Suddenly I'm feeling responsible to maintain backward compatibility with an unreleased version because it's now "released" as far as users go. Of course what happened is that I asked the maintainers to remove it and then they never packaged any new versions of my software because of the interpersonal friction it caused.
Makes sense.
Reminds me of a story about people growing snakes so they can then kill them and report the killing and get a reward for it.
The term "cobra effect" was coined by economist Horst Siebert based on an anecdote of an occurrence in India during British rule. The British government, concerned about the number of venomous cobras in Delhi, offered a bounty for every dead cobra. Initially, this was a successful strategy; large numbers of snakes were killed for the reward. Eventually, however, enterprising people began to breed cobras for the income. When the government became aware of this, the reward program was scrapped. When cobra breeders set their now-worthless snakes free, the wild cobra population further increased.
Incentives work.
The title was updated today in response to one of the posts above.
A fair critique of C in sqlite would also question whether C is a key factor in sqlite's success.
I don't know the answer to that, only that "X hinders" has to be weighed against "X helps".
If only we knew whether it is a strong data point pro or contra C.
Essentially, if SQLite is not recommended for use which allows remote user use cases - there’s a lot less to worry about.