Commit Graph

6701 Commits

Author SHA1 Message Date
William King 9d68e99268 FS-6303 --resolve 2014-08-14 19:45:47 +00:00
Travis Cross cda7ecc4b2 Fix line endings per .gitattributes 2014-08-09 02:13:22 +05:00
Anthony Minessale 76f6507ea6 fix jb endless loop of missing packets 2014-07-03 07:56:44 -05:00
Chris Rienzo 2b62885f21 fs_cli: fix compiler error on CentOS 6 caused by recent short uuid logging change 2014-06-30 17:31:13 -04:00
Anthony Minessale 9dde4b1548 sync up jb changes 2014-06-18 01:48:47 +05:00
Michael Jerris 269c3fe923 FS-6533: --resolve fix gcc 4.9 warning due to useless right-hand operand of comma expression 2014-06-11 05:17:05 +00:00
Michael Jerris c29e4b0cf0 FS-6538: silence gcc 4.9 throwing incorrect warning 2014-06-11 05:17:04 +00:00
Travis Cross ca0d10f283 Improve a parameter name for fs_cli
What we momentarily called log-uuid-chars is now better called
log-uuid-length.  Setting log-uuid-length will specify a truncation
length for UUIDs displayed by setting log-uuid.
2014-06-10 23:57:29 +00:00
Travis Cross 8af2469c71 Add log-uuid-short option to fs_cli
If log-uuid-short is set, or -S is passed to fs_cli, we only display
the first 8 hex digits of the UUID.  The log-uuid-chars option may
instead be set to specify some other truncation length for the UUID.
2014-06-10 23:57:28 +00:00
Travis Cross 9782b8bbea Convert esl_true and esl_false to functions
Prior to this commit, an expression such as:

  esl_true("true") ? 42 : 0

...would return 1 rather than 42.
2014-06-10 23:57:28 +00:00
Michael Jerris 28efa9e6a2 FS-6500: try to do the bounds checking properly using element of the enum 2014-05-02 00:00:46 +05:00
Travis Cross b013a494b5 Fix typo in comment 2014-04-19 03:01:31 +00:00
Anthony Minessale 370230e323 update 2014-04-17 04:33:21 +05:00
Anthony Minessale 41fa2c9c6a FS-6462 --resolve
I found a problem here but it may not completely match your expectations.
I reviewed the RFC 4028 and checked against the code and I discovered we should not be putting a Min-SE in any response at all besides a 422:

section 5:

   The Min-SE header field MUST NOT be used in responses except for
   those with a 422 response code.  It indicates the minimum value of
   the session interval that the server is willing to accept.

I corrected this problem and implemented the 422 response so if you request a value lower than the minimum specified for the profile.
If the value is equal or higher to the minimum, it will be reflected in the Session-Expires header in the response and no Min-SE will be present.
2014-04-17 04:32:44 +05:00
Travis Cross 39bbcaff1b Avoid crash on event without content-type
If we received an event without a content-type header we were
dereferencing a null pointer leading to a seg fault.

Reported-by: Ico <ico@voip-io.org>

ESL-90 --resolve
2014-04-09 05:30:22 +00:00
Brian West 4425265038 ESL-89: fix install path and single_command require
Conflicts:
	libs/esl/ruby/single_command.rb
2014-04-07 16:29:45 -04:00
Michael Jerris 58331abefa ESL-89: --resolve add rubymod-install and add ability to use a ruby not in your path by setting RUBY env var
Conflicts:
	libs/esl/Makefile.am
2014-04-07 15:50:30 -04:00
Anthony Minessale a296cdaba2 force sofia rebuild 2014-04-04 23:44:42 +05:00
Anthony Minessale 87b935d6a1 FS-6287 2014-04-04 13:42:29 -05:00
Ico 73790b4f0d Fix memory leak when outbound socket is closed by server
ESL-88 --resolve

Signed-off-by: Travis Cross <tc@traviscross.com>
2014-03-26 01:37:53 +00:00
Anthony Minessale 01e12f6b0f force rebuild 2014-03-17 16:18:04 -05:00
Anthony Minessale fdafab786a FS-6287 --resolve 2014-03-17 16:17:41 -05:00
Travis Cross 8b496f976e Mitigate the CRIME TLS flaw
If an attacker can cause a device to make an authenticated request to
a service via TLS while including a payload of the attacker's choice
in that request, and if TLS compression is enabled, the attacker can
uncover the plaintext authentication information by making a series of
guesses and observing changes in the length of the ciphertext.

This is CVE-2012-4929.

FS-6360 --resolve

Thanks-to: Brian West <brian@freeswitch.org>
2014-03-16 16:07:02 +00:00
Anthony Minessale cd1bab675a force sofia update 2014-03-14 12:27:45 -05:00
Anthony Minessale c067e892c5 FS-6287 --resolve When a broken registrar sends a 401 unauth then replies with a subsequent 401 unauth without the stale=true attribute, sofia tries to invalidate the auth handle and get stuck in a state where it cannot recover until the reg handle is destroyed. In this case, the provider in question has a bug on thier end when the nonce count rolls from nc=000000ff to nc=00000100 they start sending several consecitive 401 rather than a 401 with stale=true or a 403. This change will allow it to reset properly and try again with nc=00000001 on the next try. 2014-03-14 12:26:06 -05:00
Anthony Minessale 73b2894b05 FS-6339 --resolve
Conflicts:
	libs/sofia-sip/.update
2014-03-11 18:18:05 -05:00
Brian West 65fed130e5 Fix warning when using older openssl libs.
warning: passing argument 1 of 'SSL_CIPHER_description' discards qualifiers from pointer target type
2014-03-09 16:21:37 -05:00
Travis Cross 1aa0ec5f81 Fix use of out of scope declaration 2014-03-06 08:48:21 +00:00
Travis Cross 64e1a65363 Drop null-auth suites from our default TLS cipher list
Previously we disallowed anonymous Diffie-Hellman, but there are other
kinds of null-authentication TLS suites.  In particular, disallowing
AECDH is important now that we support elliptic-curve Diffie-Hellman.
2014-03-05 21:39:53 +00:00
Brian West d2ce0485f4 FS-6276 move our include first so that ours is used and not the system if its present 2014-03-04 20:32:17 -06:00
Jeff Lenk 787e7f7495 FS-6295 try now 2014-03-03 21:09:56 -06:00
Travis Cross 8553498d98 Show TLS cipher suite selected in sofia debug
This shows the cipher name, TLS version, the number of cipher bits and
algorithm bits, and a description of the cipher in Sofia's debug
logging output on level 9.
2014-03-02 10:37:04 +00:00
Travis Cross a1b536be3a Fix missing/duplicate declaration
This looks like a copy/paste error.

FS-6037 --resolve

Thanks-to: David Sanders <dsanders@pinger.com>
2014-03-02 10:35:57 +00:00
Anthony Minessale 89c5355cb8 FS-6168 --resolve 2014-02-28 23:30:51 +05:00
Travis Cross 3366fe95b0 Prevent sqlite from over-reading a structure
Our sqlite fork was reading past the end of the zP3 KeyInfo structure
here.  This was causing gcc and clang's address sanitization to alert.

FS-6279 --resolve

Thanks-to: Christopher Rienzo <chris@rienzo.net>
2014-02-27 23:34:50 +00:00
Jeff Lenk 9612a92179 ESL-81 --resolve 2014-02-16 10:19:07 -06:00
Ken Rice 8dbad1172e copyright header update 2014-02-12 15:25:54 -06:00
Travis Cross 81863e44b6 Force sofia rebuild
The rebuild is needed for commit cd6154b49e.
2014-02-11 17:47:09 +00:00
Travis Cross 92e2caf86b Rework handling of Linux TCP keepalives in Sofia
This separates out the Linux socket TCP keepalive timeout interval
from Sofia's internal mechanisms.  Earlier we tied these together.  In
retrospect this seems improper.

These two values can now be set separately.

You might, for example, want to keep the Sofia internal mechanism
disabled completely while enabling the platform-based mechanism if
your platform supports it.

We also here reform the default value of the socket TCP keepalive
parameter to 30 seconds.

This is what commit 1bf17857c9 should
have been.

FS-6104
2014-02-11 06:39:50 +00:00
Travis Cross f7c4dd79f5 Add additional debugging output to keepalive handling 2014-02-11 06:34:43 +00:00
Travis Cross 01a4aeaaeb Synchronize Sofia and Linux TCP keepalive timeout units
Sofia keeps the TCP keepalive timeout in milliseconds, but Linux
expects the value in seconds.  Before this change, it's unlikely the
TCP_KEEPIDLE and TCP_KEEPINTVL calls were having much effect as we
would have been passing them a huge value.

FS-6104
2014-02-11 06:34:40 +00:00
Travis Cross e2639e1d4d Add ifdefs around TLS v1.1 and v1.2 handling
This is needed to support squeeze for awhile longer.
2014-02-10 04:09:52 +00:00
Jonathan Lennox 50791508b1 Fix inline functions when compiling as C99.
Make private inlines in C files 'static inline', not just 'inline', or the compiler
can discard the definition if it chooses not to inline it.

Make functions declared in header files not be declared inline (if they're defined in a
.c file).  It looks like no functions in this category are used in LibSRTP's critical
path, only for unit tests or generating AES tables.

To see the problem prior to this commit, compile with "gcc -O0 -std=gnu99".

Signed-off-by: Travis Cross <tc@traviscross.com>

This cherry-picks commit e2774dbd551ffe5f872eaec2b2d40b712a54e1ba from
libsrtp upstream.

FS-6196 --resolve
2014-02-09 22:34:05 +00:00
Travis Cross d1e40b088a Add OpenSSL version check around ECDH
...we'll try to support ancient OpenSSL versions on v1.2 for awhile
longer.
2014-02-09 22:33:52 +00:00
Travis Cross 1398975622 Add support for EECDH to Sofia-SIP
This adds support for the ephemeral elliptic curve Diffie-Hellman key
exchange, which provides for forward secrecy in the event that
long-term keys are compromised.

For the moment, we've hard-coded the curve as prime256v1.
2014-02-09 20:13:44 +00:00
Brian West fcbb664df9 ESL-66 2014-02-07 13:10:08 -06:00
Michael Jerris 5dcfe78169 FS-5763: --resolve add configure check for lzma and newer readhat/sl tinfo stuff 2014-02-06 12:41:52 -06:00
Travis Cross 25c65d52c5 Allow setting TLS cipher suites through Sofia-SIP API
Previously there was no way to override the hard-coded cipher suite
specification of "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH".

This commit does leave in place the hardcoded cipher spec for WebRTC
of "HIGH:!DSS:!aNULL@STRENGTH".
2014-02-06 06:04:32 +00:00
Travis Cross 7f772b2601 Allow setting enabled TLS versions in Sofia-SIP
Previously if the TPTAG_TLS_VERSION was set to a non-zero value we
supported only TLSv1 (but not TLSv1.1 or TLSv1.2), and if was set to
zero we supported all versions of TLS and SSL (including the
ridiculous SSLv2).

Now we take an integer field where various bits can be set indicating
which versions of TLS we would like to support.
2014-02-06 02:45:50 +00:00
Moises Silva 3eb27f970d Fix ESL infinite loop on handle_recv() when errno is already set
system calls do not clear errno, just set it in case of failure, so we
gotta make sure the recv() syscall really failed by checking the return value
2014-02-01 01:40:45 +05:00