Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#497 closed Bug / Defect (fixed)

OpenVPN 2.3.6 crashes with Bus error on Linux/SPARC shortly after startup

Reported by: guido Owned by:
Priority: major Milestone:
Component: Generic / unclassified Version: OpenVPN git master branch (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords: bus_error crash sparc
Cc:

Description

test

Attachments (2)

ticket-497-description.txt (8.4 KB) - added by Samuli Seppänen 9 years ago.
Full description of ticket 497
0001-Replace-unaligned-16bit-access-to-TCP-MSS-value-with.patch (1.7 KB) - added by Gert Döring 9 years ago.
proposed fix

Download all attachments as: .zip

Change History (21)

comment:1 Changed 9 years ago by Samuli Seppänen

When running on Linux/SPARC, OpenVPN version 2.3.6 and the most recent git master from github will crash with Bus error shortly after startup. This is 100% reproducible. These crashes did not happen with 2.3.3.

NOTE: full description has been moved to an attachment due to Trac parsing errors.

Changed 9 years ago by Samuli Seppänen

Attachment: ticket-497-description.txt added

Full description of ticket 497

comment:2 Changed 9 years ago by Gert Döring

Mmmh. This is not easy to track, not the least because I do no longer have a Linux/Sparc? machine (I do have FreeBSD/Sparc64, and that doesn't crash, so it's not anything as simple as an endian issue).

Could you try two things:

  • remove "comp-lzo" from your config, and see if that changes things
  • build 2.3.3 with this version of lzo, and see if that changes things

(If 2.3.3 with the same version of lzo does not crash, it's very likely inside OpenVPN - if it does, there is something wrong with your lzo library - no idea why it didn't show up earlier, maybe the previous OpenVPN version was linked statically to an older version, or a header/runtime mishap happened that only affects newly compiled stuff)

comment:3 Changed 9 years ago by guido

OpenVPN 2.3.6 works again when compiled without lzo support and run without comp-lzo.

OpenVPN 2.3.3 when compiled with LZO and run with comp-lzo crashes just as described.

So... apparently you were right and the problem is in lzo. Unfortunately, I don't really know how to report such a bug, I have no idea what exactly openvpn is doing with lzo and where things are going wrong.

comment:4 Changed 9 years ago by Gert Döring

What I'd try next is to compile lzo-2.08 from source and run "make test" after compilation - this should do a through selftest which helps to determine whether there is something in lzo which does not like linux/sparc.

If that works, then you could check what patches gentoo applies to lzo (if any), maybe one of them is problematic.

If "lzo itself" and "lzo with all gentoo patches" passes its selftest, it's "between openvpn and lzo", but I do not really expect this (but if it is, finding it will be tricky - OpenVPN doesn't do anything particular, just basic "this is how you init lzo")

comment:5 Changed 9 years ago by Gert Döring

So, what are we going to do with this ticket? Have you been able to do further testing (and/or see if it goes away when upgrading to the latest gentoo-provided lzo)?

comment:6 Changed 9 years ago by Samuli Seppänen

Guido: can you reproduce this with latest lzo? Or do the tests cron2 suggested?

comment:7 Changed 9 years ago by mator

probably not helpful comment, but I tried anyway...

installed debian for sparc (with latest updates to debian 7.8 version) under qemu and ran it

$ qemu-system-sparc64 -hda hda.img -cdrom /home/mator/debian-7.8.0-sparc-netinst.iso
-m 512 -nographic -net nic,macaddr=52:54:00:fa:ce:04,model=virtio -net user,hostfwd=tcp::2004-:22 -no-reboot

downloaded lzo sources from http://www.oberhumer.com/opensource/lzo/download/lzo-2.09.tar.gz

mator@debian:~/lzo-2.09$ ./configure --prefix=$HOME/lzo --enable-shared
...

LZO configuration summary
-------------------------
LZO version : 2.09
configured for host : sparc64-unknown-linux-gnu
source code location : .
compiler : gcc
preprocessor definitions : -DLZO_HAVE_CONFIG_H=1
preprocessor flags :
compiler flags : -g -O2
build static library : yes
build shared library : yes
enable i386 assembly code : no

LZO 2.09 configured.



mator@debian:~/lzo-2.09$ make
...
mator@debian:~/lzo-2.09$ make check
make check-local
make[1]: Entering directory `/home/mator/lzo-2.09'
./lzotest/lzotest -mlzo -n2 -q ./COPYING

LZO real-time data compression library (v2.09, Feb 04 2015).
Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.

262144 block-size

LZO1B-1 | COPYING 18092 1 9981 55.2 0.000 9.046 |
LZO1B-2 | COPYING 18092 1 9768 54.0 0.000 0.000 |
LZO1B-3 | COPYING 18092 1 9600 53.1 9.044 0.000 |
LZO1B-4 | COPYING 18092 1 9552 52.8 9.046 0.000 |
LZO1B-5 | COPYING 18092 1 9377 51.8 9.046 0.000 |
LZO1B-6 | COPYING 18092 1 9347 51.7 0.000 0.000 |
LZO1B-7 | COPYING 18092 1 9149 50.6 9.046 0.000 |
LZO1B-8 | COPYING 18092 1 9087 50.2 9.046 0.000 |
LZO1B-9 | COPYING 18092 1 9036 49.9 9.044 0.000 |
LZO1C-1 | COPYING 18092 1 9927 54.9 9.046 0.000 |
LZO1C-2 | COPYING 18092 1 9739 53.8 9.046 0.000 |
LZO1C-3 | COPYING 18092 1 9573 52.9 9.044 0.000 |
LZO1C-4 | COPYING 18092 1 9538 52.7 9.046 0.000 |
LZO1C-5 | COPYING 18092 1 9399 52.0 9.046 0.000 |
LZO1C-6 | COPYING 18092 1 9317 51.5 9.046 0.000 |
LZO1C-7 | COPYING 18092 1 9123 50.4 9.044 9.046 |
LZO1C-8 | COPYING 18092 1 9015 49.8 9.046 0.000 |
LZO1C-9 | COPYING 18092 1 8978 49.6 9.044 0.000 |
LZO1-1 | COPYING 18092 1 10498 58.0 0.000 0.000 |
LZO1A-1 | COPYING 18092 1 10405 57.5 9.046 0.000 |
LZO1F-1 | COPYING 18092 1 10073 55.7 9.044 0.000 |
LZO1X-1 | COPYING 18092 1 10102 55.8 9.046 0.000 |
LZO1Y-1 | COPYING 18092 1 10261 56.7 9.044 0.000 |
LZO1X-1(11) | COPYING 18092 1 10554 58.3 0.000 0.000 |
LZO1X-1(12) | COPYING 18092 1 10286 56.9 0.000 0.000 |
LZO1X-1(15) | COPYING 18092 1 10145 56.1 9.044 0.000 |
LZO1B-99 | COPYING 18092 1 8814 48.7 4.523 0.000 |
LZO1B-999 | COPYING 18092 1 8127 44.9 1.809 9.046 |
LZO1C-99 | COPYING 18092 1 8790 48.6 9.046 0.000 |
LZO1C-999 | COPYING 18092 1 8071 44.6 1.809 0.000 |
LZO1-99 | COPYING 18092 1 9083 50.2 9.046 9.046 |
LZO1A-99 | COPYING 18092 1 9031 49.9 9.046 9.044 |
LZO2A-999 | COPYING 18092 1 7853 43.4 1.809 0.000 |
LZO1F-999 | COPYING 18092 1 8079 44.7 1.508 0.000 |
LZO1X-999 | COPYING 18092 1 7848 43.4 0.503 0.000 |
LZO1Y-999 | COPYING 18092 1 7944 43.9 0.565 0.000 |
LZO1Z-999 | COPYING 18092 1 7893 43.6 0.603 9.044 |
memcpy() | COPYING 18092 1 18092 100 0.000 0.000 |

lt-lzotest: execution time: 1 seconds

All checks passed. Type 'make test' for more exhaustive testing.

make[1]: Leaving directory `/home/mator/lzo-2.09'
mator@debian:~/lzo-2.09$
mator@debian:~/lzo-2.09$ make test 2>&1 | tee ../lzo-shared-make-test.log
...
LZO1Z-999 *TOTALS* 6835692 653 2453113 35.9 0.497 2.882
Done.
./tests/align
Align init: 0x701c2008 ( 0x701c2008 )
Alignment test passed.
./tests/chksum
Checksum test passed.
./examples/simple

LZO real-time data compression library (v2.09, Feb 04 2015).
Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.

compressed 131072 bytes into 593 bytes
decompressed 593 bytes back into 131072 bytes
Simple compression test passed.
./minilzo/testmini

LZO real-time data compression library (v2.09, Feb 04 2015).
Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.

compressed 131072 bytes into 593 bytes
decompressed 593 bytes back into 131072 bytes

miniLZO simple compression test passed.

All tests passed. Now you are ready to install LZO.

mator@debian:~/lzo-2.09$

going to try to compile git openvpn and see what happens.

Last edited 9 years ago by mator (previous) (diff)

comment:8 Changed 9 years ago by Gert Döring

Two things come to mind:

  • the original bug report said "gentoo/sparc", now you're on debian/sparc. Does OpenVPN still crash?
  • when building from git or 2.3.6/2.3.7 source, make sure that you're actually linking to the lzo-2.09 you've compiled and tested (that's what we're trying to make sure here: that it is not something the distribution builders have patched which is breaking stuff here) - pass LZO_CFLAGS="-I$HOME/lzo-2.09" LZO_LIBS="-L$HOME/lzo-2.09 -llzo2" to configure, and check with "openvpn --version" afterwards)

comment:9 Changed 9 years ago by Gert Döring

Mumble. When Linuxer say "sparc" they actually mean "sparc64" (Ultra-CPU series, 64bit, not the old "true" SPARC CPUs)... wasted a few hours today trying to make Debian/Sparc? actually boot with qemu-sparc, which it won't do because it needs sparc64... (while NetBSD/sparc is "sparc" and NetBSD/sparc64 is "sparc64")...

Anyway. Even more reason to assume that it really should work, as Linux/Sparc64 should not be that much different from FreeBSD/Sparc64 or NetBSD/Sparc64, both of which are platforms I regularily test on. With LZO.

Does it crash on a real machine as well, or just inside qemu-sparc64?

comment:10 Changed 9 years ago by mator

cron2,

sorry, but i'm not original bug reporter, just wanted with help testing, and yes, I have only qemu sparc right now...

comment:11 Changed 9 years ago by mator

finally, compiled openvpn under qemu debian sparc. Getting bus error as well. How to debug this? Want me to share you qemu debian image, so you will be able to run it?

comment:12 Changed 9 years ago by mator

root@debian:/opt/openvpn/etc# date
Sat Aug 22 08:07:25 EDT 2015
root@debian:/opt/openvpn/etc# ../sbin/openvpn toofar.conf
Sat Aug 22 08:07:30 2015 OpenVPN 2.3_git [git:master/291c227d2ccecaa9+] sparc64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [SNAPPY] [LZ4] [EPOLL] [MH] [IPv6] built on Aug 22 2015
Sat Aug 22 08:07:30 2015 library versions: OpenSSL 1.0.1e 11 Feb 2013, LZO 2.06
Sat Aug 22 08:07:30 2015 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Sat Aug 22 08:07:30 2015 Control Channel Authentication: tls-auth using INLINE static key file
Sat Aug 22 08:07:30 2015 TCP/UDP: Preserving recently used remote address: [AF_INET]84.200.52.125:1194
Sat Aug 22 08:07:30 2015 UDP link local: (not bound)
Sat Aug 22 08:07:30 2015 UDP link remote: [AF_INET]84.200.52.125:1194
Sat Aug 22 08:07:32 2015 [server] Peer Connection Initiated with [AF_INET]84.200.52.125:1194
Sat Aug 22 08:07:34 2015 TUN/TAP device tap0 opened
Sat Aug 22 08:07:34 2015 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Sat Aug 22 08:07:34 2015 /sbin/ifconfig tap0 10.9.0.2 netmask 255.255.255.0 mtu 1500 broadcast 10.9.0.255
Sat Aug 22 08:07:34 2015 Initialization Sequence Completed
date
Bus error (core dumped)
root@debian:/opt/openvpn/etc# date
Sat Aug 22 08:07:51 EDT 2015
root@debian:/opt/openvpn/etc# ls
core  toofar.conf
root@debian:/opt/openvpn/etc# gdb -c core ../sbin/openvpn toofar.conf 
Excess command line arguments ignored. (toofar.conf)
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 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 "sparc-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /opt/openvpn/sbin/openvpn...
done.
[New LWP 3699]
Core was generated by `../sbin/openvpn toofar.conf'.
Program terminated with signal 10, Bus error.
#0  0x00053604 in mss_fixup_dowork (buf=0xffcd8c7c, maxmss=1336) at mss.c:163
163             if (ntohs (*mss) > maxmss) {
(gdb) bt
#0  0x00053604 in mss_fixup_dowork (buf=0xffcd8c7c, maxmss=1336) at mss.c:163
#1  0x00053310 in mss_fixup_ipv4 (buf=0xffcd8cf8, maxmss=1336) at mss.c:72
#2  0x0002d0ec in process_ip_header (c=0xffcd8ec0, flags=22, buf=0xffcd9610) at forward.c:1058
#3  0x0002d9cc in process_outgoing_tun (c=0xffcd8ec0) at forward.c:1235
#4  0x0002e38c in process_io (c=0xffcd8ec0) at forward.c:1548
#5  0x00065684 in tunnel_point_to_point (c=0xffcd8ec0) at openvpn.c:95
#6  0x00065aac in openvpn_main (argc=2, argv=0xffcd9884) at openvpn.c:267
#7  0x00065c10 in main (argc=2, argv=0xffcd9884) at openvpn.c:342
(gdb) }}}

comment:13 Changed 9 years ago by Gert Döring

@mator: thanks for the crash dump. This is definitely something I need to look into - maybe it's a misaligned access to *mss (it's doing a 16bit-read via ntohs() and if the TCP header is not aligned, this will cause an unaligned read). OTOH, as far as I remember, unaligned reads on SPARC/SPARC64 are allowed, just cause a performance impact (unlike MIPS where they cause an immediate bus error). Maybe Linux/Sparc? is handling this differently than FreeBSD/Sparc64 and NetBSD/Sparc - which is where I ran my tests on... - need to test.

If you feel comfortable changing source and recompiling, I would be interested in seeing the output of

msg(M_WARN, "mss=%p", mss)

directly before line 163, and maybe

msg(M_WARN, "opt=%p", opt)

directly before the if (*opt == OPENVPN_TCPOPT_EOL) line (line 151 here).

If it's "just" this, a possible fix would replace the ntohs(*mss) and *mss = htons(maxmss) calls with bytewise accesses (and testing could be done by disabling --mssfix in the local or server-pushed config).

@guido: I think the "it crashes with lzo, it does not crash without lzo" might actually be just a side effect - if compression is enabled, the openvpn packet payload is offset by 1 byte to signal the compression type used... so alignment is changed. I don't understand why this is working in 2.3.3 - the mss.c code has not been changed in a few years, and neither has the lzo code in 2.3

Anyway: thanks again for the very useful report. I will go out and verify (install Debian/Sparc? in my qemu-sparc64 setup, run a few simple tests to confirm if alignment is indeed problematic here) but this will take a few more weeks since I'm travelling right now and have only limited time for openvpn issues.

comment:14 Changed 9 years ago by mator

mator@debian:~/openvpn$ git diff
diff --git a/src/openvpn/mss.c b/src/openvpn/mss.c
index 64fd722..eb4c279 100644
--- a/src/openvpn/mss.c
+++ b/src/openvpn/mss.c
@@ -148,6 +148,7 @@ mss_fixup_dowork (struct buffer *buf, uint16_t maxmss)
         opt = (uint8_t *)(tc + 1);
        olen > 0;
        olen -= optlen, opt += optlen) {
+    msg(M_WARN, "opt=%p", opt);
     if (*opt == OPENVPN_TCPOPT_EOL)
       break;
     else if (*opt == OPENVPN_TCPOPT_NOP)
@@ -160,6 +161,7 @@ mss_fixup_dowork (struct buffer *buf, uint16_t maxmss)
         if (optlen != OPENVPN_TCPOLEN_MAXSEG)
           continue;
         mss = (uint16_t *)(opt + 2);
+        msg(M_WARN, "mss=%p", mss);
         if (ntohs (*mss) > maxmss) {
           dmsg (D_MSS, "MSS: %d -> %d",
                (int) ntohs (*mss),

mator@debian:~/openvpn$ CFLAGS="-O0 -g" LZO_CFLAGS="-I$HOME/lzo/include" LZO_LIBS="-L$HOME/lzo/lib -llzo2" ./configure --prefix=/opt/openvpn && make
root@debian:/home/mator/openvpn# make install

root@debian:/opt/openvpn# sbin/openvpn --version
OpenVPN 2.3_git [git:master/291c227d2ccecaa9+] sparc64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [SNAPPY] [LZ4] [EPOLL] [MH] [IPv6] built on Aug 22 2015
library versions: OpenSSL 1.0.1e 11 Feb 2013, LZO 2.09
Originally developed by James Yonan
Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>
Compile time defines: enable_comp_stub=no enable_crypto=yes enable_crypto_ofb_cfb=yes enable_debug=yes enable_def_auth=yes enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown enable_fast_install=yes enable_fragment=yes enable_iproute2=no enable_libtool_lock=yes enable_lz4=yes enable_lzo=yes enable_management=yes enable_multi=yes enable_multihome=yes enable_pam_dlopen=no enable_password_save=no enable_pedantic=no enable_pf=yes enable_pkcs11=no enable_plugin_auth_pam=yes enable_plugin_down_root=yes enable_plugins=yes enable_port_share=yes enable_selinux=no enable_server=yes enable_shared=yes enable_shared_with_static_runtimes=no enable_small=no enable_snappy=yes enable_static=yes enable_strict=no enable_strict_options=no enable_systemd=no enable_werror=no enable_win32_dll=yes enable_x509_alt_username=no with_crypto_library=openssl with_gnu_ld=yes with_mem_check=no with_plugindir='$(libdir)/openvpn/plugins' with_sysroot=no
				
root@debian:/opt/openvpn# sbin/openvpn ~mator/toofar.conf
Sat Aug 22 13:01:03 2015 OpenVPN 2.3_git [git:master/291c227d2ccecaa9+] sparc64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [SNAPPY] [LZ4] [EPOLL] [MH] [IPv6] built on Aug 22 2015
Sat Aug 22 13:01:03 2015 library versions: OpenSSL 1.0.1e 11 Feb 2013, LZO 2.09
Sat Aug 22 13:01:03 2015 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Sat Aug 22 13:01:03 2015 Control Channel Authentication: tls-auth using INLINE static key file
Sat Aug 22 13:01:03 2015 TCP/UDP: Preserving recently used remote address: [AF_INET]84.200.52.125:1194
Sat Aug 22 13:01:03 2015 UDP link local: (not bound)
Sat Aug 22 13:01:03 2015 UDP link remote: [AF_INET]84.200.52.125:1194
Sat Aug 22 13:01:04 2015 [server] Peer Connection Initiated with [AF_INET]84.200.52.125:1194
Sat Aug 22 13:01:06 2015 TUN/TAP device tap0 opened
Sat Aug 22 13:01:06 2015 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Sat Aug 22 13:01:06 2015 /sbin/ifconfig tap0 10.9.0.2 netmask 255.255.255.0 mtu 1500 broadcast 10.9.0.255
SIOCADDRT: File exists
Sat Aug 22 13:01:07 2015 ERROR: Linux route add command failed: external program exited with error status: 7
Sat Aug 22 13:01:07 2015 Initialization Sequence Completed
Sat Aug 22 13:01:18 2015 opt=0x123232
Sat Aug 22 13:01:18 2015 mss=0x123234
Sat Aug 22 13:01:18 2015 opt=0x123236
Sat Aug 22 13:01:18 2015 opt=0x123238
Sat Aug 22 13:01:18 2015 opt=0x123242
Sat Aug 22 13:01:18 2015 opt=0x123243
Sat Aug 22 13:01:18 2015 opt=0x124eff
Sat Aug 22 13:01:18 2015 mss=0x124f01
Bus error (core dumped)
root@debian:/opt/openvpn# gdb -c core.22405 sbin/openvpn 
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 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 "sparc-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /opt/openvpn/sbin/openvpn...done.
[New LWP 22405]
Core was generated by `sbin/openvpn /home/mator/toofar.conf'.
Program terminated with signal 10, Bus error.
#0  0x00053694 in mss_fixup_dowork (buf=0xff956c7c, maxmss=1336) at mss.c:165
165             if (ntohs (*mss) > maxmss) {
(gdb) bt
#0  0x00053694 in mss_fixup_dowork (buf=0xff956c7c, maxmss=1336) at mss.c:165
#1  0x00053330 in mss_fixup_ipv4 (buf=0xff956cf8, maxmss=1336) at mss.c:72
#2  0x0002d10c in process_ip_header (c=0xff956ec0, flags=22, buf=0xff957610) at forward.c:1058
#3  0x0002d9ec in process_outgoing_tun (c=0xff956ec0) at forward.c:1235
#4  0x0002e3ac in process_io (c=0xff956ec0) at forward.c:1548
#5  0x00065714 in tunnel_point_to_point (c=0xff956ec0) at openvpn.c:95
#6  0x00065b3c in openvpn_main (argc=2, argv=0xff957884) at openvpn.c:267
#7  0x00065ca0 in main (argc=2, argv=0xff957884) at openvpn.c:342
(gdb)

comment:15 Changed 9 years ago by Gert Döring

Thanks. The output is a bit surprising, as there seem to be quite a lot of TCP options in this packet, and it prints mss twice - but the one right before the crash is indeed an unaligned address (0x124f01) but well within the packet.

Googling around seems to confirm that *some* OSes on Sparc64 correct unaligned memory access by means of a userland or kernel trap handler (at a performance penalty, which would be acceptable here) and some others just crash with a bus error, or it's left to compiler flags(!) how to behave... no definitive word on Linux/Sparc? though. http://stackoverflow.com/questions/1892566/c-bus-error-in-sparc-arcitecture

Anyway. Someone is going to run this on a MIPS box one day, and it will definitely crash there :-) so it needs fixing.

Changed 9 years ago by Gert Döring

proposed fix

comment:16 Changed 9 years ago by Gert Döring

Hi,

the attached patch replaces the 16bit access ntohs(*mss) with two 8bit accesses. Tested on Linux/i386 with --mssfix 1200, and the arithmetics used are fully machine independent, so it "should work" on Linux/Sparc? as well... applies to an unmodified(!) copy of mss.c

Please test at your convenience.

comment:17 Changed 9 years ago by mator

With this patch, openvpn does not coredump with "bus error", but works. Tested with ping / mtr / wget (100mb file) for about 5 minutes. Thanks.

comment:18 Changed 9 years ago by Gert Döring

Resolution: fixed
Status: newclosed

Fix has been reviewed and ACKed, and is included in git since today

commit 2e2a34181962b33d70c34c28dcb1e1977c2fd54e (master)
commit 9a2ab2fbebb1c6712e23c98cb06a93d40d378fcd (release/2.3)

Author: Gert Doering
Date: Thu Aug 27 15:00:02 2015 +0200

Replace unaligned 16bit access to TCP MSS value with bytewise access

I'm closing the ticket now (as I think it is done) but would still welcome a test report "on the real hardware" as soon as you have it up and running again.

comment:19 Changed 8 years ago by mator

reinstalled a real sparc v215 server today with debian 7, fetched git version of openvpn and compiled/installed:

root@v215:/home/mator# /opt/openvpn/sbin/openvpn --version
OpenVPN 2.3_git [git:master/c40f088e52132273+] sparc64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [SNAPPY] [LZ4] [EPOLL] [MH] [IPv6] built on Oct  1 2015
library versions: OpenSSL 1.0.1e 11 Feb 2013, LZO 2.06
Originally developed by James Yonan
Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>
Compile time defines: enable_comp_stub=no enable_crypto=yes enable_crypto_ofb_cfb=yes enable_debug=yes enable_def_auth=yes enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown enable_fast_install=yes enable_fragment=yes enable_iproute2=no enable_libtool_lock=yes enable_lz4=yes enable_lzo=yes enable_management=yes enable_multi=yes enable_multihome=yes enable_pam_dlopen=no enable_password_save=no enable_pedantic=no enable_pf=yes enable_pkcs11=no enable_plugin_auth_pam=yes enable_plugin_down_root=yes enable_plugins=yes enable_port_share=yes enable_selinux=no enable_server=yes enable_shared=yes enable_shared_with_static_runtimes=no enable_small=no enable_snappy=yes enable_static=yes enable_strict=no enable_strict_options=no enable_systemd=no enable_werror=no enable_win32_dll=yes enable_x509_alt_username=no with_crypto_library=openssl with_gnu_ld=yes with_mem_check=no with_plugindir='$(libdir)/openvpn/plugins' with_sysroot=no

root@v215:~# /opt/openvpn/sbin/openvpn ~mator/client.conf
Thu Oct  1 11:53:09 2015 OpenVPN 2.3_git [git:master/c40f088e52132273+] sparc64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [SNAPPY] [LZ4] [EPOLL] [MH] [IPv6] built on Oct  1 2015
Thu Oct  1 11:53:09 2015 library versions: OpenSSL 1.0.1e 11 Feb 2013, LZO 2.06
Thu Oct  1 11:53:09 2015 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Thu Oct  1 11:53:09 2015 Control Channel Authentication: tls-auth using INLINE static key file
Thu Oct  1 11:53:09 2015 TCP/UDP: Preserving recently used remote address: [AF_INET]84.200.52.125:1194
Thu Oct  1 11:53:09 2015 UDP link local: (not bound)
Thu Oct  1 11:53:09 2015 UDP link remote: [AF_INET]84.200.52.125:1194
Thu Oct  1 11:53:10 2015 [server] Peer Connection Initiated with [AF_INET]84.200.52.125:1194
Thu Oct  1 11:53:11 2015 TUN/TAP device tap0 opened
Thu Oct  1 11:53:11 2015 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Thu Oct  1 11:53:11 2015 /sbin/ifconfig tap0 10.9.0.3 netmask 255.255.255.0 mtu 1500 broadcast 10.9.0.255
Thu Oct  1 11:53:11 2015 Initialization Sequence Completed
Thu Oct  1 11:55:27 2015 event_wait : Interrupted system call (code=4)
Thu Oct  1 11:55:27 2015 /sbin/ifconfig tap0 0.0.0.0
Thu Oct  1 11:55:27 2015 SIGTERM[hard,] received, process exiting

works

Note: See TracTickets for help on using tickets.