Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

pymssql/pymssql
master @ 1daf3b9
6
Fixes
0
CVEs
HIGH
Peak severity
Highlights
Denial of Service: 4 prior fixes. Scrutinize any change in this area.
_mssql.pyx: most-fixed (3 issues). Treat as high-risk during review.
2 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.

Buffer Overflow: Unbounded string formatting operations using unsafe C functions can lead to stack and heap buffer overflows when processing SQL error messages or formatted values. Developers must consistently enforce explicit size bounds via snprintf.
Denial of Service: Using an incorrect type size (such as 'long' instead of 'PY_LONG_LONG') when allocating memory for binding 64-bit SQLINT8 values can lead to out-of-bounds writes and memory corruption, particularly on 32-bit platforms.
Denial of Service: Failing to free allocated C-level attributes during connection deallocation or failure flows creates persistent memory leaks that exhaust resources. Correct usage of Cython's __dealloc__ hook is necessary.