1. 19 Apr, 2019 2 commits
  2. 18 Apr, 2019 1 commit
    • Richard Levitte's avatar
      asn1parse: avoid double free · 18111b13
      Richard Levitte authored
      
      
      |str| was used for multiple conflicting purposes.  When using
      '-strictpem', it's used to uniquely hold a reference to the loaded
      payload.  However, when using '-strparse', |str| was re-used to hold
      the position from where to start parsing.
      
      So when '-strparse' and '-strictpem' are were together, |str| ended up
      pointing into data pointed at by |at|, and was yet being freed, with
      the result that the payload it held a reference to became a memory
      leak, and there was a double free conflict when both |str| and |at|
      were being freed.
      
      The situation is resolved by always having |buf| hold the pointer to
      the file data, and always and only use |str| to hold the position to
      start parsing from.  Now, we only need to free |buf| properly and not
      |str|.
      
      Fixes #8752
      
      Reviewed-by: default avatarMatthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
      (Merged from https://github.com/openssl/openssl/pull/8753)
      
      (cherry picked from commit 4f29f3a29b8b416a501c7166dbbca5284b198f81)
      18111b13
  3. 16 Apr, 2019 5 commits
  4. 15 Apr, 2019 6 commits
  5. 14 Apr, 2019 1 commit
  6. 10 Apr, 2019 5 commits
  7. 09 Apr, 2019 1 commit
  8. 08 Apr, 2019 1 commit
  9. 06 Apr, 2019 1 commit
  10. 05 Apr, 2019 2 commits
  11. 04 Apr, 2019 1 commit
  12. 03 Apr, 2019 1 commit
  13. 02 Apr, 2019 3 commits
  14. 31 Mar, 2019 1 commit
  15. 30 Mar, 2019 1 commit
  16. 29 Mar, 2019 4 commits
  17. 28 Mar, 2019 3 commits
  18. 27 Mar, 2019 1 commit
    • Jake Massimo's avatar
      Increase rounds of Miller-Rabin testing DH_check · af6ce3b4
      Jake Massimo authored
      DH_check is used to test the validity of Diffie-Hellman parameter sets (p, q, g). Among the tests performed are primality tests on p and q, for this BN_is_prime_ex is called with the rounds of Miller-Rabin set as default. This will therefore use the average case error estimates derived from the function BN_prime_checks_for_size based on the bit size of the number tested.
      
      However, these bounds are only accurate on testing random input. Within this testing scenario, where we are checking the validity of a DH parameter set, we can not assert that these parameters are randomly generated. Thus we must treat them as if they are adversarial in nature and increase the rounds of Miller-Rabin performed.
      
      Generally, each round of Miller-Rabin can declare a composite number prime with probability at most (1/4), thus 64 rounds is sufficient in thwarting known generation techniques (even in safe prime settings - see https://eprint.iacr.org/2019/032
      
       for full analysis). The choice of 64 rounds is also consistent with SRP_NUMBER_ITERATIONS_FOR_PRIME 64 as used in srp_Verify_N_and_g in openssl/apps/s_client.c.
      
      Reviewed-by: default avatarPaul Dale <paul.dale@oracle.com>
      Reviewed-by: default avatarMatt Caswell <matt@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/8593)
      
      (cherry picked from commit 2500c093)
      af6ce3b4