Skip to contentSkip to conversation

Segmentation fault in OpenVPN 2.6_git [git:dco/fcc852a9b2ea832c]

Openvpn-devel Tony He 4 participants 6 messages Mar 3, 2021 – Mar 4, 2021

lore
Share & tools
lore

Tony He

author
#0 lore raw

Hi Arne,

I encountered segmentation fault in your dco branch. Master branch is OK. I reverted the commit "Linux data-channel offload support", but it still happens.
Anything wrong? Can you reproduce?

[email protected]...:/project/openvpn/schwabe/openvpn# gdb
./src/openvpn/openvpn GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2 Copyright (C)
2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or
later <http://gnu.org/licenses/gpl.html> This is free software: you are
free to change and redistribute it. There is NO WARRANTY, to the extent
permitted by law. Type "show copying" and "show warranty" for details. This
GDB was configured as "x86_64-linux-gnu". Type "show configuration" for
configuration details. For bug reporting instructions, please see: <
http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other
documentation resources online at: <
http://www.gnu.org/software/gdb/documentation/>. For help, type "help".
Type "apropos word" to search for commands related to "word"... Reading
symbols from ./src/openvpn/openvpn... (gdb) r --ifconfig 10.200.0.1
10.200.0.2 --dev tun Starting program:
/project/openvpn/schwabe/openvpn/src/openvpn/openvpn --ifconfig 10.200.0.1
10.200.0.2 --dev tun [Thread debugging using libthread_db enabled] Using
host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
2021-03-03 07:28:55 OpenVPN 2.6_git [git:dco/8be9bbd16b2c5e1b]
x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD]
[DCO] built on Mar 3 2021 2021-03-03 07:28:55 library versions: OpenSSL
1.1.1f 31 Mar 2020, LZO 2.10 2021-03-03 07:28:55 ******* WARNING *******:
All encryption and authentication features disabled -- All data will be
tunnelled as clear text and will not be protected against man-in-the-middle
changes. PLEASE DO RECONSIDER THIS CONFIGURATION! 2021-03-03 07:28:55
sitnl_send: rtnl: generic error (-17): File exists 2021-03-03 07:28:55
net_iface_mtu_set: mtu 1500 for ovpn-dco1 2021-03-03 07:28:55 net_iface_up:
set ovpn-dco1 up 2021-03-03 07:28:55 net_addr_ptp_v4_add: 10.200.0.1 peer
10.200.0.2 dev ovpn-dco1 2021-03-03 07:28:55 Could not determine IPv4/IPv6
protocol. Using AF_INET 2021-03-03 07:28:55 UDPv4 link local (bound):
[AF_INET][undef]:1194 2021-03-03 07:28:55 UDPv4 link remote: [AF_UNSPEC]
Program received signal SIGSEGV, Segmentation fault. encrypt_sign
([email protected]...=0x7fffffffd2b0,
[email protected]...=true) at forward.c:567 567 if
(c->c2.tls_multi->context_auth != CAS_SUCCEEDED)

Tony

#1 lore raw

Am 03.03.21 um 08:46 schrieb Tony He:

Quoted 6 lines

Hi Arne,

I encountered segmentation fault in your dco branch. Master branch is OK. I reverted the commit "Linux data-channel offload support", but it still happens.
Anything wrong? Can you reproduce?

OpenVPN without any encryption or TLS is not something I tested. Consider this obscure mode broken as part of being a preview release.

Thanks for the report.

Arne

author
#2 lore raw
Quoted 11 lines · Arne Schwabe <[email protected]...> 于2021年3月3日周三 下午7:56写道:

Am 03.03.21 um 08:46 schrieb Tony He:

Quoted 6 lines

Hi Arne,

I encountered segmentation fault in your dco branch. Master branch is OK. I reverted the commit "Linux data-channel offload support", but it still happens.
Anything wrong? Can you reproduce?

OpenVPN without any encryption or TLS is not something I tested. Consider this obscure mode broken as part of being a preview release.

So can you reproduce this issue at your side? Did you just test static key? Can you paste your commands or configurations?

Quoted 4 lines

Thanks for the report.

Arne

#3 lore raw

Hi Tony,

Quoted 12 lines · Tony He

Arne Schwabe <[email protected]... <mailto:[email protected]...>> 于2021年3月3日 周三 下午7:56写道:

Am 03.03.21 um 08:46 schrieb Tony He:
> Hi Arne,
>
> I encountered segmentation fault in your dco branch. Master branch is > OK. I reverted the commit "Linux data-channel offload support", but it > still happens.
> Anything wrong? Can you reproduce?

Quoted 6 lines

OpenVPN without any encryption or TLS is not something I tested. Consider this obscure mode broken as part of being a preview release.

So can you reproduce this issue at your side? Did you just test static key? Can you paste your commands or configurations?

What Arne meant is that, given the following message in your log,

******* WARNING *******: All encryption and authentication features disabled -- All data will be tunnelled as clear text and will not be protected against man-in-the-middle changes. PLEASE DO RECONSIDER THIS CONFIGURATION!

it appears that you are testing *without* any form of encryption. This special case is untested at the moment.

A classic configuration with CA/certs/keys should work. Have you tried that?

Regards,

Quoted 13 lines

Thanks for the report.

Arne

_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Signature · 1 line
Antonio Quartulli
author
#4 lore raw
Quoted 26 lines · Antonio Quartulli <[email protected]...> 于2021年3月4日周四 下午3:48写道:

Hi Tony,

Quoted 8 lines · Tony He

Arne Schwabe <[email protected]... <mailto:[email protected]...>> 于2021年3月3日 周三 下午7:56写道:

Am 03.03.21 um 08:46 schrieb Tony He:
> Hi Arne,
>
> I encountered segmentation fault in your dco branch. Master branch

is

Quoted 1 line
Quoted 1 line

OK. I reverted the commit "Linux data-channel offload support",

but it

Quoted 9 lines
Quoted 2 lines

still happens.
Anything wrong? Can you reproduce?

OpenVPN without any encryption or TLS is not something I tested. Consider this obscure mode broken as part of being a preview release.

So can you reproduce this issue at your side? Did you just test static key? Can you paste your commands or configurations?

What Arne meant is that, given the following message in your log,

Quoted 8 lines

******* WARNING *******: All encryption and authentication features disabled -- All data will be tunnelled as clear text and will not be protected against man-in-the-middle changes. PLEASE DO RECONSIDER THIS CONFIGURATION!

it appears that you are testing *without* any form of encryption. This special case is untested at the moment.

I used static key and saw same error.
% sudo /project/openvpn/schwabe/openvpn.git/src/openvpn/openvpn --ifconfig
10.200.0.1 10.200.0.2 --dev tun --secret static.key
[sudo] password for tony:

2021-03-04 16:20:33 OpenVPN 2.6_git [git:dco/8be9bbd16b2c5e1b]
x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD]
[DCO] built on Mar  4 2021
2021-03-04 16:20:33 library versions: OpenSSL 1.1.1  11 Sep 2018, LZO 2.08
2021-03-04 16:20:33 WARNING: INSECURE cipher (BF-CBC) with block size less
than 128 bit (64 bit).  This allows attacks like SWEET32.  Mitigate by
using a --cipher with a larger block size (e.g. AES-256-CBC). Support for
these insecure ciphers will be removed in OpenVPN 2.6.
2021-03-04 16:20:33 WARNING: INSECURE cipher (BF-CBC) with block size less
than 128 bit (64 bit).  This allows attacks like SWEET32.  Mitigate by
using a --cipher with a larger block size (e.g. AES-256-CBC). Support for
these insecure ciphers will be removed in OpenVPN 2.6.
2021-03-04 16:20:33 WARNING: INSECURE cipher (BF-CBC) with block size less
than 128 bit (64 bit).  This allows attacks like SWEET32.  Mitigate by
using a --cipher with a larger block size (e.g. AES-256-CBC). Support for
these insecure ciphers will be removed in OpenVPN 2.6.
2021-03-04 16:20:33 sitnl_send: rtnl: generic error (-17): File exists
2021-03-04 16:20:33 net_iface_mtu_set: mtu 1500 for ovpn-dco1
2021-03-04 16:20:33 net_iface_up: set ovpn-dco1 up
2021-03-04 16:20:33 net_addr_ptp_v4_add: 10.200.0.1 peer 10.200.0.2 dev
ovpn-dco1
2021-03-04 16:20:33 Could not determine IPv4/IPv6 protocol. Using AF_INET
2021-03-04 16:20:33 UDPv4 link local (bound): [AF_INET][undef]:1194
2021-03-04 16:20:33 UDPv4 link remote: [AF_UNSPEC]

zsh: segmentation fault sudo /project/openvpn/schwabe/openvpn.git/src/openvpn/openvpn --ifconfig

Quoted 5 lines

A classic configuration with CA/certs/keys should work. Have you tried that?

Yes. I also tried this for a while and did not saw this error. However,

the dco was not enabled by default. So I asked Arne's commands or configurations.
But I just played with my configurations again and adjust verb to "5". Below log tells that I must set "topology subnet“ explicitly. Now it finally works.

Note: NOT using '--topology subnet' disables data channel offload.

Quoted 19 lines

Regards,

Quoted 4 lines

Thanks for the report.

Quoted 9 lines

Arne

_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

--
Antonio Quartulli

#5 lore raw

Hi,

Quoted 1 line · Tony He

I used static key and saw same error.

Seems static key is broken in this test branch.

This is not a recommended way to run OpenVPN, so it's not always fully tested in development branches (we *do* have tests for it in the official trees).

This is what Arne tried to tell you: using TLS based setups is what the developers use, and what is known to work.

Quoted 1 line

Note: NOT using '--topology subnet' disables data channel offload.

I think this is documented in the release announcement.

gert

Signature · 6 lines
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             [email protected]...