1. 02 6月, 2023 1 次提交
    • R
      Restrict the size of OBJECT IDENTIFIERs that OBJ_obj2txt will translate · b436274c
      Richard Levitte 提交于
      OBJ_obj2txt() would translate any size OBJECT IDENTIFIER to canonical
      numeric text form.  For gigantic sub-identifiers, this would take a very
      long time, the time complexity being O(n^2) where n is the size of that
      sub-identifier.
      
      To mitigate this, a restriction on the size that OBJ_obj2txt() will
      translate to canonical numeric text form is added, based on RFC 2578
      (STD 58), which says this:
      
      > 3.5. OBJECT IDENTIFIER values
      >
      > An OBJECT IDENTIFIER value is an ordered list of non-negative numbers.
      > For the SMIv2, each number in the list is referred to as a sub-identifier,
      > there are at most 128 sub-identifiers in a value, and each sub-identifier
      > has a maximum value of 2^32-1 (4294967295 decimal).
      
      Fixes otc/security#96
      Fixes CVE-2023-2650
      Reviewed-by: NMatt Caswell <matt@openssl.org>
      Reviewed-by: NTomas Mraz <tomas@openssl.org>
      Signed-off-by: Ncode4lala <fengziteng2@huawei.com>
      b436274c
  2. 12 4月, 2023 2 次提交
  3. 01 7月, 2022 1 次提交
  4. 10 8月, 2021 1 次提交
  5. 27 2月, 2020 1 次提交
  6. 02 1月, 2020 1 次提交
  7. 03 10月, 2019 1 次提交
  8. 28 9月, 2019 2 次提交
    • D
      Reorganize local header files · b5acbf91
      Dr. Matthias St. Pierre 提交于
      Apart from public and internal header files, there is a third type called
      local header files, which are located next to source files in the source
      directory. Currently, they have different suffixes like
      
        '*_lcl.h', '*_local.h', or '*_int.h'
      
      This commit changes the different suffixes to '*_local.h' uniformly.
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/9681)
      b5acbf91
    • D
      Reorganize private crypto header files · 0c994d54
      Dr. Matthias St. Pierre 提交于
      Currently, there are two different directories which contain internal
      header files of libcrypto which are meant to be shared internally:
      
      While header files in 'include/internal' are intended to be shared
      between libcrypto and libssl, the files in 'crypto/include/internal'
      are intended to be shared inside libcrypto only.
      
      To make things complicated, the include search path is set up in such
      a way that the directive #include "internal/file.h" could refer to
      a file in either of these two directoroes. This makes it necessary
      in some cases to add a '_int.h' suffix to some files to resolve this
      ambiguity:
      
        #include "internal/file.h"      # located in 'include/internal'
        #include "internal/file_int.h"  # located in 'crypto/include/internal'
      
      This commit moves the private crypto headers from
      
        'crypto/include/internal'  to  'include/crypto'
      
      As a result, the include directives become unambiguous
      
        #include "internal/file.h"       # located in 'include/internal'
        #include "crypto/file.h"         # located in 'include/crypto'
      
      hence the superfluous '_int.h' suffixes can be stripped.
      
      The files 'store_int.h' and 'store.h' need to be treated specially;
      they are joined into a single file.
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/9681)
      0c994d54
  9. 24 5月, 2019 1 次提交
  10. 08 1月, 2019 1 次提交
  11. 03 1月, 2019 1 次提交
  12. 04 9月, 2018 1 次提交
  13. 10 8月, 2018 1 次提交
  14. 07 8月, 2018 1 次提交
  15. 01 8月, 2018 1 次提交
  16. 09 6月, 2018 1 次提交
  17. 27 4月, 2018 1 次提交
  18. 17 4月, 2018 1 次提交
  19. 03 4月, 2018 1 次提交
  20. 20 3月, 2018 1 次提交
  21. 19 3月, 2018 1 次提交
  22. 15 3月, 2018 1 次提交
  23. 13 3月, 2018 2 次提交
  24. 08 3月, 2018 1 次提交
  25. 02 3月, 2018 1 次提交
  26. 28 2月, 2018 1 次提交
  27. 27 2月, 2018 1 次提交
  28. 14 2月, 2018 1 次提交
  29. 13 2月, 2018 1 次提交
  30. 01 2月, 2018 1 次提交
    • B
      Revert the crypto "global lock" implementation · 63ab5ea1
      Benjamin Kaduk 提交于
      Conceptually, this is a squashed version of:
      
          Revert "Address feedback"
      
          This reverts commit 75551e07.
      
      and
      
          Revert "Add CRYPTO_thread_glock_new"
      
          This reverts commit ed6b2c79.
      
      But there were some intervening commits that made neither revert apply
      cleanly, so instead do it all as one shot.
      
      The crypto global locks were an attempt to cope with the awkward
      POSIX semantics for pthread_atfork(); its documentation (the "RATIONALE"
      section) indicates that the expected usage is to have the prefork handler
      lock all "global" locks, and the parent and child handlers release those
      locks, to ensure that forking happens with a consistent (lock) state.
      However, the set of functions available in the child process is limited
      to async-signal-safe functions, and pthread_mutex_unlock() is not on
      the list of async-signal-safe functions!  The only synchronization
      primitives that are async-signal-safe are the semaphore primitives,
      which are not really appropriate for general-purpose usage.
      
      However, the state consistency problem that the global locks were
      attempting to solve is not actually a serious problem, particularly for
      OpenSSL.  That is, we can consider four cases of forking application
      that might use OpenSSL:
      
      (1) Single-threaded, does not call into OpenSSL in the child (e.g.,
      the child calls exec() immediately)
      
      For this class of process, no locking is needed at all, since there is
      only ever a single thread of execution and the only reentrancy is due to
      signal handlers (which are themselves limited to async-signal-safe
      operation and should not be doing much work at all).
      
      (2) Single-threaded, calls into OpenSSL after fork()
      
      The application must ensure that it does not fork() with an unexpected
      lock held (that is, one that would get unlocked in the parent but
      accidentally remain locked in the child and cause deadlock).  Since
      OpenSSL does not expose any of its internal locks to the application
      and the application is single-threaded, the OpenSSL internal locks
      will be unlocked for the fork(), and the state will be consistent.
      (OpenSSL will need to reseed its PRNG in the child, but that is
      an orthogonal issue.)  If the application makes use of locks from
      libcrypto, proper handling for those locks is the responsibility of
      the application, as for any other locking primitive that is available
      for application programming.
      
      (3) Multi-threaded, does not call into OpenSSL after fork()
      
      As for (1), the OpenSSL state is only relevant in the parent, so
      no particular fork()-related handling is needed.  The internal locks
      are relevant, but there is no interaction with the child to consider.
      
      (4) Multi-threaded, calls into OpenSSL after fork()
      
      This is the case where the pthread_atfork() hooks to ensure that all
      global locks are in a known state across fork() would come into play,
      per the above discussion.  However, these "calls into OpenSSL after
      fork()" are still subject to the restriction to async-signal-safe
      functions.  Since OpenSSL uses all sorts of locking and libc functions
      that are not on the list of safe functions (e.g., malloc()), this
      case is not currently usable and is unlikely to ever be usable,
      independently of the locking situation.  So, there is no need to
      go through contortions to attempt to support this case in the one small
      area of locking interaction with fork().
      
      In light of the above analysis (thanks @davidben and @achernya), go
      back to the simpler implementation that does not need to distinguish
      "library-global" locks or to have complicated atfork handling for locks.
      Reviewed-by: NKurt Roeckx <kurt@roeckx.be>
      Reviewed-by: NMatthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
      (Merged from https://github.com/openssl/openssl/pull/5089)
      63ab5ea1
  31. 24 1月, 2018 1 次提交
  32. 08 12月, 2017 1 次提交
  33. 12 11月, 2017 1 次提交
  34. 06 11月, 2017 1 次提交
  35. 31 10月, 2017 1 次提交
  36. 18 10月, 2017 1 次提交
  37. 17 10月, 2017 1 次提交