Security context

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

python-sip/sip
main @ b7a14f4
8
Fixes
0
CVEs
HIGH
Peak severity
Highlights
Memory Corruption: 2 prior fixes. Scrutinize any change in this area.
siplib/siplib.c.in: most-fixed (3 issues). Treat as high-risk during review.
5 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 Corruption: Parser desynchronization during signature verification can cause the va_list state to drift from the format string, reading uninitialized or mismatched types from the stack. Developers must ensure that every format character is handled to skip arguments properly even if optional keyword arguments are missing.
Use After Free: Pointers to Python objects held by C++ instances are highly prone to race conditions and Use After Free (UAF) vulnerabilities during object destruction. To prevent this, pointers must be tested, cleared, and set to NULL strictly under the protection of the Global Interpreter Lock (GIL).
Format String Vulnerability: Misalignments between format specifiers (e.g., %s, %S) and actual argument types (e.g., passing integer argument numbers instead of names) inside PyErr_Format can lead to crash conditions or arbitrary code execution.