Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
The FDP team is no longer accepting new bugs in Bugzilla. Please report your issues under FDP project in Jira. Thanks.

Bug 2097455

Summary: Replace deprecated OpenSSL APIs with supported ones in OVS
Product: Red Hat Enterprise Linux Fast Datapath Reporter: Numan Siddique <nusiddiq>
Component: openvswitch2.17Assignee: Timothy Redaelli <tredaelli>
Status: CLOSED ERRATA QA Contact: ovs-qe
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: FDP 21.KCC: ctrautma, jhsiao, ralongi, tredaelli
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openvswitch2.17-2.17.0-47.el9fdp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-21 18:19:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Numan Siddique 2022-06-15 17:56:33 UTC
Description of problem:

Below warnings are seen when OVS is compiled in Fedora 36 (openssl version - openssl-3.0.3-1.fc36.x86_64, openssl-devel-3.0.3-1.fc36.x86_64)

----
depbase=`echo lib/dns-resolve.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ./libtool  --tag=CC   --mode=compile env REAL_CC="gcc" CHECK="sparse -Wsparse-error -I ../include/sparse -I ../include -m64 -I /usr/local/include  " cgcc -target=x86_64 -target=host_os_specs -D__MMX__=1 -D__MMX_WITH_SSE__=1 -D__SSE2_MATH__=1 -D__SSE_MATH__=1 -D__SSE__=1 -D__SSE2__=1  -DHAVE_CONFIG_H -I. -I..    -I ../include -I ./include -I ../lib -I ./lib    -Wstrict-prototypes -Wall -Wextra -Wno-sign-compare -Wpointer-arith -Wformat -Wformat-security -Wswitch-enum -Wunused-parameter -Wbad-function-cast -Wcast-align -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-field-initializers -fno-strict-aliasing -Wswitch-bool -Wlogical-not-parentheses -Wsizeof-array-argument -Wbool-compare -Wshift-negative-value -Wduplicated-cond -Wshadow -Wmultistatement-macros -Wcast-align=strict -Werror -Werror   -g -O2 -MT lib/dns-resolve.lo -MD -MP -MF $depbase.Tpo -c -o lib/dns-resolve.lo ../lib/dns-resolve.c &&\
mv -f $depbase.Tpo $depbase.Plo
../lib/stream-ssl.c: In function ‘do_ssl_init’:
../lib/stream-ssl.c:1073:5: error: ‘SSL_CTX_set_tmp_dh_callback’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
 1073 |     SSL_CTX_set_tmp_dh_callback(ctx, tmp_dh_callback);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../lib/stream-ssl.c:29:
/usr/include/openssl/ssl.h:2232:6: note: declared here
 2232 | void SSL_CTX_set_tmp_dh_callback(SSL_CTX *ctx,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
libtool: compile:  env REAL_CC=gcc "CHECK=sparse -Wsparse-error -I ../include/sparse -I ../include -m64 -I /usr/local/include  " cgcc -target=x86_64 -target=host_os_specs -D__MMX__=1 -D__MMX_WITH_SSE__=1 -D__SSE2_MATH__=1 -D__SSE_MATH__=1 -D__SSE__=1 -D__SSE2__=1 -DHAVE_CONFIG_H -I. -I.. -I ../include -I ./include -I ../lib -I ./lib -Wstrict-prototypes -Wall -Wextra -Wno-sign-compare -Wpointer-arith -Wformat -Wformat-security -Wswitch-enum -Wunused-parameter -Wbad-function-cast -Wcast-align -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-field-initializers -fno-strict-aliasing -Wswitch-bool -Wlogical-not-parentheses -Wsizeof-array-argument -Wbool-compare -Wshift-negative-value -Wduplicated-cond -Wshadow -Wmultistatement-macros -Wcast-align=strict -Werror -Werror -g -O2 -MT lib/dhparams.lo -MD -MP -MF lib/.deps/dhparams.Tpo -c ../lib/dhparams.c -o lib/dhparams.o
libtool: compile:  env REAL_CC=gcc "CHECK=sparse -Wsparse-error -I ../include/sparse -I ../include -m64 -I /usr/local/include  " cgcc -target=x86_64 -target=host_os_specs -D__MMX__=1 -D__MMX_WITH_SSE__=1 -D__SSE2_MATH__=1 -D__SSE_MATH__=1 -D__SSE__=1 -D__SSE2__=1 -DHAVE_CONFIG_H -I. -I.. -I ../include -I ./include -I ../lib -I ./lib -Wstrict-prototypes -Wall -Wextra -Wno-sign-compare -Wpointer-arith -Wformat -Wformat-security -Wswitch-enum -Wunused-parameter -Wbad-function-cast -Wcast-align -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-field-initializers -fno-strict-aliasing -Wswitch-bool -Wlogical-not-parentheses -Wsizeof-array-argument -Wbool-compare -Wshift-negative-value -Wduplicated-cond -Wshadow -Wmultistatement-macros -Wcast-align=strict -Werror -Werror -g -O2 -MT lib/dns-resolve.lo -MD -MP -MF lib/.deps/dns-resolve.Tpo -c ../lib/dns-resolve.c -o lib/dns-resolve.o
../lib/dhparams.c: In function ‘my_DH_set0_pqg’:
../lib/dhparams.c:18:5: error: ‘DH_set0_pqg’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
   18 |     return DH_set0_pqg(dh, p, NULL, g);
      |     ^~~~~~
In file included from ../lib/dhparams.h:21,
                 from ../lib/dhparams.c:6:
/usr/include/openssl/dh.h:255:27: note: declared here
  255 | OSSL_DEPRECATEDIN_3_0 int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
      |                           ^~~~~~~~~~~
../lib/dhparams.c: In function ‘get_dh2048’:
../lib/dhparams.c:54:5: error: ‘DH_new’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
   54 |     DH *dh = DH_new();
      |     ^~
/usr/include/openssl/dh.h:199:27: note: declared here
  199 | OSSL_DEPRECATEDIN_3_0 DH *DH_new(void);
      |                           ^~~~~~
../lib/dhparams.c:63:9: error: ‘DH_free’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
   63 |         DH_free(dh);
      |         ^~~~~~~
/usr/include/openssl/dh.h:200:28: note: declared here
  200 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
      |                            ^~~~~~~
../lib/dhparams.c: In function ‘get_dh4096’:
../lib/dhparams.c:129:5: error: ‘DH_new’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
  129 |     DH *dh = DH_new();
      |     ^~
/usr/include/openssl/dh.h:199:27: note: declared here
  199 | OSSL_DEPRECATEDIN_3_0 DH *DH_new(void);
      |                           ^~~~~~
../lib/dhparams.c:138:9: error: ‘DH_free’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
  138 |         DH_free(dh);
      |         ^~~~~~~
/usr/include/openssl/dh.h:200:28: note: declared here
  200 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
      |                            ^~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:4642: lib/dhparams.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
cc1: all warnings being treated as errors
make[2]: *** [Makefile:4642: lib/stream-ssl.lo] Error 1
-------

The same issue can be seen with RHEL 9 (if OpenSSL 3.0 is used)


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 4 Christian Trautman 2022-11-18 15:41:09 UTC
There is no specific test case to verify this bug.  We have run regression testing for this build and did not find any issues.

Comment 6 errata-xmlrpc 2022-11-21 18:19:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (openvswitch2.17 bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:8567