Coverity Scan: Analysis completed for openssl/openssl

2022-10-13 Thread scan-admin


Your request for analysis of openssl/openssl has been completed 
successfully.
The results are available at 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yoN-2BQSVjTtaSz8wS4wOr7HlekBtV1P4YRtWclMVkCdvAA-3D-3D8G8f_MulOTlHne1IxTRELXXnGni8d68xSVF-2BUCe3a7Ux-2BjeETtC293twuK2VuIB6aigpcLHZ8w5-2F7XlrOWx2UGU2CL-2BkqujzdDQyhEymLLqQePhhddX9RveDT5XsnJRFd61SBaFvw5T9SlNjG-2FnQ3fzbQqG0naXFVupMekNk7ZvOsjF-2FSymNdoLkYkRBBTvGPDe7e-2Fmz-2FAGRK82C29Ls03lWo28cpuHlccM9J7me-2FYOJpOQ4-3D

Build ID: 487075

Analysis Summary:
   New defects found: 1
   Defects eliminated: 0

If you have difficulty understanding any defects, email us at 
scan-ad...@coverity.com,
or post your question to StackOverflow
at 
https://u15810271.ct.sendgrid.net/ls/click?upn=CTPegkVN6peWFCMEieYYmPWIi1E4yUS9EoqKFcNAiqhRq8qmgeBE-2Bdt3uvFRAFXd-2FlwX83-2FVVdybfzIMOby0qA-3D-3Drngt_MulOTlHne1IxTRELXXnGni8d68xSVF-2BUCe3a7Ux-2BjeETtC293twuK2VuIB6aigpcLHZ8w5-2F7XlrOWx2UGU2CLwzh-2BIo9GHgQJlRxV9oNnvUP8qyd-2BV0VrTTPv9GV4KfoyccK-2BVyzbWSjnXffiiuDTCuCdcb6lBA0nCe3oHHlT5OxNqEeyyl90QTWg02EjXj2vrIT73Uj7rm8cWmt5knR5JpqZhqZWiwSdaGuitLc7A4-3D


[openssl/openssl] 523e05: Fix LLVM vs Apple LLVM version numbering confusion...

2022-10-13 Thread Richard Levitte
  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: 523e0577305bbcc732d22bcb063c6c8ca658874a
  
https://github.com/openssl/openssl/commit/523e0577305bbcc732d22bcb063c6c8ca658874a
  Author: Richard Levitte 
  Date:   2022-10-13 (Thu, 13 Oct 2022)

  Changed paths:
M crypto/bn/asm/rsaz-2k-avx512.pl
M crypto/bn/asm/rsaz-3k-avx512.pl
M crypto/bn/asm/rsaz-4k-avx512.pl

  Log Message:
  ---
  Fix LLVM vs Apple LLVM version numbering confusion, for $avx512ifma

Apple LLVM has a different version numbering scheme than upstream LLVM.
That makes for quite a bit of confusion.

https://en.wikipedia.org/wiki/Xcode#Toolchain_versions to the rescue,
they have collected quite a lot of useful data.

This change is concentrated around the `$avx512ifma` flag

Fixes #16670 for the master branch

Reviewed-by: Paul Dale 
Reviewed-by: Tomas Mraz 
(Merged from https://github.com/openssl/openssl/pull/19361)




[openssl/openssl] e18186: Add translation for ECX group parameter

2022-10-13 Thread Juergen Christ
  Branch: refs/heads/openssl-3.0
  Home:   https://github.com/openssl/openssl
  Commit: e18186aa6ab11fd0d587163a7f9e2103e4df60ac
  
https://github.com/openssl/openssl/commit/e18186aa6ab11fd0d587163a7f9e2103e4df60ac
  Author: Juergen Christ 
  Date:   2022-10-13 (Thu, 13 Oct 2022)

  Changed paths:
M crypto/evp/ctrl_params_translate.c

  Log Message:
  ---
  Add translation for ECX group parameter

Legacy EVP_PKEY_CTX objects did not support the "group" parameter for X25519
and X448.  The translation of this parameter resulted in an error.  This
caused errors for legacy keys and engines.

Fix this situation by adding a translation that simply checks that the correct
parameter is to be set, but does not actually set anything.  This is correct
since the group name is anyway optional for these two curves.

Fixes #19313

Signed-off-by: Juergen Christ 

Reviewed-by: Tomas Mraz 
Reviewed-by: Paul Dale 
Reviewed-by: Hugo Landau 
(Merged from https://github.com/openssl/openssl/pull/19348)

(cherry picked from commit c048779520d47962316ddb436d08a050d5659666)




[openssl/openssl] c04877: Add translation for ECX group parameter

2022-10-13 Thread Juergen Christ
  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: c048779520d47962316ddb436d08a050d5659666
  
https://github.com/openssl/openssl/commit/c048779520d47962316ddb436d08a050d5659666
  Author: Juergen Christ 
  Date:   2022-10-13 (Thu, 13 Oct 2022)

  Changed paths:
M crypto/evp/ctrl_params_translate.c

  Log Message:
  ---
  Add translation for ECX group parameter

Legacy EVP_PKEY_CTX objects did not support the "group" parameter for X25519
and X448.  The translation of this parameter resulted in an error.  This
caused errors for legacy keys and engines.

Fix this situation by adding a translation that simply checks that the correct
parameter is to be set, but does not actually set anything.  This is correct
since the group name is anyway optional for these two curves.

Fixes #19313

Signed-off-by: Juergen Christ 

Reviewed-by: Tomas Mraz 
Reviewed-by: Paul Dale 
Reviewed-by: Hugo Landau 
(Merged from https://github.com/openssl/openssl/pull/19348)




[openssl/openssl] 851152: Fix an occasional CI failure due to unaligned access

2022-10-13 Thread Bernd Edlinger
  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: 8511520842b744d1794ea794c032ce5f78cd874b
  
https://github.com/openssl/openssl/commit/8511520842b744d1794ea794c032ce5f78cd874b
  Author: Bernd Edlinger 
  Date:   2022-10-13 (Thu, 13 Oct 2022)

  Changed paths:
M crypto/bn/rsaz_exp_x2.c

  Log Message:
  ---
  Fix an occasional CI failure due to unaligned access

This happens rarely, but only because very few CI runs
use the exotic CPU type that is necessary to execute
anything within rsaz_exp_x2.c and enable UBSAN at the same time.

crypto/bn/rsaz_exp_x2.c:562:20: runtime error: load of misaligned address 
0x61222cc6 for type 'uint64_t' (aka 'unsigned long'), which requires 8 byte 
alignment
0x61222cc6: note: pointer points here
 84 a3 78 e0 8e 8d  4a a5 51 9c 57 d0 d6 41  f3 26 d1 4e e1 98 42 b5  3a 9f 04 
f1 73 d2 1d bf  73 44
 ^
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior 
crypto/bn/rsaz_exp_x2.c:562:20 in
../../util/wrap.pl ../../fuzz/server-test ../../fuzz/corpora/server => 1
not ok 2 - Fuzzing server

Reviewed-by: Hugo Landau 
Reviewed-by: Paul Dale 
Reviewed-by: Tomas Mraz 
(Merged from https://github.com/openssl/openssl/pull/19394)




[openssl/openssl] c3b464: Improve performance of the encoder collection

2022-10-13 Thread Shane
  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: c3b46409559c18f103ebb2221c6f8af3cd7db00d
  
https://github.com/openssl/openssl/commit/c3b46409559c18f103ebb2221c6f8af3cd7db00d
  Author: slontis 
  Date:   2022-10-13 (Thu, 13 Oct 2022)

  Changed paths:
M crypto/encode_decode/encoder_pkey.c

  Log Message:
  ---
  Improve performance of the encoder collection

Reviewed-by: Richard Levitte 
Reviewed-by: Tomas Mraz 
Reviewed-by: Paul Dale 
Reviewed-by: Hugo Landau 
(Merged from https://github.com/openssl/openssl/pull/19344)




[openssl/openssl] af6379: Fix typo in PKCS12_SAFEBAG_set0_attrs

2022-10-13 Thread faramir-dev
  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: af6379368f81025808689e843a5d86c6402a63a7
  
https://github.com/openssl/openssl/commit/af6379368f81025808689e843a5d86c6402a63a7
  Author: Daniel Fiala 
  Date:   2022-10-13 (Thu, 13 Oct 2022)

  Changed paths:
M crypto/pkcs12/p12_attr.c

  Log Message:
  ---
  Fix typo in PKCS12_SAFEBAG_set0_attrs

Reviewed-by: Matt Caswell 
Reviewed-by: Tomas Mraz 
Reviewed-by: Hugo Landau 
(Merged from https://github.com/openssl/openssl/pull/19359)


  Commit: 9eaf07ffe39e76aca2dfb8e22b8060c75fcbd8e0
  
https://github.com/openssl/openssl/commit/9eaf07ffe39e76aca2dfb8e22b8060c75fcbd8e0
  Author: Daniel Fiala 
  Date:   2022-10-13 (Thu, 13 Oct 2022)

  Changed paths:
M crypto/pkcs12/p12_attr.c
M doc/man3/PKCS12_SAFEBAG_set0_attrs.pod
M include/openssl/pkcs12.h.in

  Log Message:
  ---
  PKCS12_SAFEBAG_set0_attrs: Remove const from function signature

Reviewed-by: Matt Caswell 
Reviewed-by: Tomas Mraz 
Reviewed-by: Hugo Landau 
(Merged from https://github.com/openssl/openssl/pull/19359)


Compare: https://github.com/openssl/openssl/compare/704e8090b4a7...9eaf07ffe39e


[openssl/openssl] 704e80: optimize ossl_sm4_set_key speed

2022-10-13 Thread zzl-360
  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: 704e8090b4a789f52af07de9a3ebbe11db8e19f8
  
https://github.com/openssl/openssl/commit/704e8090b4a789f52af07de9a3ebbe11db8e19f8
  Author: zhangzhilei 
  Date:   2022-10-13 (Thu, 13 Oct 2022)

  Changed paths:
M crypto/sm4/sm4.c

  Log Message:
  ---
  optimize ossl_sm4_set_key speed

this optimization comes from libgcrypt, increse about 48% speed

Benchmark on my AMD Ryzen Threadripper 3990X

before:
Did 5752000 SM4 setup operations in 1000151us (5751131.6 ops/sec)
after:
Did 8506000 SM4 setup operations in 123us (8505804.4 ops/sec)

Reviewed-by: Paul Dale 
Reviewed-by: Hugo Landau 
(Merged from https://github.com/openssl/openssl/pull/19270)