Highlights
Memory Safety: 6 prior fixes. Scrutinize any change in this area.
diesel_cli: most-fixed (3 issues). Treat as high-risk during review.
7 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns
The bug types that recur here, drawn from past fixes, not open vulnerabilities.
Memory Safety: The integration with sqlite3_column_name introduced a critical Use-After-Free vulnerability (CVE-2021-28305) because the lifetime of returned pointers was not correctly tied to statement stepping and finalization. Failing to cache pointers on first step can allow invalid memory access.
Memory Safety: Improper handling of SQLite statement bindings and early return errors allowed bound parameters to be dropped before execution, leading to Use-After-Free risks. Linking statement lifetimes explicitly to bind lifetimes and utilizing explicit unbinding mechanisms is critical.
Buffer Overflow: Structural size mismatches and unaligned raw buffer reads (e.g. reading MysqlTime from raw buffers without validating that the buffer size is sufficient) can lead to out-of-bounds reads and memory corruption when interfacing with libmariadb.