OpenSIPS 4.0.3 ChangeLog
OpenSIPS 4.0.3 is a maintenance release for the 4.0 stable branch, bringing TCP and TLS stability fixes, parser and input safety improvements, dialog, B2B and SIPREC corrections, RTP handling fixes, and safer SIP capture.
This release includes fixes for buffer overflows, out-of-bounds access, memory corruption and concurrency issues. Upgrading is strongly recommended.
This changelog summarizes changes since 4.0.1. Related fixes are grouped by subsystem; release mechanics and documentation-only changes are summarized.
Core, Memory and TCP Stability
- Prevented duplicate TCP read jobs and fixed reactor state races that could leave connections without further I/O notifications. a94a500d53 0fc94bfa69 5c927bf39b
- Removed connection descriptors from the reactor before closing them and guarded connection lookups after TCP shutdown. e6ec990c71 f6dfdd921c
- Fixed physical fragment links after defragmentation in the f_malloc memory allocator. bb3cc4a509
- Bounded socket string construction, including long advertised hostnames and socket tags, to prevent startup buffer overflows. eee38ce0e4
- Reset TCP tracing state before each send and reported the correct ports and connection ID when TLS writes are queued during async connection establishment. 96dd2de16d 91a381c3e6
- Improved file descriptor closing during daemon startup and freed time recurrence allocations. f9547d8350 9da286664c
Parsing and Input Safety
- Fixed multipart body parsing bounds and negative body-part length calculations. b68c13842d dc573ad742
- Handled commas and escaped characters in quoted Via parameter values, rejecting truncated or invalid quoted escapes. 45eba68d3c 5a0ac62d8a
- Bounded lookahead when parsing Supported option tags, Session-Expires refresher parameters and escaped URI user characters. b1a0cba415 30df5c4f23 c6773972e4 0c81bc36e1
- Rejected B2B keys with hash indices outside the target dialog table and corrected Contact parameter and Call-Info header size checks. 0e4c93bd50 3282dc3cf4 6296f33df1 fd508f10c1
- Validated ISUP parameter lengths, MSRP To-Path header ordering and Identity header copy lengths. 352def5438 a8ad43e032 5ba06bf2e7
- Rejected oversized XMPP URI and Jabber conference presence addresses, and kept domainpolicy destination URI buffer lengths consistent. 728ed6fc51 92c254efe7 17e16a0302 739ceb11a0
- Fixed an out-of-bounds read in RTPProxy DTMF tags and validated SDP connection IP lengths in sngtc. 6d9c295411 cef86c4c8b
TLS and WebSocket Handling
- Built and freed TLS contexts in TCP main during tls_mgm reloads, and kept TLS domain destruction in that process, preventing access to another process's private OpenSSL allocations. ef704fca24 3c419a6b27
- Waited for TLS handshake completion before further WSS I/O. 59b0dd9d28
- Protected WebSocket handshake header cleanup with the parsing lock to prevent concurrent package-memory corruption. 55e1391462
- Handled CRLF keep-alives in WebSocket messages and included the peer address in failed server handshake logs. 923052db7d b9447db39c
Dialog, B2B and SIPREC
- Used the callee leg's INVITE CSeq for the initial ACK, including auto-PRACK and authentication flows, and stored re-INVITE CSeq maps on the source leg. 73fc2bb050 0b30b38253
- Handled dialog callbacks without a processing context and treated replicated values for missing dialogs as a no-op. ef2d8aba9b 549787ef6e
- Gave each early B2B dialog its own UPDATE transaction, routed indexed PRACK/UPDATE requests to the owning peer, and timed out incomplete UPDATE/PRACK transactions. 5fa4e62718 c910ce1b68
- Kept rebuilt B2B SIP buffers owned by the message, avoiding copies into undersized receive buffers. 1845942eb4
- Fixed B2B client dialog access after sending a request, copied callback keys before unlocking, and avoided lock inversion through local routes. 8f70630632 2c89d93f95 e868bc6356
- Protected B2B SDP demultiplexing structures during callbacks and stream release, allowed reply-route body changes in b2b_logic, and corrected B2B ACK tracing. 7bdbb2677e 561b8a7d0f 89d38cbe62 60272f02a2
- Kept SIPREC contexts alive until dialog destruction, held session references through request processing, and released sessions when the recording server answered after the call ended. 3ebcf71063 a4ad1aa06c 1c26a338fe
- Avoided a SIPREC context lock self-deadlock. a8f45a5ee8
- Preserved Contact header syntax in topology hiding and stored socket tags where available so peer nodes can decode socket information. 8472c4a642 ed62c1e8ad
RTP and Media Handling
- Fixed RTP relay context reference ownership, including stateless replies after engagement, in-dialog callbacks and B2B tuples. a592623e6c c2b7d862b1 ceb044fabd
- Kept the all-branches RTP session across a failed branch, allowed B2B engagement without a dialog, and gave callers their own copy of the route engine body. 1019cf377d 67a474a89a 0f6e253d46
- Fixed rtpengine/bencode heap corruption, descriptor cleanup and out-of-memory handling. 4c57e1df90
- Restored the rtpengine from-tag on delete, avoided unknown no-from-tag arguments and preserved unchanged relay nodes. e383c6b9b8 9c0d1af4b7 0b1eecf115
- Corrected media-exchange leg selection and SDP pseudo-variable logging. 83f13f816f a023b9b572
Transactions, Registration and Presence
- Serialized reply lump access in t_reply_with_body(), fixed transaction lump leaks across async/failure routes, and fixed shared script-route reference double frees. 3d2f22cb36 9a9e20d25f 28495a105e 4143afd2fb
- Suppressed later async resume attempts for jobs that had already fallen back to synchronous execution. f76eae0e03
- Randomized registrar expiration values within the allowed band, avoiding concentrations at min_expires and max_expires. 482e5657bb
- Fixed pua_dialoginfo dangling branch cleanup and synthetic reply handling, preserved answered branches, and honored custom callees and branch muting during cleanup. a1225abf17 cffc075b9b 47cdc881e7 0fd3b8c4f3
- Fixed sca_engage() calls without parameters and reduced spurious usrloc replication errors for empty key/value data. 87104d3286 6e57950ff6
SIP Capture and HEP Safety
- Escaped string/blob values in batched async capture inserts, corrected report column counts and kept PostgreSQL query strings terminated. c853650ab7
- Bounded batched capture queries and corrected capture column indexing. ed46c82f61
- Kept RTCP report Event data alive until storage, validated its type and checked custom HEP chunk lengths before typed reads. 7adb7d6a7d
- Bounded rebuilt HEP relay packets and used a separate relay buffer to avoid overlapping payload copies. 71a060f153
- Freed decompressed HEPv3 payloads. aff1540e1a
Module Fixes, Builds and Documentation
- Used thread-safe allocation in AAA Diameter worker callbacks and restricted cJSON shared-memory hooks to operations requiring them. 447644f330
- Fixed SQL cache reload-version initialization races and masked database URL passwords in sqlops connection errors. 39f37d5f7a a841131d18
- Fixed CGRateS busy loops on EAGAIN and empty session tag persistence, and handled accounting callbacks without a processing context. 118b954e17 75341438c4 5bb54af333
- Fixed Kafka send-job double frees and RabbitMQ persistent event publishing and broken stream cleanup. 2327b9b0b5 72393a43a0 ab5249a13c
- Exposed JSON booleans as integer values while preserving the existing true/false string representation. b7f709a458
- Stripped RFC 4904 user parameters from STIR/SHAKEN telephone numbers and avoided duplicate Identity parse-error cleanup. 1c43dd50ee 917eda33ef
- Corrected AKA authentication vector sizing, bounded Redis subkey argument arrays and initialized the domain subdomain column with its own length. 83f13f816f b9c291a3d7
- Fixed libmicrohttpd version detection, supported legacy MongoDB headers and corrected radcli builds and MySQL packaging dependencies on EL10. 5600508ad0 2ff23596e5 3d699cf791 b9a1844490
- Corrected out-of-range tracing log-level handling and refreshed module documentation names, parameter types, examples and references; documented the MI version revision parameter. 394be9e32f 03815d31d2 13a7ccd9b6 64fe397f7e ad4b055a33