canonical / dqlite

Embeddable, replicated and fault-tolerant SQL engine.
https://dqlite.io
Other
3.83k stars 216 forks source link

Segfault in gateway.c:FAIL_IF_CHECKPOINTING #466

Closed cole-miller closed 6 days ago

cole-miller commented 1 year ago

Fuzzing revealed a segfault on this line:

https://github.com/canonical/dqlite/blob/e618e62985de2f8d584ef2902977b2ed00ce9d19/src/gateway.c#L157

Looking at the situation in GDB, it appears that _file->pMethods can be NULL. The FAIL_IF_CHECKPOINTING in question is the one in handle_query_sql.

cole-miller commented 1 year ago

This can also happen in handle_exec_sql.