Security context

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

freeswitch/sofia-sip
master @ 7333682
15
Fixes
5
CVEs
CRITICAL
Peak severity
25.0%
Coverage
Highlights
Buffer Overflow: 3 prior fixes. Scrutinize any change in this area.
libsofia-sip-ua/tport/tport_tls.c: most-fixed (4 issues). Treat as high-risk during review.
9 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.

Broken Cryptography: The TLS implementation historically bypassed identity and trust boundaries by hardcoding a successful verification status (always returning true) in its verification callback, and by transmitting payload data before completing the TLS handshake. This completely undermined the authenticity and confidentiality guarantees of the transport layer.
Heap-based Buffer Overflow: Parsing of Session Description Protocol (SDP) and STUN messages has historically lacked boundary checks. This results in severe heap overflows, as evidenced by CVE-2022-31003 and related fixes where record attributes are accessed via direct index offsets without first validating the message length.
Memory Safety: Session termination and ACK processing in Sofia-SIP are susceptible to double-free and use-after-free vulnerabilities. These stem from incorrect deallocation order and reference counting issues during client request cleanup.