News for hackers. Stuff that matters.
Re:Offline First by vbitz on Wednesday September 29, 2021 @02:15AM (#28690778)
It sounds pretty safe. Your only copying rows from one database into another database. Unless you accept arbitrary SQL strings from the user it's not a significant security risk.

It does open up some possible vulnerabilities like can the user overwrite other people's information but mitigating that requires the same validation layer you should have anyway.

Re:Offline First by vlovich123 on Wednesday September 29, 2021 @02:27AM (#28690837)
SQLite is explicitly not safe to be used on arbitrary DB files and there’s a nontrivial amount of exploits on it from DOS to heap overflows to remote code execution that stem from untrusted SQL queries or processing untrusted DB files [1].

At a minimum you have to follow [2] but you don’t get to say “it’s safe to open malicious files or process unrelated queries“ and “SQLite has a good security track record because all our CVEs are only from untrusted queries and malicious input files and CVEs are useless anyway“. Those are facially contradictory positions likely written by different team members that reflect their individual perspective rather then there being a well thought or security stance (at least in my opinionated viewpoint).

[1] https://www.sqlite.org/cves.html

[2] https://www.sqlite.org/security.html

Re:Offline First by smackeyacky on Wednesday September 29, 2021 @02:41AM (#28690895)
I do have a few of these in my importer but thanks for the links, will be implementing a few more of these safety measures.
Re:Offline First by smackeyacky on Wednesday September 29, 2021 @02:24AM (#28690827)
Exactly. It won't overwrite stuff that isn't yours, everythin is in a silo in the database.
Re:Offline First by tehbeard on Wednesday September 29, 2021 @03:21AM (#28691108)
As another comment pointed out, it's more dealing with carefully crafted db files that trigger issues or exploits, like a zipbomb would for archive processing.