1. 22 11月, 2019 2 次提交
    • B
      Fix a race condition in SNI handling · 2a538551
      Benjamin Kaduk 提交于
      As was done for ciphers, supported groups, and EC point formats in
      https://github.com/openssl/openssl/pull/9162, only write the negotiated
      SNI hostname value to the session object when not resuming, even for
      TLS 1.3 resumptions.  Otherwise, when using a stateful session cache
      (as is done by default when 0-RTT data is enabled), we can have multiple
      SSLs active using the same in-memory session object, which leads to
      double-frees and similar race conditions in the SNI handler prior
      to this commit.
      
      Fortunately, since draft-ietf-tls-tls13-22, there is no requirement
      that the SNI hostname be preserved across TLS 1.3 resumption, and thus
      not a need to continually update the session object with the "current"
      value (to be used when producing session tickets, so that the subsequent
      resumption can be checked against the current value).  So we can just
      relax the logic and only write to the session object for initial handshakes.
      This still leaves us in a somewhat inconsistent state, since if the SNI value
      does change across handshakes, the session object will continue to record
      the initial handshake's value, even if that bears no relation to the
      current handshake.  The current SSL_get_servername() implementation
      prefers the value from the session if s->hit, but a more complete fix
      for that and related issues is underway in
      https://github.com/openssl/openssl/pull/10018; there is no need to wait
      for the complete fix for SNI name handling in order to close the
      race condition and avoid runtime crashes.
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/10441)
      2a538551
    • P
  2. 21 11月, 2019 5 次提交
  3. 20 11月, 2019 5 次提交
  4. 19 11月, 2019 4 次提交
  5. 18 11月, 2019 3 次提交
    • P
      Properties: make query cache reference count aware. · bdbf2df2
      Pauli 提交于
      The property query cache was not reference count aware and this could cause
      problems if the property store removes an algorithm while it is being returned
      from an asynchronous query.  This change makes the cache reference count aware
      and avoids disappearing algorithms.
      
      A side effect of this change is that the reference counts are now owned by the
      cache and store.
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/10408)
      bdbf2df2
    • S
      Fix Use after free when copying cipher ctx · f75abcc0
      Shane Lontis 提交于
      Fixes #10438
      issue found by clusterfuzz/ossfuzz
      
      The dest was getting a copy of the src structure which contained a pointer that should point to an offset inside itself - because of the copy it was pointing to the original structure.
      
      The setup for a ctx is mainly done by the initkey method in the PROV_CIPHER_HW structure. Because of this it makes sense that the structure should also contain a copyctx method that is use to resolve any pointers that need to be setup.
      
      A dup_ctx has been added to the cipher_enc tests in evp_test. It does a dup after setup and then frees the original ctx. This detects any floating pointers in the duplicated context that were pointing back to the freed ctx.
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/10443)
      f75abcc0
    • R
      PEM: constify PEM_write_ routines · de0799b0
      Richard Levitte 提交于
      There's no reason why the object to be written, or the key string
      given by the caller should be non-const.
      
      This makes the IMPLEMENT_PEM_..._const and  DECLARE_PEM_..._const
      macros superfluous, so we keep them around but mark them deprecated.
      
      In all places where IMPLEMENT_PEM_..._const and  DECLARE_PEM_..._const
      are used, they are replaced with the corresponding macros without
      '_const'.
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/10452)
      de0799b0
  6. 17 11月, 2019 2 次提交
  7. 16 11月, 2019 2 次提交
  8. 15 11月, 2019 5 次提交
  9. 14 11月, 2019 12 次提交