Skip to content

sqlite: reject busy statement finalization in authorizer - #65369

Open
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:sqlite-authorizer-finalize-statement
Open

sqlite: reject busy statement finalization in authorizer#65369
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:sqlite-authorizer-finalize-statement

Conversation

@trivikr

@trivikr trivikr commented Aug 18, 2026

Copy link
Copy Markdown
Member

Fixes: #65368

An iterator can leave a statement active between sqlite3_step() calls. Finalizing that statement from an authorizer callback can release its locks and change the outcome of the statement being authorized.

Reject close() and Symbol.dispose when the statement is busy and the connection is in an authorizer callback. Continue allowing idle statements to be finalized.


Assisted-by: codex:gpt-5.6-sol

An iterator can leave a statement active between sqlite3_step() calls.
Finalizing that statement from an authorizer callback can release its
locks and change the outcome of the statement being authorized.

Reject close() and Symbol.dispose when the statement is busy and the
connection is in an authorizer callback. Continue allowing idle
statements to be finalized.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: codex:gpt-5.6-sol
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/sqlite

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. sqlite Issues and PRs related to the SQLite subsystem. labels Aug 18, 2026
@trivikr trivikr added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 18, 2026
@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.12%. Comparing base (92ee8b7) to head (25f57ec).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65369      +/-   ##
==========================================
- Coverage   90.15%   90.12%   -0.03%     
==========================================
  Files         752      752              
  Lines      251884   251886       +2     
  Branches    47368    47376       +8     
==========================================
- Hits       227078   227009      -69     
- Misses      16164    16182      +18     
- Partials     8642     8695      +53     
Files with missing lines Coverage Δ
src/node_sqlite.cc 82.14% <100.00%> (-0.03%) ⬇️
src/node_sqlite.h 86.00% <ø> (ø)

... and 37 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. request-ci Add this label to start a Jenkins CI on a PR. sqlite Issues and PRs related to the SQLite subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sqlite: authorizer can finalize another active statement and change outer statement outcome

2 participants