1. 07 Dec, 2017 3 commits
  2. 06 Dec, 2017 3 commits
    • Matt Caswell's avatar
      Add a test for CVE-2017-3737 · c7383fb5
      Matt Caswell authored
      
      
      Test reading/writing to an SSL object after a fatal error has been
      detected.
      
      Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
      c7383fb5
    • Matt Caswell's avatar
      Don't allow read/write after fatal error · 898fb884
      Matt Caswell authored
      
      
      OpenSSL 1.0.2 (starting from version 1.0.2b) introduced an "error state"
      mechanism. The intent was that if a fatal error occurred during a handshake
      then OpenSSL would move into the error state and would immediately fail if
      you attempted to continue the handshake. This works as designed for the
      explicit handshake functions (SSL_do_handshake(), SSL_accept() and
      SSL_connect()), however due to a bug it does not work correctly if
      SSL_read() or SSL_write() is called directly. In that scenario, if the
      handshake fails then a fatal error will be returned in the initial function
      call. If SSL_read()/SSL_write() is subsequently called by the application
      for the same SSL object then it will succeed and the data is passed without
      being decrypted/encrypted directly from the SSL/TLS record layer.
      
      In order to exploit this issue an attacker would have to trick an
      application into behaving incorrectly by issuing an SSL_read()/SSL_write()
      after having already received a fatal error.
      
      Thanks to David Benjamin (Google) for reporting this issue and suggesting
      this fix.
      
      CVE-2017-3737
      
      Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
      898fb884
    • Andy Polyakov's avatar
      bn/asm/rsaz-avx2.pl: fix digit correction bug in rsaz_1024_mul_avx2. · ca51bafc
      Andy Polyakov authored
      
      
      Credit to OSS-Fuzz for finding this.
      
      CVE-2017-3738
      
      Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
      ca51bafc
  3. 04 Dec, 2017 1 commit
  4. 30 Nov, 2017 1 commit
  5. 16 Nov, 2017 1 commit
  6. 14 Nov, 2017 1 commit
  7. 13 Nov, 2017 2 commits
  8. 11 Nov, 2017 2 commits
  9. 10 Nov, 2017 1 commit
  10. 08 Nov, 2017 1 commit
  11. 07 Nov, 2017 4 commits
  12. 03 Nov, 2017 3 commits
  13. 02 Nov, 2017 5 commits
  14. 01 Nov, 2017 3 commits
  15. 26 Oct, 2017 2 commits
  16. 25 Oct, 2017 1 commit
    • Matt Caswell's avatar
      Don't make any changes to the lhash structure if we are going to fail · 1aa0fcfb
      Matt Caswell authored
      
      
      The lhash expand() function can fail if realloc fails. The previous
      implementation made changes to the structure and then attempted to do a
      realloc. If the realloc failed then it attempted to undo the changes it
      had just made. Unfortunately changes to lh->p were not undone correctly,
      ultimately causing subsequent expand() calls to increment num_nodes to a
      value higher than num_alloc_nodes, which can cause out-of-bounds reads/
      writes. This is not considered a security issue because an attacker cannot
      cause realloc to fail.
      
      This commit moves the realloc call to near the beginning of the function
      before any other changes are made to the lhash structure. That way if a
      failure occurs we can immediately fail without having to undo anything.
      
      Thanks to Pavel Kopyl (Samsung) for reporting this issue.
      
      Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/4551)
      1aa0fcfb
  17. 24 Oct, 2017 2 commits
  18. 23 Oct, 2017 1 commit
  19. 19 Oct, 2017 1 commit
  20. 13 Oct, 2017 1 commit
  21. 11 Oct, 2017 1 commit
    • Matt Caswell's avatar
      Ensure we test all parameters for BN_FLG_CONSTTIME · 86ccadf5
      Matt Caswell authored
      
      
      RSA_setup_blinding() calls BN_BLINDING_create_param() which later calls
      BN_mod_exp() as follows:
      
      BN_mod_exp(ret->A, ret->A, ret->e, ret->mod, ctx)
      
      ret->mod will have BN_FLG_CONSTTIME set, but ret->e does not. In
      BN_mod_exp() we only test the third param for the existence of this flag.
      We should test all the inputs.
      
      Thanks to Samuel Weiser (samuel.weiser@iaik.tugraz.at) for reporting this
      issue.
      
      This typically only happens once at key load, so this is unlikely to be
      exploitable in any real scenario.
      
      Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/4477)
      
      (cherry picked from commit e913d11f)
      86ccadf5