GNOME Bugzilla – Bug 693768
networkmanager-openvpn-0.9.6.0 segfaults when trying to connect
Last modified: 2013-02-27 16:07:12 UTC
Trying to connect via vpn, crashes networkmanager-openvpn. From dmesg: nm-openvpn-serv[2479]: segfault at 8 ip 00007f2b89cdfb21 sp 00007fff73ee5588 error 4 in libc-2.15.so[7f2b89c5e000+19d000] I've tested both version 0.9.4.0 and 0.9.6.0. Both of them crash. Before the update i had networkmanager-openvpn-0.8.2 installed which worked. This bug comes originally from my gentoo bug, see: https://bugs.gentoo.org/show_bug.cgi?id=435316 Below you can see a backtrace and my system-config (gentoo) If you need any other information, please let me now GNU gdb (Gentoo 7.5 p1) 7.5 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 "x86_64-pc-linux-gnu". For bug reporting instructions, please see: <http://bugs.gentoo.org/>... Reading symbols from /usr/libexec/nm-openvpn-service...Reading symbols from /usr/lib64/debug/usr/libexec/nm-openvpn-service.debug...done. done. (gdb) run Starting program: /usr/libexec/nm-openvpn-service warning: Could not load shared library symbols for linux-vdso.so.1. Do you need "set solib-search-path" or "set sysroot"? [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Program received signal SIGSEGV, Segmentation fault. 0x00007ffff70e5c31 in ?? () from /lib64/libc.so.6 (gdb) bt
+ Trace 231511
Portage 2.1.11.31 (default/linux/amd64/13.0/no-multilib, gcc-4.6.3, glibc-2.15-r3, 3.6.6-gentoo x86_64) ================================================================= System uname: Linux-3.6.6-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_L7100_@_1.20GHz-with-gentoo-2.1 Timestamp of tree: Mon, 11 Feb 2013 07:30:01 +0000 ld GNU ld (GNU Binutils) 2.22 app-shells/bash: 4.2_p37 dev-lang/python: 2.7.3-r2, 3.2.3 dev-util/cmake: 2.8.9 dev-util/pkgconfig: 0.27.1 sys-apps/baselayout: 2.1-r1 sys-apps/openrc: 0.11.8 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.11.6 sys-devel/binutils: 2.22-r1 sys-devel/gcc: 4.5.4, 4.6.3 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.6 (virtual/os-headers) sys-libs/glibc: 2.15-r3 Repositories: gentoo ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA dlj-1.1" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=native -O2 -pipe" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="de_DE.utf8" LDFLAGS="-Wl,-O1,--hash-style=gnu,--as-needed" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X acl alsa amd64 berkdb bluetooth bzip2 cdr cli consolekit cracklib crypt cups cxx dbus dri dvd exif flac fortran gallium gdbm gif gnutls gpm graphite iconv icu ipv6 jabber jpeg kde kipi lzma mad mmx mmxext modules mp3 mudflap ncurses nls nptl opengl openmp pam pcre phonon plasma png policykit qt4 readline sdl semantic-desktop session sip spell sse sse2 ssl ssse3 tcpd threads tiff truetype udev unicode v4l2 vorbis vpx xv zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="sheets words" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
It would help us if you can provide us with your VPN configuration so that we could try to reproduce. The crash appears in gnu-tls, so maybe there could be a problem in gnu-tls library itself. But what's more probable is that we have a bug in libnm-util/crypto_verify_pkcs8() that could calls gnutls_x509_privkey_import_pkcs8() incorrectly. It would help if you can generate more detailed backtrace from gdb: use "bt full" command instead of "bt". So we could see also function parameters. Note: The crash is not seen on Fedora or Archlinux because they uses nss instead of gnu-tls and there's different code path in libnm-util. I don't know what other distros use.
Looking into our libnm-util's crypto_verify_pkcs8() I don't see any obvious bug. On the other hand, the crash might occur really in gnu-tls due to NULL password: http://git.savannah.gnu.org/cgit/gnutls.git/commit/lib/x509/privkey_pkcs8.c?id=95a922c2a8b75e6eddbcc688c0d719d0b07ee395 http://git.savannah.gnu.org/cgit/gnutls.git/commit/lib/x509/privkey_pkcs8.c?id=ca40a6fe02654c519cf03d8ab3cbb1cf4b429b98 What libgnutls do you use? Try upgrading or downgrading it.
Hi, below are my VPN configuration and a full backtrace: I'm also going to try out a newer gnutls right now (will also compile it with the ggdb flag on in order to get more output from gnutls in a backtrace). Right now i'm using gnutls-2.12.20. Latest version in portage is 3.1.8 which i'm going to try out. Thanks for the help! configuraton: (i removed original ip) [connection] id=xonet uuid=dc1e1221-60f9-486d-a59a-8c12c03e84d1 type=vpn permissions=user:michael:; autoconnect=false timestamp=1347790920 [vpn] service-type=org.freedesktop.NetworkManager.openvpn user-name=michael connection-type=tls remote=2.2.2.2 comp-lzo=yes cert-pass-flags=1 tap-dev=no proto-tcp=yes port=11194 mssfix=no ca=/home/michael/ca.crt cert=/home/michael/getafix.crt key=/home/michael/getafix.key [ipv6] method=ignore [ipv4] method=auto may-fail=false full backtrace: GNU gdb (Gentoo 7.5 p1) 7.5 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 "x86_64-pc-linux-gnu". For bug reporting instructions, please see: <http://bugs.gentoo.org/>... Reading symbols from /usr/libexec/nm-openvpn-service...Reading symbols from /usr/lib64/debug/usr/libexec/nm-openvpn-service.debug...done. done. (gdb) run Starting program: /usr/libexec/nm-openvpn-service warning: Could not load shared library symbols for linux-vdso.so.1. Do you need "set solib-search-path" or "set sysroot"? [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Program received signal SIGSEGV, Segmentation fault. 0x00007ffff70e5c31 in ?? () from /lib64/libc.so.6 (gdb) bt full
+ Trace 231517
Well, now that i have the latest version of gnutls, openvpn works :) The problem is solved for me, thus this bug can be closed. The problem seems to be related to gnutls.
The bug was in gnutls. Closing.