Commit Graph

7181 Commits

Author SHA1 Message Date
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
Anthony Minessale 0685027bd8 FS-6574 --resolve 2014-06-09 14:29:08 -04:00
Jeff Lenk a607c20a94 windows fix for a0e9ddf589 2014-06-08 16:06:32 -05:00