summaryrefslogtreecommitdiff
path: root/res
AgeCommit message (Collapse)Author
2013-03-27Convert MWI state message type to the new stasis naming conventionKinsey Moore
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384219 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-27Fix white noise on SRTP decryptionKinsey Moore
When res_rtp_asterisk.c was altered to avoid attempting to apply unprotect algorithms to non-audio RTP packets, the test used was incorrect. This caused the audio packets to not be decrypted and resulted in loud white noise on the other endpoint (or both endpoints depending on the call legs involved). The test now properly checks the version field in the RTP header to ensure that RTP and RTCP are decrypted while other types of packets are not. (closes issue ASTERISK-21323) Reported by: andrea Tested by: Kinsey Moore, andrea, John Bigelow Patches: whitenoise_fix.diff uploaded by Kinsey Moore ........ Merged revisions 384048 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 384049 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-27AST-2013-001: Prevent buffer overflow through H.264 format negotiationMatthew Jordan
The format attribute resource for H.264 video performs an unsafe read against a media attribute when parsing the SDP. The value passed in with the format attribute is not checked for its length when parsed into a fixed length buffer. This patch resolves the vulnerability by only reading as many characters from the SDP value as will fit into the buffer. (closes issue ASTERISK-20901) Reported by: Ulf Harnhammar patches: h264_overflow_security_patch.diff uploaded by jrose (License 6182) ........ Merged revisions 383973 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383975 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-25Properly delimit post data in res_config_curl.Sean Bright
........ Merged revisions 383667 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 383668 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383669 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-22Move more channel events to Stasis; move res_json.c to main/json.c.David M. Lee
This patch started out simply as fixing the bouncing tests introduced in r382685, but required some other changes to give it a decent implementation. To fix the bouncing tests, the UserEvent and Newexten AMI events needed to be refactored to dispatch via Stasis. Dispatching directly to AMI resulted in those events sometimes getting ahead of the associated Newchannel events, which would understandably confuse anyone. I found that instead of creating a zillion different message types and structures associated with them, it would be preferable to define a message type that has a channel snapshot and a blob of structured data with a small bit of additional information. The JSON object model provides a very nice way of representing structured data, so I went with that. * Move JSON support from res_json.c to main/json.c * Made libjansson-dev a required dependency * Added an ast_channel_blob message type, which has a channel snapshot and JSON blob of data. * Changed UserEvent and Newexten events so that they are dispatched via ast_channel_blob messages on the channel's topic. * Got rid of the ast_channel_varset message; used ast_channel_blob instead. * Extracted the manager functions converting Stasis channel events to AMI events into manager_channel.c. (issue ASTERISK-21096) Review: https://reviewboard.asterisk.org/r/2381/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-20Pass the sorcery instance to wizards for CUD operations as well as retrieve.Joshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383405 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-16Make sure things compile...Kinsey Moore
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-16Transition MWI to Stasis-coreKinsey Moore
Remove MWI's dependency on the event system by moving it to Stasis-core. This also introduces forwarding topic pools in Stasis-core which aggregate many dynamically allocated topics into a single primary topic. Review: https://reviewboard.asterisk.org/r/2368/ (closes issue ASTERISK-21097) Patch-by: Kinsey Moore git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-16Add support for using XMPP buddy state via device state.Joshua Colp
This change allows you to use XMPP buddy state in places where device state can be used be used, such as dialplan hints. If at least one resource is available the buddy is considered available. Now your phone can reflect their IM status too! git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-16Fix a bug where resources were not found due to hashing on the priority itself.Joshua Colp
........ Merged revisions 383266 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-13Always set the RTP instance data in the RTP engineMatthew Jordan
Not informing the RTP engine of the instance data creates shrapnel. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-12Update DoxygenAndrew Latham
Push some cleanups upstream before testing another ticket. (issue ASTERISK-20259) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-12Fix a crash when res_xmpp is configured using a username without a domain.Joshua Colp
(closes issue ASTERISK-21156) Reported by: amsoft2001 ........ Merged revisions 382923 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382924 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-12Switch to using external pjproject libraries.Jason Parker
ICE/STUN/TURN support in res_rtp_asterisk is also now optional. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-07Load sorcery modules earlier, so they can actually be used.Jason Parker
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-07Add a 'secret' probation strictrtp mode to handle delayed changes in RTP sourceMatthew Jordan
Often, Asterisk may realize that a change in the source of an RTP stream is about to occur and ask that the RTP engine reset it's lock on the current RTP source. In certain scenarios, it may take awhile for the new remote system to send RTP packets, while the old remote system may continue providing RTP during that time period. This causes Asterisk to re-lock onto the old source, thereby rejecting the new source when the old source stops sending RTP and the new source begins. This patch prevents that by having a constant secondary, 'secret' probation mode enabled when an RTP source has been chosen. RTP packets from other sources are always considered, but never chosen unless the current RTP source stops sending RTP. Review: https://reviewboard.asterisk.org/r/2364 (closes issue AST-1124) Reported by: John Bigelow Tested by: John Bigelow (closes issue AST-1125) Reported by: John Bigelow Tested by: John Bigelow ........ Merged revisions 382573 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-28While the ICE negotiation is occurring leave strictrtp in an open state, ↵Joshua Colp
media can and will come from different places. ........ Merged revisions 382298 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-28Fix a bug with ICE and strictrtp where media could get dropped.Joshua Colp
If the end result of the ICE negotiation resulted in the path for media changing it was possible for the strictrtp code to discard the RTP packets. This change causes strictrtp to enter learning mode once again when the ICE negotiation has completed successfully. ........ Merged revisions 382296 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-28Don't undefine bzero()/bcopy().Jason Parker
This was causing build failures against external libraries that happened to use them, unless silly hacks were added to the modules that used those headers. Review: https://reviewboard.asterisk.org/r/2359/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382292 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-22Fix FastAGI To Properly Check For A ConnectionMichael L. Young
When IPv6 support was added to FastAGI, the intent was to have the ability to check all addresses resolved for a host since we might receive an IPv4 address and an IPv6 address. The problem with the current code, is that, since we are doing O_NONBLOCK, we get EINPROGRESS when calling ast_connect() but are ignoring this instead of handling it. We break out of the loop and continue on. When we later call ast_poll(), it succeeds but we never check if we have a connection or not on the socket level. We then attempt to send data to the host address that we think is setup and it fails. We then check the errno and see that we have "connection refused" and then return with agi failed. This patch does the following: * Handles EINPROGRESS by creating the function handle_connection() - ast_poll() was moved into this function - This function checks the results of the connection on the socket level after calling ast_poll() * Continues to the next address if the above fails to create a connection * Once all addresses resolved are tried and we still are unable to establish a connection, then we return that the FastAGI call failed (closes issue ASTERISK-21065) Reported by: Jeremy Kister Tested by: Jeremy Kister, Michael L. Young Patches: asterisk-21065_poll_correctly_v4.diff Michael L. Young (license 5026) Review: https://reviewboard.asterisk.org/r/2330/ ........ Merged revisions 381893 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381894 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-19Add The Status Of A Module To The Output Of "CLI> module show"Michael L. Young
When a module's configuration is not loadable, we still load the module but it is not in a running state. When trying to troubleshoot, let's say, why chan_motif is ignoring inbound XMPP traffic, there is no way to indicate that a loaded module is not currently running. (closes issue ASTERISK-21108) Reported by: Rusty Newton Tested by: Michael L. Young Patches: asterisk-21108_add_status-v2.diff Michael L. Young (license 5026) Review: https://reviewboard.asterisk.org/r/2331/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-16Add support for retrieving multiple objects from sorcery using a regex on ↵Joshua Colp
their id. Review: https://reviewboard.asterisk.org/r/2329/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381614 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-15Add CLI configuration documentationMatthew Jordan
This patch allows a module to define its configuration in XML in source, such that it can be parsed by the XML documentation engine. Documentation is generated in a two-pass approach: 1. The documentation is first generated from the XML pulled from the source 2. The documentation is then enhanced by the registration of configuration options that use the configuration framework This patch include configuration documentation for the following modules: * chan_motif * res_xmpp * app_confbridge * app_skel * udptl Two new CLI commands have been added: * config show help - show configuration help by module, category, and item * xmldoc dump - dump the in-memory representation of the XML documentation to a new XML file. Review: https://reviewboard.asterisk.org/r/2278 Review: https://reviewboard.asterisk.org/r/2058 patches: on review 2058 uploaded by twilson git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-11Minor fixes to res_json and test_json.David M. Lee
* Made input checking more consistent with other Asterisk code * Added validation to ast_json_dump_new_file * Fixed tests for ownereship semantics (issue ASTERISK-20887) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381214 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-11Fix crash in res_xmpp when deleting pubsub node from CLIMatthew Jordan
An error existed in res_xmpp where it would attempt to delete attributes from a node that itself was also deleted. Per the iksemel documentation, attributes added using iks_insert are copied to the parent node's stack, and will be reclaimed when that node is itself destroyed. (closes issue ASTERISK-20982) Reported by: marcelloceschia patches: delete-node-fix.diff uploaded by marcelloceschia (License 6036) ........ Merged revisions 381159 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381160 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-07Fix a bug where a changed configuration file might not be available to all ↵Joshua Colp
sorcery object types. Since res_sorcery_config used a static name of "res_sorcery_config" to inform the configuration file API that it asked for the configuration file it was possible during a reload for some sorcery object types not to receive the new configuration file. This change introduces a UUID on a per-sorcery config instance basis so that the unchanged state is kept on an instance basis and not for the res_sorcery_config module as a whole. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-04Fix how we build pjproject.Jason Parker
Allow parallel builds, better tolerate failures, build faster. This also stops running dependencies before top-level configure has been run. (closes issue ASTERISK-20815) Review: https://reviewboard.asterisk.org/r/2292/ ........ Merged revisions 380816 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380817 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-31Multiple revisions 380735-380736Jason Parker
........ r380735 | qwell | 2013-01-31 15:40:09 -0600 (Thu, 31 Jan 2013) | 1 line Fix a few compiler warnings. ........ r380736 | qwell | 2013-01-31 15:42:34 -0600 (Thu, 31 Jan 2013) | 1 line Ignore warnings caused by PJ_TODO()s in pjproject. ........ Merged revisions 380735-380736 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-31Multiple revisions 380671-380673Jason Parker
........ r380671 | qwell | 2013-01-31 12:59:28 -0600 (Thu, 31 Jan 2013) | 4 lines Remove a cross-compile workaround. ar and ranlib can be easily detected with autoconf. ........ r380672 | qwell | 2013-01-31 13:00:38 -0600 (Thu, 31 Jan 2013) | 2 lines Always check for libm, regardless of configure options. ........ r380673 | qwell | 2013-01-31 13:03:03 -0600 (Thu, 31 Jan 2013) | 7 lines Add support for parallel builds of pjproject. Also adds proper dependency checking, and direct .a file targets. We don't take advantage of this currently, but we will soon. (issue ASTERISK-20815) ........ Merged revisions 380671-380673 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-30Fix memory leak in res_calendar_icalendarMatthew Jordan
The ICalendar module had a systemic memory leak on each fetch of data from the ICalendar source. The previous fetched data was not being properly disposed. This patch makes it so that before each fetch of data, we dispose of the previously fetched data. (closes issue ASTERISK-21012) Reported by: Joel Vandal Tested by: Joel Vandal ........ Merged revisions 380451 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 380452 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380460 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-25Make sorcery modules global, since they are required by other modules that ↵Jason Parker
are global. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-25Add a missing '\' to a log message.Joshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-25Merge the sorcery data access layer API.Joshua Colp
Sorcery is a unifying data access layer which provides a pluggable mechanism to allow object creation, retrieval, updating, and deletion using different backends (or wizards). This is a fancy way of saying "one interface to rule them all" where them is configuration, realtime, and anything else that comes along. Review: https://reviewboard.asterisk.org/r/2259/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-22res_fax_spandsp: fix t38 transmission bug caused by not returning successJonathan Rose
This patch fixes the problem, but the issue includes a test which is still being considered for the automated test suite. (issue ASTERISK-20919) Reported by: NITESH BANSAL Patches: patch_ast_fax_spandsp.patch uploaded by NITESH BANSAL (license 6418) ........ Merged revisions 379949 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-22Add ControlPlayback manager actionMatthew Jordan
This patch adds the capability for asynchronous manipulation of audio being played back to a channel though a new AMI action "ControlPlayback". The ControlPlayback action supports a number of operations, the availability of which depend on the application being used to send audio to the channel. When the audio playback was initiated using the ControlPlayback application or CONTROL STREAM FILE AGI command, the audio can be paused, stopped, restarted, reversed, or skipped forward. When initiated by other mechanisms (such as the Playback application), the audio can be stopped, reversed, or skipped forward. Review: https://reviewboard.asterisk.org/r/2265/ (closes issue ASTERISK-20882) Reported by: mjordan git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-16Let documentation reference links specify which module they're linking toMatthew Jordan
Again, since res_jabber/res_xmpp have duplicate APIs, their documentation ref links have to specify which reference they're referring to. The various documentation parsers can interpret the module attribute however they want in order to construct the appropriate links. ........ Merged revisions 379228 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-16Multiple revisions 379209-379210Matthew Jordan
........ r379209 | mjordan | 2013-01-16 09:27:44 -0600 (Wed, 16 Jan 2013) | 8 lines Add module tags to documentation for res_jabber/res_xmpp Since res_jabber/res_xmpp provide the same APIs (app/func/manager/etc.), the XML documentation for each needs to call out which module is providing the documentation. The module attribute has been added to the various XML fragments for this purpose. ........ r379210 | mjordan | 2013-01-16 09:30:20 -0600 (Wed, 16 Jan 2013) | 4 lines Update the dtd to actually *support* the module attribute in all elements Mea culpa. ........ Merged revisions 379209-379210 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379211 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-13Reset RTP timestamp; sequence number on SSRC changeMatthew Jordan
In r370252 for ASTERISK-18404, Asterisk's handling of RTP was modified to better account for out of order RTP packets. This was accomplished by using the RTP timestamp and sequence number to check for out of order packets. However, when a SSRC change occurs, the timestamp and sequence number will no longer have any relation to the previously received packets. The variables tracking the timestamp and sequence number therefore have to be reset. (closes issue ASTERISK-20906) Reported by: Eelco Brolman patches: dtmf_on_hold.patch uploaded by Eelco Brolman (license #6442) ........ Merged revisions 378967 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 378984 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378985 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-11Retain XMPP filters across reconnections so external modules continue to ↵Joshua Colp
function as expected. Previously if an XMPP client reconnected any filters added by an external module were lost. This issue exhibited itself with chan_motif not receiving and reacting to Jingle signaling. (closes issue ASTERISK-20916) Reported by: kuj ........ Merged revisions 378917 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378918 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-11Add JSON API for Asterisk.David M. Lee
This provides a JSON API by pulling in and wrapping the Jansson JSON library[1]. The Asterisk API basically mirrors the Jansson functionality, with a few minor tweaks. * Some names have been asteriskified to protect the innocent. * Jansson provides both reference-stealing and reference-borrowing versions of several API's. The Asterisk API is exclusively reference-stealing for operations that put elements into arrays and objects. * No support for doubles, since we usually don't need that. * Coming along for the ride is the ast_test_validate macro, which made the unit tests much easier to write. [1]: http://www.digip.org/jansson/ (issue ASTERISK-20887) (closes issue ASTERISK-20888) Review: https://reviewboard.asterisk.org/r/2264/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378915 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-04res_srtp: Prevent a crash from occurring due to srtp_create failures in ↵Jonathan Rose
srtp_create Under some circumstances, libsrtp's srtp_create function deallocates memory that it wasn't initially responsible for allocating. Because we weren't initially aware of this behavior, this memory was still used in spite of being unallocated during the course of the srtp_unprotect function. A while back I made a patch which would set this value to NULL, but that exposed a possible condition where we would then try to check a member of the struct which would cause a segfault. In order to address these problems, ast_srtp_unprotect will now set an error value when it ends without a valid SRTP session which will result in the caller of srtp_unprotect observing this error and hanging up the relevant channel instead of trying to keep using the invalid session address. (closes issue ASTERISK-20499) Reported by: Tootai Review: https://reviewboard.asterisk.org/r/2228/diff/#index_header ........ Merged revisions 378591 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 378592 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-04Fix pjproject compilation in certain circumstancesKinsey Moore
On a fresh checkout of Asterisk 11, running make before ./configure could cause the pjproject subdirectory to get in an odd state that would prevent compilation. This patch by Tilghman prevents that from occurring. (closes issue ASTERISK-20681) Reported by: Dinesh Ramjuttun Tested by: danilo borges, Steve Lang patches: 20121208__ccar_solved.diff.txt uploaded by Tilghman Lesher (license 5003) ........ Merged revisions 378582 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-04Don't pass STUN packets through the SRTP unprotect function.Joshua Colp
(closes issue AST-1036) Reported by: jbigelow ........ Merged revisions 378553 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 378555 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-04Doxygen CleanupsAndrew Latham
Baseline clean up of formating to make room for extended documentation (issue ASTERISK-20259) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378543 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-03Prevent exhaustion of system resources through exploitation of event cacheJoshua Colp
This patch changes res_xmpp to no longer cache events under certain circumstances. (issue ASTERISK-20175) Reported by: Russell Bryant, Leif Madsen, Joshua Colp Tested by: kmoore ........ Merged revisions 378411 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378412 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-03Prevent crashes in res_xmpp when receiving large messagesMatthew Jordan
Similar to r378287, res_xmpp was marshaling data read from an external source onto the stack. For a sufficiently large message, this could cause a stack overflow. This patch modifies res_xmpp in a similar fashion to res_jabber by removing the stack allocation, as it was unnecessary. (issue ASTERISK-20658) Reported by: wdoekes ........ Merged revisions 378409 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-02Prevent exhaustion of system resources through exploitation of event cacheMatthew Jordan
Asterisk maintains an internal cache for devices in the event subsystem. The device state cache holds the state of each device known to Asterisk, such that consumers of device state information can query for the last known state for a particular device, even if it is not part of an active call. The concept of a device in Asterisk can include entities that do not have a physical representation. One way that this occurred was when anonymous calls are allowed in Asterisk. A device was automatically created and stored in the cache for each anonymous call that occurred; this was possible in the SIP and IAX2 channel drivers and through channel drivers that utilized the res_jabber/res_xmpp resource modules (Gtalk, Jingle, and Motif). These devices are never removed from the system, allowing anonymous calls to potentially exhaust a system's resources. This patch changes the event cache subsystem and device state management to no longer cache devices that are not associated with a physical entity. (issue ASTERISK-20175) Reported by: Russell Bryant, Leif Madsen, Joshua Colp Tested by: kmoore patches: event-cachability-3.diff uploaded by jcolp (license 5000) ........ Merged revisions 378303 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 378320 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 378321 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378322 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-02Resolve crashes due to large stack allocations when using TCPMatthew Jordan
Asterisk had several places where messages received over various network transports may be copied in a single stack allocation. In the case of TCP, since multiple packets in a stream may be concatenated together, this can lead to large allocations that overflow the stack. This patch modifies those portions of Asterisk using TCP to either favor heap allocations or use an upper bound to ensure that the stack will not overflow: * For SIP, the allocation now has an upper limit * For HTTP, the allocation is now a heap allocation instead of a stack allocation * For XMPP (in res_jabber), the allocation has been eliminated since it was unnecesary. Note that the HTTP portion of this issue was independently found by Brandon Edwards of Exodus Intelligence. (issue ASTERISK-20658) Reported by: wdoekes, Brandon Edwards Tested by: mmichelson, wdoekes patches: ASTERISK-20658_res_jabber.c.patch uploaded by mmichelson (license 5049) issueA20658_http_postvars_use_malloc2.patch uploaded by wdoekes (license 5674) issueA20658_limit_sip_packet_size3.patch uploaded by wdoekes (license 5674) ........ Merged revisions 378269 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 378286 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 378287 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-13Make generate_exchange_uuid() always return the passed ast_str pointer.Sean Bright
I changed this code earlier to return NULL if it wasn't able to generate a UUID, whereas the earlier code would always return the ast_str that was passed in. Switch back to returning the ast_str, only set it to the empty string instead if UUID generation fails. We still do a validity check later which will catch this and blow up if necessary. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378000 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-13Use the UUID API to generate and validate UUIDs for res_calendar_exchange.Sean Bright
Currently the res_calendar_exchange module uses its own method of generating UUIDs using ast_random(). Now that we have a UUID API we should use that instead. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377974 65c4cc65-6c06-0410-ace0-fbb531ad65f3