Commit Graph

7383 Commits

Author SHA1 Message Date
Anthony Minessale 82f267adc1 FS-7122 forgot to add file to last commit 2015-02-16 16:59:55 -06:00
Anthony Minessale efd3744a21 FS-7122: Working with william to find a better way 2015-02-16 16:25:35 -06:00
Anthony Minessale 0dd71fd9fb FS-7122 REVERT 2015-02-16 16:20:14 -06:00
Anthony Minessale 9f3f348984 CentOS 5 dosn't support subdir-objects 2015-02-16 16:13:13 -06:00
Anthony Minessale 7cf5a84634 FS-7122 reversion 2015-02-16 16:06:43 -06:00
Michael Jerris d17edb59dc FS-7264: fix signed/unsigned warnings on windows building ws.c 2015-02-11 12:40:04 -05:00
Michael Jerris cceeecb04c FS-7264: silence inet_ntop deprecated warnings 2015-02-11 12:15:03 -05:00
Moises Silva 98de925e46 Merge pull request #171 in FS/freeswitch from ~MBRANCA/freeswitch:bugfix/FS-7209-improve-ani-ton-and-type-when-not to master
* commit '3cd62df96f78a0ea3255c4fced2e2f32f97c0a42':
  If ANI ton is not interpreted correctly by libpri, fallback to calling ton/type.
2015-01-28 10:35:09 -06:00
Moises Silva c9ebd0fcdf Merge pull request #165 in FS/freeswitch from ~MBRANCA/freeswitch:bugfix/FS-7197-libpri-spans-fails-to-stop-when-unloading to master
* commit 'e062f5e3c8355a6b5cb0d12ddb99300e95b38193':
  If the span has been already fully stopped and ftdm is not running, return success from the span stop function.
2015-01-28 10:33:47 -06:00
Matteo Brancaleoni 3cd62df96f If ANI ton is not interpreted correctly by libpri,
fallback to calling ton/type.
2015-01-28 11:13:37 +01:00
Matteo Brancaleoni e062f5e3c8 If the span has been already fully stopped and ftdm is not running,
return success from the span stop function.
2015-01-28 09:35:19 +01:00
Matteo Brancaleoni 8307e7842d Set ANI plan and ANI type for ftmod_libpri. 2015-01-27 15:56:00 +01:00
Anthony Minessale 90ab1d16f5 fix cent5 build 2015-01-21 02:01:54 -06:00
Michael Jerris c36196db3f FS-7180: when using system lua, properly link against renamed library versions on debian for esl luamod 2015-01-20 14:32:36 -05:00
Brian West 1d361b6108 FS-7180: let esl lua module build against lua 5.1 or 5.2 (requires newer swig) 2015-01-20 12:26:57 -06:00
William King d82611af0b Fix build of freetdm on CentOS
Revert the build change to freetdm since it broke the build of that
modules on CentOS. Once a working change is finished, then it'll be
committed against FS-7122.

FS-7142 #resolve
2015-01-09 14:21:05 -08:00
Mike Jerris 4c89075f2d Merge pull request #147 in FS/freeswitch from ~DDRAGIC/freeswitch:feature/FS-7128-fs_cli-ignore-duplicate-lines to master
* commit '2406abdb76a2c6dfb3da364a3997fb6d422e759d':
  FS-7128 fs_cli: ignore duplicate lines in history
2015-01-09 11:52:54 -06:00
Mike Jerris 9caea96371 Merge pull request #148 in FS/freeswitch from ~DDRAGIC/freeswitch:feature/FS-7129-fs_cli-function-keys-toggle-functionality to master
* commit '959b07c06f565f7d2d8a158c3ce2f44bdae3f350':
  FS-7129 fs_cli: add toggle mode to function keys
2015-01-09 11:51:07 -06:00
William King 16f7177c3d resolve an automake warning about subdirs on latest automake
The file 'libs/sofia-sip/s2check/exit77.c' was moved in order to
silence the warning and to keep the build working. There might be a
build problem that results from this file move, but after serveral
build tests I have not found one. The contents of the file are
specifically for the make check target, so I believe it would be
highly unlikely to cause problems with any production feature.

FS-7122 #resolve
2015-01-07 11:30:41 -08:00
Mike Jerris 10c961e65e Merge pull request #155 in FS/freeswitch from bugfix/FS-7122-several-libs-do-not-have-the-subdirs to master
* commit '51f2442a9e3e3478b38bfab882c7cfe4bfc37d92':
  resolve an automake warning about subdirs on latest automake
2015-01-07 12:16:29 -06:00
Anthony Minessale 19a0a0fb00 sofia rebuild 2015-01-07 17:18:21 -06:00
Anthony Minessale 5187aaed79 FS-7117 #comment revert bf5210bf72 and implement it in ws.c please be sure to learn to use git commit hooks to properly associate commits with jiras 2015-01-07 17:17:28 -06:00
William King 51f2442a9e resolve an automake warning about subdirs on latest automake
Latest automake will detect then warn if the Makefile uses source
files that are in subdirectories, but the subdirs option is not
set. In the FreeSWITCH build system the current expected behavior is
to expect the subdirs option to be enabled.

FS-7122 #resolve
2015-01-07 10:04:29 -08:00
Anthony Minessale 7c0c3ab8a6 sofia rebuild 2015-01-07 02:12:48 -06:00
Anthony Minessale 6c1bc0e2f6 sync ws code 2015-01-07 02:12:29 -06:00
Dušan Dragić 959b07c06f FS-7129 fs_cli: add toggle mode to function keys 2015-01-04 00:29:38 +01:00
Dušan Dragić 2406abdb76 FS-7128 fs_cli: ignore duplicate lines in history 2015-01-03 23:46:19 +01:00
Jeff Lenk 0b414a8de8 vs2010 unimrcp working build 2014-12-15 16:47:14 -06:00
Jeff Lenk 4d45e19691 vs2010 support for recent unimrcp changes 2014-12-15 15:18:44 -06:00
Jeff Lenk a26e29c647 vs2010 support for recent unimrcp changes 2014-12-15 14:18:01 -06:00
Jeff Lenk 357ffad817 fix windows build error 2014-12-15 13:37:07 -06:00
Michael Jerris 19272dc5e2 FS-7078: fix sip_header_as_string to properly null_terminate on larger header strings 2014-12-12 10:25:49 -06:00
Brian West c327455cde FS-7030 #resolve 2014-12-03 13:36:39 -06:00
Dave Kompel db66cdb56f Fix mrcp libraries to build right 2014-12-03 12:56:48 -05:00
Brian West b69c93eb78 FS-7030 work in progress 2014-12-02 12:32:49 -06:00
Chris Rienzo 46adbece5e FS-7030 #comment [unimrcp] restore visual studio 2010/2012 project files added by FS project 2014-12-01 14:53:25 -05:00
matteo brancaleoni 382e683b15 Use FTDM_UINT64_FMT macro to log uint64_t values, in order to not break x86 builds. 2014-11-25 15:38:45 +01:00
Chris Rienzo 061f3cb980 FS-7031 #resolve #comment [unimrcp] update library again to pull in upstream fix for --with-sofia-sip=../sofia-sip 2014-11-25 08:24:50 -05:00
Chris Rienzo f4876d591b FS-7031 [unimrcp] update sofia-sip.m4 so that it can build when relative path is used in configure.gnu --with-sofia-sip 2014-11-24 12:12:51 -05:00
Chris Rienzo 0d636aff16 FS-7031 [unimrcp] revert configure.gnu change- doesn't work when using non-source build dir. 2014-11-24 12:12:25 -05:00
Ken Rice c645ab3889 FS-6848 #resolve #comment slight tweak to fix the logic and avoid unbalanced parens 2014-11-19 16:06:17 -06:00
Richard Neese 9673cf0acb Fix for apr build issue fs-6848 freebsd arm 2014-11-19 14:00:12 -06:00
Chris Rienzo 7b80b6249b Merge branch 'unimrcp-update-20141117' 2014-11-18 14:28:38 -05:00
Chris Rienzo 8330336e9a FS-6450 [unimrcp] Update library
[apr] Backport APR_RING_FOREACH and APR_RING_FOREACH_SAFE macros to APR for unimrcp compatibility.

 [unimrcp] configure.gnu - need full path, not relative path for library paths

 [unimrcp] added uni_revision.h - couldn't get it to autogenerate from build

 [mod_unimrcp] add better logging and error checking on module load.  Currently dumps core on MRCPv1 TTS attempt

 [mod_unimrcp] don't configure MRCPv1 session with a connection agent- causes crash
2014-11-18 14:23:54 -05:00
Michael Jerris 424df19083 FS-6695: fix build on mips 2014-11-17 15:25:39 -05:00
Chris Rienzo 6f660c3a10 iksemel - remove support for SSLv23 in iks_proceed_tls (was a FS addition to iksemel). mod_rayo - updated to no longer support SSLv23 2014-11-17 09:46:23 -05:00
Michael Jerris 0cf770a836 FS-6996: #resolve fix define change as of glibc 2.20 for _BSD_SOURCE -> _DEFAULT_SOURCE 2014-11-17 09:27:22 -05:00
Anthony Minessale 87a4670d16 FS-6890 #comment please test 2014-11-12 13:09:39 -06:00
Moises Silva eb30491688 Merge remote-tracking branch 'moystash/em-suspend-support'
Conflicts:
	libs/freetdm/src/include/private/ftdm_core.h
2014-11-09 03:50:07 -05:00
Moises Silva 6b8d5b2b10 freetdm: Fix release guard timer check 2014-11-09 00:41:59 -08:00
Moises Silva 2f1b12fdc0 OPENZAP-232 #resolve
Patched-By: Florian Richter

Check for digits received on sangoma isdn stack to avoid delaying
moving to the ring state if all digits are received at once in
overlap dialing mode
2014-11-09 03:33:43 -05:00
Anthony Minessale 46e74e5853 revert 831832c2c6 2014-11-05 09:26:44 -06:00
Anthony Minessale 831832c2c6 FS-6890 #please test 2014-11-04 18:31:44 -06:00
Brian West 32a9ff3d39 Merge pull request #60 in FS/freeswitch from ~SJTHOMASON/freeswitch:FS-6823 to master
* commit 'afb00b2ecc8a9b049801f3f475c80e1111070fa8':
  Force rport on ADTRAN TA Devices
2014-11-04 07:36:36 -06:00
Anthony Minessale 7ca4ac566c FS-5949 FS-6945 #comment this change should be relevant to both of these issues, please test. This patch improves the hold parsing and ignores connection address of 0 implying hold when ice is present and disables the auto interpretation by the lower level stack of 0.0.0.0 to automatically imply sendonly to allow FS to decide on its own 2014-10-31 13:49:39 -05:00
Jeff Lenk 3c1ad1f014 Merge pull request #66 in FS/freeswitch from ~STEFANO.PICERNO/freeswitch:windows-wait-fix to master
* commit '4c9d9301b0f19b1750d567ce62142a572b163944':
  Workaround for Windows limit in su_wait
2014-10-29 11:04:00 -05:00
Peter Olsson 1ca81aca50 Ignore generated log files on Windows build 2014-10-18 09:30:07 +02:00
Mike Jerris a5f4810c0d Merge pull request #88 in FS/freeswitch from ~DANIELWEBER/freeswitch:FixManaged to master
* commit 'a0d6b642fff4fddf1bd62f39ccf952891c7817e3':
  Fix ManagedEsl.2012.csproj: There is no file 'ESLconnection.2010.cs'.
2014-10-16 11:54:13 -05:00
Anthony Minessale 59352005d0 force sofia rebuild 2014-10-13 18:28:44 -05:00
Jeff Lenk 6146efd446 FS-6870 #comment please reopen if this doesnt fix vs2010 2014-10-07 22:28:53 -05:00
Matteo Brancaleoni 7ec7c920d1 OPENZAP-220 fix blocked into read and add cause for a correct hangup 2014-10-07 14:34:39 +02:00
Michael Jerris acd8d74316 cleanup conditions 2014-10-03 12:48:43 -04:00
Spencer Thomason afb00b2ecc Force rport on ADTRAN TA Devices
ADTRAN Total Access devices do not support sending the rport parameter in
the Via header. This allows us to detect the device and force rport when
using the "safe" parameter, enabling the device to be used behind NAT.

FS-6823 #resolve
2014-10-02 13:09:15 -07:00
Anthony Minessale 35aeae0170 FS-6822 #comment The code in question appears to have been added by me (18f20e24). I think this patch is the correct solution. 2014-10-01 18:11:01 -05:00
Jeff Lenk b3d71917d2 FS-6870 #comment vs2010 and vs2012 would rather fix it this way 2014-10-01 17:53:51 -05:00
Jeff Lenk 661269a46f Revert "FS-6870 #vs2012 and vs2010 make download of openssl dependent"
This reverts commit a39db86863.
2014-10-01 17:49:21 -05:00
Brian West 8e408e9abe FS-6865 #resolve add XMPP priority to dingaling 2014-10-01 10:40:57 -05:00
Jeff Lenk a39db86863 FS-6870 #vs2012 and vs2010 make download of openssl dependent 2014-09-30 21:30:48 -05:00
Anthony Minessale 0150c862a2 FS-6854 #comment try this patch 2014-09-30 20:35:19 +05:00
Brian West 7c89c21153 FS-6860 #resolve this was fixed once but was lost in the last sync 2014-09-26 09:00:09 -05:00
Anthony Minessale f7de058acd FS-6854 #resolve 2014-09-25 21:44:02 +05:00
Travis Cross 051772e4ae Add fs_cli option to disable use of history file
With this commit, passing -Q to fs_cli will cause fs_cli to not load
or save the command history file (~/.fs_cli_history).  This can be
useful e.g. on read-only systems.

This can also be set in the fs_cli configuration file with the option
`no-history-file`.
2014-09-25 11:07:49 +00:00
Daniel Weber a0d6b642ff Fix ManagedEsl.2012.csproj: There is no file 'ESLconnection.2010.cs'. 2014-09-24 10:16:35 +02:00
Anthony Minessale 9e72c8477f fix possible buffer overrun in websocket uri and sync the ws.c between sofia and verto (missing code from last commit) 2014-09-24 01:09:44 +05:00
Anthony Minessale 59e71341db fix possible buffer overrun in websocket uri and sync the ws.c between sofia and verto 2014-09-23 20:17:20 +05:00
Stefano Picerno 4c9d9301b0 Workaround for Windows limit in su_wait
Windows has a 64 descriptor limit in WSAWaitForMultipleEvents system call.
Implemented some custom login in su_wait to work around this limitation.
Changed SU_WAIT_MAX from 64 to 0x7fffffff, like on other plaftorms.
2014-09-23 13:09:57 +02:00
Travis Cross 323a3d617c Avoid output of junk text by fs_cli
In some cases where `redisplay()` is called immediately after a
command is run (e.g. `log ...`) we often get a prompt, junk output,
and a second prompt.  This is due to a (known) race.

We believe we're falling afoul of this code in `el_deletestr`:

    if (el->el_line.cursor < &el->el_line.buffer[n])
            return;

Basing the length of text to delete off of the cursor position
resolves the issue of junk text, but the real solution is to eliminate
the race conditions, which will also resolve the sometimes duplicated
prompt.

FS-6764 #resolve

Thanks-to: Nathan Neulinger <nneul@neulinger.org>
2014-08-26 20:18:22 +00:00
Travis Cross 3c32dd3bc9 Return NULL from `sub_alloc` for zero size
When zero was passed for the size to `sub_alloc`, we were passing this
size on to `malloc` or `calloc`, which is unusual enough that static
analyzers warn about this (POSIX says that either NULL or a pointer
will be returned).

We'll instead just return NULL right away.
2014-08-22 02:47:04 +00:00
Jeff Lenk 571cf932dc fix VS2010 build warning 2014-08-16 18:22:41 -05:00
Anthony Minessale cbe0bc05d0 force sofia rebuild 2014-08-16 01:34:30 +05:00
Anthony Minessale 24413bfa11 copy changes from verto ws.c to sofia 2014-08-16 00:43:25 +05:00
Travis Cross 8d84aa25ec Cleanup whitespace 2014-08-13 19:29:03 +00:00
Peter Wu 21c145b108 libzrtp: update zrtp_sleep for modern libc
usleep is deprecated and disabled in glibc 2.12 unless requested. Use
nanosleep instead if available.

This fixes the following compiler warning:

    ./src/zrtp_iface_scheduler.c: In function 'zrtp_sleep':
    ./src/zrtp_iface_scheduler.c:96:2: warning: implicit declaration of
    function 'usleep' [-Wimplicit-function-declaration]
      usleep(msec*1000);
      ^
2014-08-13 19:28:55 +00:00
Peter Wu 98502947c8 libsrtp: do not include unnecessary sources
These two files should only be built when OpenSSL is not enabled. See
the configure script of the original sources and Makefile from upstream.
(RNG_EXTRA_OBJS)

Fixes a -Wimplicit-function-declaration warning.
2014-08-13 18:52:18 +00:00
Anthony Minessale 2411550727 add homer capture line to websocket transport 2014-08-11 21:02:25 +05:00
Travis Cross 8414c498cf Fix line endings per .gitattributes 2014-08-08 15:24:42 +00:00
Steve Underwood af64da86f2 Improved HDLC abort handling 2014-07-29 21:22:47 +08:00
Steve Underwood 8d818c3be7 Fixes for DTC handling in the T.38 gateway 2014-07-28 23:35:06 +08:00
Moises Silva d65716d83a freetdm: Added dtmf_time_on and dtmf_time_off parameters to tweak DTMF duration in milliseconds 2014-07-27 13:29:58 -04:00
Brian West 327146cecf Fix WS Compile on MSVC2012 2014-07-25 11:34:08 -05:00
Moises Silva b80cdd45d5 freetdm: Added release guard time configuration
Currently only enabled in the analog e&m module but any
signaling module can easily take advantage of it with a small
modification to the signaling module to set span->sig_release_guard_time_ms
2014-07-23 00:41:08 -04:00
Moises Silva 09198ee357 freetdm: Raise some buffer limits 2014-07-22 23:44:17 -04:00
Moises Silva 61101e325f freetdm: ftmod_analog_em: Added support for suspending channels that are offhook 2014-07-22 23:30:53 -04:00
Moises Silva a65ba24298 mod_freetdm: Added 'ftdm cas' command to read/write raw CAS bits 2014-07-22 23:30:45 -04:00
Brian West e4bd2c3cd9 bump 2014-07-22 07:26:04 -05:00
Brian West 407fb1a7dd NOT OpenBSD 2014-07-22 07:25:43 -05:00
Steve Underwood 0c32ae8ca0 Coverity cleanups for iLBC 2014-07-22 12:06:50 +08:00
Steve Underwood 720e7a23c4 Tweas to PLC 2014-07-22 11:40:34 +08:00
Steve Underwood 47e5887288 Tweaks to the V.17 modem 2014-07-22 11:25:22 +08:00
Steve Underwood e5cad4d7d4 More Coverity related cleanups 2014-07-22 11:07:22 +08:00
Steve Underwood 3b8bc35bd9 More fixes for Coverity issues 2014-07-22 10:51:42 +08:00
Steve Underwood fb6ecb4c76 Fixed some issues raised by coverity in spandsp ilbc and unimrcp 2014-07-22 09:38:55 +08:00
Peter Olsson 17d6c5b850 FS-6578 #comment fixed #resolve 2014-07-19 18:06:01 +02:00
Peter Olsson 62404c6e2b Windows: Remove auto generation of files that already exist in git. 2014-07-19 13:41:33 +02:00
Peter Olsson 1f6eb25081 .gitignore portadio 2014-07-19 12:47:45 +02:00
Peter Olsson 730cd201c4 Remove js and mod_spidermonkey from Windows build 2014-07-19 12:47:44 +02:00
Peter Olsson 58a33988a3 spandsp: Add missing include for alloc.h. This fixes a build error on Windows. 2014-07-19 12:47:42 +02:00
Michael Jerris 6706378b38 we have already removed the module from tree, no need to bootstrap/configure the lib still, or to have it in tree at all for that matter 2014-07-18 14:15:26 -04:00
Steve Underwood 6a3bf7c4a7 Further improvements to FAX CTC message handling 2014-07-18 16:08:59 +08:00
Jeff Lenk 3cababdf33 FS-6542 part 2 windows 2014-07-17 23:51:59 -05:00
Steve Underwood 458ffc4714 Merge branch 'master' of ssh://stash.freeswitch.org:7999/fs/freeswitch 2014-07-18 10:33:42 +08:00
Steve Underwood 33a4adba62 Better handling of bad HDLC frames in T.38 gateway operation. 2014-07-18 10:29:23 +08:00
Travis Cross a0e19e1c7f Use system portaudio library
This removes our in-tree version of portaudio-19 and migrates
mod_portaudio and mod_portaudio_stream to use the system version of
the library.  Our detection of the system library relies on
pkg-config.
2014-07-17 21:15:53 +00:00
Steve Underwood 52435978d0 Step FAX modem type on sending CTC. 2014-07-17 22:32:17 +08:00
Jeff Lenk 419a2a617d FS-6542 oart 1 this will break vs2012 temporarily unless you manually delete libs\portaudio 2014-07-17 00:34:42 -05:00
Anthony Minessale 6c80281ce9 buffer websocket headers and body before sending to avoid fragmentation 2014-07-17 01:07:57 +05:00
Steve Underwood 6f439d3741 Tweaks, and a fix for FAX polling. 2014-07-16 23:26:20 +08:00
Moises Silva ae9e740d7f freetdm: ftdm_gsm: Remove some old debug code 2014-07-13 03:06:28 -04:00
Moises Silva 4bc1b731cb freetdm: ftdmod_gsm: Allow hwdtmf parameter to accept detect or generate
You can now enable the hardware dtmf detection and/or generation
2014-07-13 02:46:28 -04:00
Moises Silva ff935bb1d9 Revert "freetdm: ftmod_wanpipe: Do not attempt to initialize hwdtmf in GSM ports during shutdown"
This reverts commit b29a41bb1b.

This commit is no longer needed now that proper infrastructure has been
added to allow signaling modules to generate and detect DTMF

The feature macros should only be used for I/O module features
and not for signaling module features
2014-07-13 02:21:06 -04:00
Moises Silva 64489c54ee freetdm: Added support for DTMF generation to be performed in the signaling modules (currently only used by the gsm signaling driver) 2014-07-13 02:16:58 -04:00
Moises Silva e742522597 mod_freetdm: Fix several leaks on module shutdown 2014-07-13 00:35:48 -04:00
Moises Silva b29a41bb1b freetdm: ftmod_wanpipe: Do not attempt to initialize hwdtmf in GSM ports during shutdown 2014-07-13 00:35:48 -04:00
Anthony Minessale b53ba668fa rebuild 2014-07-12 04:39:56 +05:00
Anthony Minessale cc75547672 merge ws.c change to sofia 2014-07-12 04:39:41 +05:00
Moises Silva 0b6f10a6a8 freetdm: ftmod_gsm: Added support for hardware DTMF 2014-07-11 00:52:32 -04:00
Steve Underwood 54b6a0abce Added explanatory comment on a recent change. 2014-07-09 10:18:00 +08:00
Steve Underwood 992debeea4 Merge branch 'master' of ssh://stash.freeswitch.org:7999/fs/freeswitch 2014-07-09 00:14:31 +08:00
Michael Jerris a99f06dfc6 sync changes from srtp upstream 2014-07-08 10:26:08 -04:00
Steve Underwood 40214821cb Added additional checks that HDLC frames arriving at the T.38 gateway engine
begin with the correct 2 bytes.
2014-07-08 20:48:15 +08:00
Chris Rienzo 9b14633cf3 fs_cli: fix compiler error on CentOS 6 caused by recent short uuid logging change 2014-06-30 17:30:59 -04:00
jfigus 024162cfc9 Add support for 16-byte auth tag for AES GCM mode. 2014-06-30 19:18:20 +00:00
jfigus b9da5149e2 Set the algorithm member on cipher_t when allocating AES crypto instance. Apply same fix to NULL cipher. 2014-06-30 19:18:20 +00:00
Travis Cross aa4261d11f Avoid buffer-overflow on short RTCP/SRTCP packets
In `srtp_unprotect_rtcp()` we are not validating that the packet
length is as long as the minimum required.  This would cause
`enc_octet_len` to underflow, which would cause us to try to decrypt
data past the end of the packet in memory -- a buffer over-read and
buffer overflow.

In `srtp_protect_rtcp()`, we were similarly not validating the packet
length.  Here we were also polluting the address of the SRTCP
encrypted flag and index (the `trailer`), causing us to write one word
to a bogus memory address before getting to the encryption where we
would also overflow.

In this commit we add checks to appropriately validate the RTCP/SRTCP
packet lengths.

`srtp_unprotect_rtcp_aead()` (but not protect) did correctly validate
the packet length; this check would now be redundant as the check in
`srtcp_unprotect_rtcp()` will also run first, so it has been removed.
2014-06-30 19:00:35 +00:00
Travis Cross 9ea93c4c50 Avoid buffer over-read on null cipher AEAD
In the defined AEAD modes, SRTP packets must always be encrypted and
authenticated, but SRTCP packets may be only authenticated.  It's
possible, therefore, for us to end up in `srtp_protect_aead()` without
the `sec_serv_conf` bit being set.  We should just ignore this and
encrypt the RTP packet anyway.

What we are doing instead is encrypting the packet anyway, but setting
`enc_start` to NULL first.  This causes `aad_len` to underflow which
will cause us to over-read in `cipher_set_aad()`.

If we could get past that, we would try to read and write memory
starting at 0x0 down in `cipher_encrypt()`.

This commit causes us to not check the `sec_serv_conf` bit and never
set `enc_start` to NULL in `srtp_protect_aead()`.

`srtp_unprotect_aead()` does not contain a similar error.
2014-06-30 19:00:35 +00:00
Travis Cross 3bf2b9af75 Prevent buffer overflow from untrusted RTP/SRTP lengths
When computing the start address of the RTP data to encrypt or SRTP
data to decrypt (`enc_start`), we are using `hdr->cc` (the CSRC
count), which is untrusted data from the packet, and the length field
of an RTP header extension, which is also untrusted and unchecked data
from the packet.

This value then pollutes our calculation of how much data we'll be
encrypting or decrypting (`enc_octet_len`), possibly causing us to
underflow.

We'll then call `cipher_encrypt()` or `cipher_decrypt()` with these
two values, causing us to read from and write to arbitrary addresses
in memory.

(In the AEAD functions, we'd also pollute `aad_len`, which would cause
us to read undefined memory in `cipher_set_aad`.)

This commit adds checks to verify that the `enc_start` we calculate is
sane based on the actual packet length.
2014-06-30 19:00:35 +00:00
Travis Cross d2aaf15992 Fix misspelling in comment 2014-06-30 19:00:34 +00:00
Steve Underwood c3798dbb02 FAX tweaks 2014-06-29 02:11:25 +08:00
Steve Underwood ad1e7e9632 Fixed updating of the modem type after a FAX ECM CTC. 2014-06-28 16:43:05 +08:00
Steve Underwood 557f1d05ac Fixed issue handling modem renegotiation when a T.30 CTC message is received.
Please enter the commit message for your changes. Lines starting
2014-06-23 08:51:41 +08:00
Steve Underwood b15f373cd9 Tweaks 2014-06-20 02:58:33 +08:00
Steve Underwood b780371943 Improved TSB85 tests, which now check call clearing.
FAX now differentiates properly between <page result code> and <image> <page resuly code> when deciding how to retry.
2014-06-20 00:24:10 +08:00
Brian West d2a487dce3 date would have done the same thing 2014-06-18 08:58:49 -05:00
Brian West fb92ebc8f2 FS-5223 and FS-6603, don't trust docs... sheesh 2014-06-18 08:33:57 -05:00
Brian West 311889634b FS-5223 FS-6603 on platforms that have SO_REUSEPORT it also implies SO_REUSEADDR, On platforms that only have SO_REUSEADDR it seems to imply both in the absence of SO_REUSEPORT. 2014-06-17 21:15:02 -05:00
Michael Jerris 0a6a10f584 FS-6604: fix this same issue in esl too 2014-06-17 12:10:47 -05:00
Peter Olsson e7ee4050b2 Add ldns to .gitignore 2014-06-15 13:51:56 +02:00
Steve Underwood fc7a74905b Various little memory leak possibilities in spandsp sorts, and the spandsp
test suite is now mostly OK with valgrind.
2014-06-14 19:49:05 +08:00
Steve Underwood 94ab52cd01 Improved FAX disconnect handling 2014-06-11 10:52:54 +08:00
Steve Underwood 10647be5a0 Fixed incorrect T.30 CTC messages. Fixed reseting of the CRC generator
in the HDLC tx code
2014-06-11 01:49:29 +08:00