sqlite: add permission model checks to DatabaseSync#62957
Open
mcollina wants to merge 1 commit intonodejs:mainfrom
Open
sqlite: add permission model checks to DatabaseSync#62957mcollina wants to merge 1 commit intonodejs:mainfrom
mcollina wants to merge 1 commit intonodejs:mainfrom
Conversation
Collaborator
|
Review requested:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #62957 +/- ##
==========================================
- Coverage 89.65% 89.65% -0.01%
==========================================
Files 676 706 +30
Lines 206578 219401 +12823
Branches 39562 42073 +2511
==========================================
+ Hits 185216 196709 +11493
- Misses 13475 14577 +1102
- Partials 7887 8115 +228
🚀 New features to boost your workflow:
|
Add permission model enforcement to DatabaseSync::Open(). File-backed databases now check kFileSystemRead (readOnly) or kFileSystemWrite (read-write) before calling sqlite3_open_v2. In-memory databases (:memory:) are exempt. Refs: https://hackerone.com/reports/3686625
8ffad93 to
877530d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add permission model enforcement to
DatabaseSync::Open().kFileSystemRead(readOnly) orkFileSystemWrite(read-write) before callingsqlite3_open_v2.:memory:) are exempt.Known limitation:
db.exec()withATTACH DATABASESQL can still access arbitrary files at runtime. This would require parsing SQL to interceptATTACHstatements. Should we address that in this PR or a follow-up?