Buffer overflow in Database.run()
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 13.7k
- フォーク
- 1.1k
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
If a large enough string (in my case, 5k INSERT statements) is passed to the Database run() function, this leads to a buffer overflow and some kind of memory corruption. Afterwards, all sql.js functions fail with a memory access out of bounds error.
Either the input length should be unlimited, or the limit should be well documented and better handled to avoid memory corruption.
My workaround is to split into individual statements and run one at a time, which runs a bit slower due to the added overhead.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Start from the documented Database.run() function and reproduce the failure with a large input containing about 5,000 INSERT statements. Trace how the input is handled until the memory access error occurs; done means the input no longer causes memory corruption, or any remaining limit is safely handled and documented.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, sqlite, wasm
- 領域
- databases
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100