summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-11-09chan_pjsip.c: Fix uninitialized cause value on failure.Richard Mudgett
Change-Id: I3f9dd3c31bd582e54a30381500077de2319d8cc3
2017-11-09Merge "res_pjsip_history: Fix multiple leaks on vector append failure." into 13Joshua Colp
2017-11-08Merge "res_pjsip_pubsub: Fix multiple leaks on failure to append vectors." ↵Jenkins2
into 13
2017-11-08Merge "AST-2017-009: pjproject: Add validation of numeric header values" into 13George Joseph
2017-11-08Merge "AST-2017-011 - res_pjsip_session: session leak when a call is ↵George Joseph
rejected" into 13
2017-11-08Merge "AST-2017-010: Fix cdr_object_update_party_b_userfield_cb() buf ↵George Joseph
overrun" into 13
2017-11-08Merge "res_pjproject.c: Fix ast_strdup() alloc failure." into 13Jenkins2
2017-11-08Merge "res_pjsip_outbound_registration: Fix leak on vector add failure." into 13Jenkins2
2017-11-08AST-2017-011 - res_pjsip_session: session leak when a call is rejectedKevin Harwell
A previous commit made it so when an invite session transitioned into a disconnected state destruction of the Asterisk pjsip session object was postponed until either a transport error occurred or the event timer expired. However, if a call was rejected (for instance a 488) before the session was fully established the event timer may not have been initiated, or it was canceled without triggering either of the session finalizing states mentioned above. Really the only time destruction of the session should be delayed is when a BYE is being transacted. This is because it's possible in some cases for the session to be disconnected, but the BYE is still transacting. This patch makes it so the session object always gets released (no more memory leak) when the pjsip session is in a disconnected state. Except when the method is a BYE. Then it waits until a transport error occurs or an event timeout. ASTERISK-27345 #close Reported by: Corey Farrell Change-Id: I1e724737b758c20ac76d19d3611e3d2876ae10ed
2017-11-08AST-2017-010: Fix cdr_object_update_party_b_userfield_cb() buf overrunRichard Mudgett
cdr_object_update_party_b_userfield_cb() could overrun the fixed buffer if the supplied string is too long. The long string could be supplied by external means using the CDR(userfield) function. This may seem reminiscent to AST-2017-001 (ASTERISK_26897) and it is. The earlier patch fixed the buffer overrun for Party A's userfield while this patch fixes the same thing for Party B's userfield. ASTERISK-27337 Change-Id: I0fa767f65ecec7e676ca465306ff9e0edbf3b652
2017-11-08AST-2017-009: pjproject: Add validation of numeric header valuesGeorge Joseph
Parsing the numeric header fields like cseq, ttl, port, etc. all had the potential to overflow, either causing unintended values to be captured or, if the values were subsequently converted back to strings, a buffer overrun. To address this, new "strto" functions have been created that do range checking and those functions are used wherever possible in the parser. * Created pjlib/include/limits.h and pjlib/include/compat/limits.h to either include the system limits.h or define common numeric limits if there is no system limits.h. * Created strto*_validate functions in sip_parser that take bounds and on failure call the on_str_parse_error function which prints an error message and calls PJ_THROW. * Updated sip_parser to validate the numeric fields. * Fixed an issue in sip_transport that prevented error messages from being properly displayed. * Added "volatile" to some variables referenced in PJ_CATCH blocks as the optimizer was sometimes optimizing them away. * Fixed length calculation in sip_transaction/create_tsx_key_2543 to account for signed ints being 11 characters, not 9. ASTERISK-27319 Reported by: Youngsung Kim at LINE Corporation Change-Id: I48de2e4ccf196990906304e8d7061f4ffdd772ff
2017-11-08Merge "res_stasis: Fix multiple leaks." into 13Joshua Colp
2017-11-07Merge "res_pjsip_config_wizard: Fix leaks and add check for malloc failure." ↵Jenkins2
into 13
2017-11-07res_pjsip_pubsub: Fix multiple leaks on failure to append vectors.Corey Farrell
Change-Id: I68ece0073ea79667ca41eb10405f516f1d30d482
2017-11-07res_pjsip_history: Fix multiple leaks on vector append failure.Corey Farrell
Change-Id: I41e8d5183ace284095cc721f3b1fb32ade3f940f
2017-11-07Merge "res_pjsip: Fix leak on error in ast_sip_auth_vector_init." into 13Jenkins2
2017-11-07Merge "test_sorcery_memory_cache_thrash: Handle error from vector append." ↵Jenkins2
into 13
2017-11-07Merge "stasis: Release object if vector append fails." into 13Jenkins2
2017-11-07Merge "format_cap: Fix leak on AST_VECTOR_APPEND error." into 13Joshua Colp
2017-11-07Merge "Messaging: Report error on failure to register tech or handler." into 13Joshua Colp
2017-11-07Merge "CLI: Remove unused internal command." into 13Jenkins2
2017-11-07Merge "res_pjsip: Avoid crash when contact uri is empty string" into 13Joshua Colp
2017-11-07Merge "res_pjsip: Ignore empty TLS configuration" into 13Jenkins2
2017-11-07res_stasis: Fix multiple leaks.Corey Farrell
* res/stasis/app.c JSON passed to app_send needs to be released. * res/stasis_message.c: objects leak if vector append fails. Change-Id: I8dd5385b9f50a5cadf2b1d16efecffd6ddb4db4a
2017-11-07Merge "tcptls: Print notice when TLS is enabled but not configured." into 13Joshua Colp
2017-11-07res_pjsip: Avoid crash when contact uri is empty stringAaron An
Asterisk will crash if contact uri is invalid, so contact_apply_handler should check if the uri is NULL or empty. ASTERISK-27393 #close Reported-by: Aaron An Tested-by: AaronAn Change-Id: Ia0309bdc6b697c73c9c736e1caec910b77ca69f5
2017-11-07Merge "stasis: Remove silly use of RAII_VAR in stasis_forward_all." into 13Joshua Colp
2017-11-07Merge "stasis_channels.c: Remove a very silly RAII_VAR()." into 13Jenkins2
2017-11-07Merge "stasis/app.c: Optimize stasis_app_get_debug_by_name()" into 13Jenkins2
2017-11-07res_pjproject.c: Fix ast_strdup() alloc failure.Richard Mudgett
Change-Id: I74688038e7afe3a279359cce53aadb28ade51ead
2017-11-07Merge "Fix ast_(v)asprintf() malloc failure usage conditions." into 13Jenkins2
2017-11-07Merge "RTP Engine: Deal with errors returned from AST_VECTOR_REPLACE." into 13Jenkins2
2017-11-06res_pjsip_outbound_registration: Fix leak on vector add failure.Corey Farrell
Change-Id: I774b88b3c9da41edd4dc8d78f095481f52f2bd46
2017-11-06res_pjsip_config_wizard: Fix leaks and add check for malloc failure.Corey Farrell
wizard_apply_handler(): - Free host if we fail to add it to the vector. wizard_mapped_observer(): - Check for otw allocation failure. - Free otw if we fail to add it to the vector. Change-Id: Ib5d3bcabbd9c24dd8a3c9cc692a794a5f60243ad
2017-11-06test_sorcery_memory_cache_thrash: Handle error from vector append.Corey Farrell
Cleanup resources when we fail to append the vector and report test failure. Change-Id: I6eb41586fd11dee8c0dfe35e91cb465a4cab7298
2017-11-06res_pjsip: Fix leak on error in ast_sip_auth_vector_init.Corey Farrell
Change-Id: Ib0fc7a18f3135ca8990c3984c9e15f6d26e556e8
2017-11-06res_pjproject: Handle error from adding to the buildopts vector.Corey Farrell
Change-Id: I076c7bd207c7989a23005395ce1735392657be65
2017-11-06stasis: Release object if vector append fails.Corey Farrell
Change-Id: I3e5cc669169aab6175ddfaf7486edeaeb4fdcfb1
2017-11-06RTP Engine: Deal with errors returned from AST_VECTOR_REPLACE.Corey Farrell
Check for errors from AST_VECTOR_REPLACE and clean memory if needed. Change-Id: I124d15cc1d645f85a72a1279f623c1993b304b0b
2017-11-06Messaging: Report error on failure to register tech or handler.Corey Farrell
Message tech and handler registrations use a vector which could fail to expand. If it does log and error and return error. Change-Id: I593a8de81a07fb0452e9b0efd5d4018b77bca6f4
2017-11-06format_cap: Fix leak on AST_VECTOR_APPEND error.Corey Farrell
format_cap_framed_init can fail on AST_VECTOR_APPEND. This should report failure to the caller and clean the newly allocated frame. Change-Id: Ica0661235bf09497bf23d844ceb01f21b41a55b0
2017-11-06stasis: Remove silly use of RAII_VAR in stasis_forward_all.Corey Farrell
Change-Id: I46de4c968d40144d5b049966304ff66c1469fb65
2017-11-06CLI: Remove unused internal command.Corey Farrell
The internal CLI command "_command complete" was last used by Asterisk 0.2.0. Since then we've been using "_command nummatches" and "_command matchesarray". Change-Id: I682fe1e21a24a3bb5bd04146e639f1c5866bcfce
2017-11-06stasis_channels.c: Remove a very silly RAII_VAR().Richard Mudgett
Change-Id: I28b458b3c1a442c4ef0be7b4986a95ea4149e14f
2017-11-06stasis/app.c: Optimize stasis_app_get_debug_by_name()Richard Mudgett
* Eliminate RAII_VAR() * Short circuit application name lookup if global debug enabled. Change-Id: I5f78b7bd6ca7fd2c3b07cbbe036c6a93b4681123
2017-11-06Fix ast_(v)asprintf() malloc failure usage conditions.Richard Mudgett
When (v)asprintf() fails, the state of the allocated buffer is undefined. The library had better not leave an allocated buffer as a result or no one will know to free it. The most likely way it can return failure is for an allocation failure. If the printf conversion fails then you actually have a threading problem which is much worse because another thread modified the parameter values. * Made __ast_asprintf()/__ast_vasprintf() set the returned buffer to NULL on failure. That is much more useful than either an uninitialized pointer or a pointer that has already been freed. Many uses won't have to check for failure to ensure that the buffer won't be double freed or prevent an attempt to free an uninitialized pointer. * stasis.c: Fixed memory leak in multi_object_blob_to_ami() allocated by ast_asprintf(). * ari/resource_bridges.c:ari_bridges_play_helper(): Remove assignment to the wrong thing which is now not needed even if assigning to the right thing. Change-Id: Ib5252fb8850ecf0f78ed0ee2ca0796bda7e91c23
2017-11-06Merge "install_prereq: Checkout of libSRTP 2.x." into 13Jenkins2
2017-11-06Merge "configure: Add autoconf check for libopusfile." into 13Jenkins2
2017-11-06Merge "Prevent unload of modules which implement an Optional API." into 13Jenkins2
2017-11-06Merge "Add missing menuselect dependencies." into 13Jenkins2