1. 02 7月, 2014 5 次提交
  2. 01 7月, 2014 4 次提交
  3. 30 6月, 2014 10 次提交
    • Chris Rienzo's avatar
    • jfigus's avatar
      Add support for 16-byte auth tag for AES GCM mode. · 024162cf
      jfigus 提交于
      024162cf
    • jfigus's avatar
      Set the algorithm member on cipher_t when allocating AES crypto instance. Apply… · b9da5149
      jfigus 提交于
      Set the algorithm member on cipher_t when allocating AES crypto instance.  Apply same fix to NULL cipher.
      b9da5149
    • Travis Cross's avatar
      Avoid buffer-overflow on short RTCP/SRTCP packets · aa4261d1
      Travis Cross 提交于
      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.
      aa4261d1
    • Travis Cross's avatar
      Avoid buffer over-read on null cipher AEAD · 9ea93c4c
      Travis Cross 提交于
      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.
      9ea93c4c
    • Travis Cross's avatar
      Prevent buffer overflow from untrusted RTP/SRTP lengths · 3bf2b9af
      Travis Cross 提交于
      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.
      3bf2b9af
    • Travis Cross's avatar
      Fix misspelling in comment · d2aaf159
      Travis Cross 提交于
      d2aaf159
    • Anthony Minessale's avatar
    • Anthony Minessale's avatar
      fix volume adjustments in stereo conference · 7f9348db
      Anthony Minessale 提交于
      7f9348db
    • Anthony Minessale's avatar
      41a7d1cf
  4. 29 6月, 2014 7 次提交
  5. 28 6月, 2014 6 次提交
    • Steve Underwood's avatar
      FAX tweaks · c3798dbb
      Steve Underwood 提交于
      c3798dbb
    • Steve Underwood's avatar
      ad1e7e96
    • Travis Cross's avatar
      Handle SRTP_READ_ERROR in mod_rayo · 7741f403
      Travis Cross 提交于
      7741f403
    • Travis Cross's avatar
      Allow more SRTP errors before killing call · f31641f4
      Travis Cross 提交于
      In a carrier interop we saw the call get killed for SRTP failures
      during a reinvite.  We're wondering if the SRTP errors may have been
      transitory and if it may have recovered after a few more packets.
      
      It's debatable whether we should kill calls at all for SRTP auth
      failures; semantically the right thing to do when a MAC fails is to
      ignore the packet completely.  So raising this limit to 100 packets
      shouldn't do any harm.  With this change we still warn at 10 errors
      and every 10 errors thereafter.
      f31641f4
    • Travis Cross's avatar
      Relay cause of hangup on SRTP failure · 7406be69
      Travis Cross 提交于
      We hangup the channel after receiving 10 SRTP packets in a row with a
      bad auth tag or that are replayed.  Prior to this commit we were
      indicating a normal clearing.  When doing interop and looking first at
      packet traces, this made freeswitch's behavior look surprising.  With
      this commit we'll indicate more loudly what's happening.
      7406be69
    • Travis Cross's avatar
      Fix misspelled function · 52892b31
      Travis Cross 提交于
      switch_rtp_set_invalid_handler has been misspelled as
      switch_rtp_set_invald_handler going all the way back to the
      beginning.  So while it's possible that someone somewhere could be
      relying on this misspelling, I think it's more likely that no one has
      used it much and that's why it wasn't spotted.  We don't even use it
      ourselves anywhere anymore.
      
      Introduced in commit: 828e0371
      52892b31
  6. 27 6月, 2014 2 次提交
  7. 26 6月, 2014 2 次提交
    • Travis Cross's avatar
      Ensure mod_sofia params can be unset or reset · 80ed14ab
      Travis Cross 提交于
      This is the result of auditing each mod_sofia profile parameter to
      ensure that it can be unset or reset after being set.  One use-case
      for this being done correctly is so a later parameter in a
      configuration file can reliably override an earlier one, which is
      useful for setups with layered include files.
      80ed14ab
    • Travis Cross's avatar
      Avoid leaking memory on sofia profile reload · 75feed68
      Travis Cross 提交于
      We were leaking the string values of apply-candidate-acl parameters.
      75feed68
  8. 25 6月, 2014 4 次提交
    • Travis Cross's avatar
      Terminate format_cdr json files with newline · 63351a10
      Travis Cross 提交于
      In UNIX, text files by definition end with a newline.
      63351a10
    • Travis Cross's avatar
      Allow setting format of log filename in format_cdr · d5fa2841
      Travis Cross 提交于
      This commit allows you to set a `log-file` string parameter in a
      format_cdr profile.  This string is a template that may (and should!)
      contain variables.  This template will be expanded and used as the
      file name of the CDR to be written.  This parameter should contain
      only the template for the file name itself; the path is relative to
      the `log-dir`.
      d5fa2841
    • Travis Cross's avatar
      Allow SIP UPDATE messages without display updates · f7b4ec61
      Travis Cross 提交于
      Previously if send-display-update was set to false we would also
      remove UPDATE from our Allow: headers.  This is unnecessary.  The
      UPDATE message is useful in SIP transactions even if we're not sending
      display updates.
      
      With this commit, we add a new boolean profile flag, allow-update.  If
      set to true we'll send Allow: UPDATE.  If set to false, we will not.
      If there is a conflict with another setting that requires UPDATE
      support, the allow-update parameter will win and a warning will be
      printed.
      
      ref: RFC 3311
      f7b4ec61
    • Anthony Minessale's avatar
      skip update on member channels with no json · ba784f25
      Anthony Minessale 提交于
      ba784f25