Browse code

Add section about common error with OpenVPN 2.6 and OpenSSL 3.0

We expect a number of configurations to no longer work with OpenVPN
2.6 and OpenSSL 3.0. This section tries to explain the most common
errors that will come up and how to work around them.

Patch V2: several mistakes highlighed and suggestions made by Frank
included.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
Message-Id: <20221129113031.3735598-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25571.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>

Arne Schwabe authored on 2022/11/29 20:30:31
Showing 1 changed files
... ...
@@ -190,6 +190,100 @@ User-visible Changes
190 190
   software that enumerates interfaces, looking for "broadcast capable?" and
191 191
   expecting certain results.  Normal uses should not see any difference.
192 192
 
193
+- The default configurations will no longer allow connections to OpenVPN 2.3.x
194
+  peer or earlier, use the new ``--compat-mode`` option if you need
195
+  compatibility with older versions. See the manual page on the
196
+  ``--compat-mode`` for details.
197
+
198
+Common errors with OpenSSL 3.0 and OpenVPN 2.6
199
+----------------------------------------------
200
+Both OpenVPN 2.6 and OpenSSL 3.0 tighten the security considerable, so some
201
+configuration will no longer work. This section will cover the most common
202
+causes and error message we have seen and explain their reason and temporary
203
+workarounds. You should fix the underlying problems as soon as possible since
204
+these workaround are not secure and will eventually stop working in a future
205
+update.
206
+
207
+- weak SHA1 or MD5 signature on certificates
208
+
209
+  This will happen on either loading of certificates or on connection
210
+  to a server::
211
+
212
+      OpenSSL: error:0A00018E:SSL routines::ca md too weak
213
+      Cannot load certificate file cert.crt
214
+      Exiting due to fatal error
215
+
216
+  OpenSSL 3.0 no longer allows weak signatures on certificates. You can
217
+  downgrade your security to allow them by using ``--tls-cert-profile insecure``
218
+  but should replace/regenerate these certificates as soon as possible.
219
+
220
+
221
+- 1024 bit RSA certificates, 1024 bit DH parameters, other weak keys
222
+
223
+  This happens if you use private keys or other cryptographic material that
224
+  does not meet today's cryptographic standards anymore. Messages are similar
225
+  to::
226
+
227
+      OpenSSL: error:0A00018F:SSL routines::ee key too small
228
+      OpenSSL: error:1408518A:SSL routines:ssl3_ctx_ctrl:dh key too small
229
+
230
+  DH parameters (``--dh``) can be regenerated with ``openssl dhparam 2048``.
231
+  For other cryptographic keys, these keys and certificates need to be
232
+  regenerated. TLS Security level can be temporarily lowered with
233
+  ``--tls-cert-profile legacy`` or even ``--tls-cert-profile insecure``.
234
+
235
+- Connecting to a OpenVPN 2.3.x server or allowing OpenVPN 2.3.x or earlier
236
+  clients
237
+
238
+  This will normally result in messages like::
239
+
240
+     OPTIONS ERROR: failed to negotiate cipher with server.  Add the server's cipher ('AES-128-CBC') to --data-ciphers (currently 'AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305') if you want to connect to this server.
241
+
242
+     or
243
+
244
+     client/127.0.0.1:49954 SENT CONTROL [client]: 'AUTH_FAILED,Data channel cipher negotiation failed (no shared cipher)' (status=1)
245
+
246
+  You can manually add the missing cipher to the ``--data-ciphers``. The
247
+  standard ciphers should be included as well, e.g.
248
+  ``--data-ciphers AES-256-GCM:AES-128-GCM:?Chacha20-Poly1305:?AES-128-CBC``.
249
+  You can also use the ``--compat-mode`` option. Note that these message may
250
+  also indicate other cipher configuration problems. See the data channel
251
+  cipher negotiation manual section for more details. (Available online under
252
+  https://github.com/OpenVPN/openvpn/blob/master/doc/man-sections/cipher-negotiation.rst)
253
+
254
+- Use of a legacy or deprecated cipher (e.g. 64bit block ciphers)
255
+
256
+  OpenSSL 3.0 no longer supports a number of insecure and outdated ciphers in
257
+  its default configuration. Some of these ciphers are known to be vulnerable (SWEET32 attack).
258
+
259
+  This will typically manifest itself in messages like::
260
+
261
+      OpenSSL: error:0308010C:digital envelope routines::unsupported
262
+      Cipher algorithm 'BF-CBC' not found
263
+      Unsupported cipher in --data-ciphers: BF-CBC
264
+
265
+  If your OpenSSL distribution comes with the legacy provider (see
266
+  also ``man OSSL_PROVIDER-legacy``), you can load it with
267
+  ``--providers legacy default``.  This will re-enable the old algorithms.
268
+
269
+- OpenVPN version not supporting TLS 1.2 or later
270
+
271
+  The default in OpenVPN 2.6 and also in many distributions is now TLS 1.2 or
272
+  later. Connecting to a peer that does not support this will results in
273
+  messages like::
274
+
275
+    TLS error: Unsupported protocol. This typically indicates that client and
276
+    server have no common TLS version enabled. This can be caused by mismatched
277
+    tls-version-min and tls-version-max options on client and server. If your
278
+    OpenVPN client is between v2.3.6 and v2.3.2 try adding tls-version-min 1.0
279
+    to the client configuration to use TLS 1.0+ instead of TLS 1.0 only
280
+    OpenSSL: error:0A000102:SSL routines::unsupported protocol
281
+
282
+  This can be an OpenVPN 2.3.6 or earlier version. ``compat-version 2.3.0`` will
283
+  enable TLS 1.0 support if supported by the OpenSSL distribution. Note that
284
+  on some Linux distributions enabling TLS 1.1 or 1.0 is not possible.
285
+
286
+
193 287
 
194 288
 Overview of changes in 2.5
195 289
 ==========================