1. 07 8月, 2014 5 次提交
    • A
      Fix return code for truncated DTLS fragment. · b74d1d26
      Adam Langley 提交于
      Previously, a truncated DTLS fragment in
      |dtls1_process_out_of_seq_message| would cause *ok to be cleared, but
      the return value would still be the number of bytes read. This would
      cause |dtls1_get_message| not to consider it an error and it would
      continue processing as normal until the calling function noticed that
      *ok was zero.
      
      I can't see an exploit here because |dtls1_get_message| uses
      |s->init_num| as the length, which will always be zero from what I can
      see.
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      Reviewed-by: NEmilia Käsper <emilia@openssl.org>
      b74d1d26
    • A
      Fix memory leak from zero-length DTLS fragments. · d0a4b7d1
      Adam Langley 提交于
      The |pqueue_insert| function can fail if one attempts to insert a
      duplicate sequence number. When handling a fragment of an out of
      sequence message, |dtls1_process_out_of_seq_message| would not call
      |dtls1_reassemble_fragment| if the fragment's length was zero. It would
      then allocate a fresh fragment and attempt to insert it, but ignore the
      return value, leaking the fragment.
      
      This allows an attacker to exhaust the memory of a DTLS peer.
      
      Fixes CVE-2014-3507
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      Reviewed-by: NEmilia Käsper <emilia@openssl.org>
      d0a4b7d1
    • M
      Fix DTLS handshake message size checks. · 1250f126
      Matt Caswell 提交于
      In |dtls1_reassemble_fragment|, the value of
      |msg_hdr->frag_off+frag_len| was being checked against the maximum
      handshake message size, but then |msg_len| bytes were allocated for the
      fragment buffer. This means that so long as the fragment was within the
      allowed size, the pending handshake message could consume 16MB + 2MB
      (for the reassembly bitmap). Approx 10 outstanding handshake messages
      are allowed, meaning that an attacker could consume ~180MB per DTLS
      connection.
      
      In the non-fragmented path (in |dtls1_process_out_of_seq_message|), no
      check was applied.
      
      Fixes CVE-2014-3506
      
      Wholly based on patch by Adam Langley with one minor amendment.
      Reviewed-by: NEmilia Käsper <emilia@openssl.org>
      1250f126
    • M
    • A
      Avoid double free when processing DTLS packets. · bff1ce4e
      Adam Langley 提交于
      The |item| variable, in both of these cases, may contain a pointer to a
      |pitem| structure within |s->d1->buffered_messages|. It was being freed
      in the error case while still being in |buffered_messages|. When the
      error later caused the |SSL*| to be destroyed, the item would be double
      freed.
      
      Thanks to Wah-Teh Chang for spotting that the fix in 1632ef74 was
      inconsistent with the other error paths (but correct).
      
      Fixes CVE-2014-3505
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      Reviewed-by: NEmilia Käsper <emilia@openssl.org>
      bff1ce4e
  2. 25 7月, 2014 1 次提交
    • D
      Add conditional unit testing interface. · e0fc7961
      Dr. Stephen Henson 提交于
      Don't call internal functions directly call them through
      SSL_test_functions(). This also makes unit testing work on
      Windows and platforms that don't export internal functions
      from shared libraries.
      
      By default unit testing is not enabled: it requires the compile
      time option "enable-unit-test".
      Reviewed-by: NGeoff Thorpe <geoff@openssl.org>
      e0fc7961
  3. 20 7月, 2014 2 次提交
  4. 16 7月, 2014 1 次提交
  5. 15 7月, 2014 1 次提交
  6. 14 7月, 2014 1 次提交
  7. 09 7月, 2014 1 次提交
  8. 06 7月, 2014 1 次提交
  9. 05 7月, 2014 2 次提交
  10. 04 7月, 2014 1 次提交
  11. 02 7月, 2014 5 次提交
  12. 01 7月, 2014 1 次提交
  13. 30 6月, 2014 3 次提交
  14. 29 6月, 2014 1 次提交
  15. 28 6月, 2014 4 次提交
  16. 27 6月, 2014 1 次提交
  17. 23 6月, 2014 3 次提交
  18. 18 6月, 2014 1 次提交
  19. 15 6月, 2014 1 次提交
    • D
      Accept CCS after sending finished. · 3b77f017
      Dr. Stephen Henson 提交于
      Allow CCS after finished has been sent by client: at this point
      keys have been correctly set up so it is OK to accept CCS from
      server. Without this renegotiation can sometimes fail.
      
      PR#3400
      3b77f017
  20. 13 6月, 2014 4 次提交