Bug 307517 - KDE Control Module crash when try to import openvpn.conf
Summary: KDE Control Module crash when try to import openvpn.conf
Status: RESOLVED FIXED
Alias: None
Product: Network Management
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Lamarque V. Souza
URL:
Keywords:
: 309564 310886 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-09-28 09:31 UTC by Nikolay Naydenov
Modified: 2012-11-29 17:51 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 0.9.0.5


Attachments
Fix crash when TLS_AUTH_TAG or SECRET_TAG is given only one parameter (2.23 KB, patch)
2012-09-29 19:05 UTC, Rajeesh K V
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nikolay Naydenov 2012-09-28 09:31:01 UTC
Application: kcmshell4 ()
KDE Platform Version: 4.9.1
Qt Version: 4.8.2
Operating System: Linux 3.2.0-31-generic x86_64
Distribution: Ubuntu 12.04.1 LTS

-- Information about the crash:
- What I was doing when the application crashed:
Try to add VPN (OpenVPN) connection using import button
- Custom settings of the application:
Content of imported conf:
cat yubisf.conf:
remote YYY.YYY.YYY.YY XXXXX udp
persist-key
auth-user-pass
comp-lzo yes
tls-auth ta.key
pull
ca ca.crt
nobind
persist-tun
tls-client
dev tun
script-security 2

NOTE: IP and PORT obfuscated. It happen with KDE 4.8 as well. Not sure it is KDE bug, but other guys are able to use it on Unity (same distro version 12.04).
I use vitual box to reproduce the bug happened on my laptop. The laptop is used on daily basis and not acceptable to tweak with it too much. With virtual it is quite easier ;-).

The crash can be reproduced every time.

-- Backtrace:
Application: KDE Control Module (kdeinit4), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f93a09b8780 (LWP 2414))]

Thread 3 (Thread 0x7f9383a66700 (LWP 2415)):
#0  0x00007fff0331398f in clock_gettime ()
#1  0x00007f939b5a515d in __GI_clock_gettime (clock_id=<optimized out>, tp=<optimized out>) at ../sysdeps/unix/clock_gettime.c:116
#2  0x00007f939f556c64 in do_gettime (frac=0x7f9383a65b98, sec=0x7f9383a65b90) at tools/qelapsedtimer_unix.cpp:123
#3  qt_gettime () at tools/qelapsedtimer_unix.cpp:140
#4  0x00007f939f62f06d in QTimerInfoList::updateCurrentTime (this=0x7f937c002860) at kernel/qeventdispatcher_unix.cpp:343
#5  0x00007f939f62f3a3 in QTimerInfoList::timerWait (this=0x7f937c002860, tm=...) at kernel/qeventdispatcher_unix.cpp:450
#6  0x00007f939f62de5c in timerSourcePrepareHelper (src=<optimized out>, timeout=0x7f9383a65c6c) at kernel/qeventdispatcher_glib.cpp:136
#7  0x00007f939f62df05 in timerSourcePrepare (source=<optimized out>, timeout=<optimized out>) at kernel/qeventdispatcher_glib.cpp:169
#8  0x00007f939b2f3846 in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#9  0x00007f939b2f3f5b in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#10 0x00007f939b2f4164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x00007f939f62e906 in QEventDispatcherGlib::processEvents (this=0x7f937c0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#12 0x00007f939f5fde42 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#13 0x00007f939f5fe097 in QEventLoop::exec (this=0x7f9383a65dd0, flags=...) at kernel/qeventloop.cpp:204
#14 0x00007f939f4fd057 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#15 0x00007f939f5ddb4f in QInotifyFileSystemWatcherEngine::run (this=0x189eb20) at io/qfilesystemwatcher_inotify.cpp:248
#16 0x00007f939f50007b in QThreadPrivate::start (arg=0x189eb20) at thread/qthread_unix.cpp:307
#17 0x00007f939bbcae9a in start_thread (arg=0x7f9383a66700) at pthread_create.c:308
#18 0x00007f939e1ea4bd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#19 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f9382994700 (LWP 2419)):
#0  0x00007fff0331398f in clock_gettime ()
#1  0x00007f939b5a515d in __GI_clock_gettime (clock_id=<optimized out>, tp=<optimized out>) at ../sysdeps/unix/clock_gettime.c:116
#2  0x00007f939f556c64 in do_gettime (frac=0x7f9382993b98, sec=0x7f9382993b90) at tools/qelapsedtimer_unix.cpp:123
#3  qt_gettime () at tools/qelapsedtimer_unix.cpp:140
#4  0x00007f939f62f06d in QTimerInfoList::updateCurrentTime (this=0x7f9374002660) at kernel/qeventdispatcher_unix.cpp:343
#5  0x00007f939f62f3a3 in QTimerInfoList::timerWait (this=0x7f9374002660, tm=...) at kernel/qeventdispatcher_unix.cpp:450
#6  0x00007f939f62de5c in timerSourcePrepareHelper (src=<optimized out>, timeout=0x7f9382993c6c) at kernel/qeventdispatcher_glib.cpp:136
#7  0x00007f939f62df05 in timerSourcePrepare (source=<optimized out>, timeout=<optimized out>) at kernel/qeventdispatcher_glib.cpp:169
#8  0x00007f939b2f3846 in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#9  0x00007f939b2f3f5b in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#10 0x00007f939b2f4164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x00007f939f62e906 in QEventDispatcherGlib::processEvents (this=0x7f93740008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#12 0x00007f939f5fde42 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#13 0x00007f939f5fe097 in QEventLoop::exec (this=0x7f9382993dd0, flags=...) at kernel/qeventloop.cpp:204
#14 0x00007f939f4fd057 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#15 0x00007f939f5ddb4f in QInotifyFileSystemWatcherEngine::run (this=0x195c880) at io/qfilesystemwatcher_inotify.cpp:248
#16 0x00007f939f50007b in QThreadPrivate::start (arg=0x195c880) at thread/qthread_unix.cpp:307
#17 0x00007f939bbcae9a in start_thread (arg=0x7f9382994700) at pthread_create.c:308
#18 0x00007f939e1ea4bd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#19 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f93a09b8780 (LWP 2414)):
[KCrash Handler]
#6  deref (this=0x91) at ../../include/QtCore/../../src/corelib/arch/qatomic_x86_64.h:133
#7  QString::operator= (this=0x14f13b8, other=...) at tools/qstring.cpp:1411
#8  0x00007f93846e459e in OpenVpnUiPlugin::importConnectionSettings (this=0x18c3670, fileName=...) at ../../../vpnplugins/openvpn/openvpn.cpp:398
#9  0x00007f93869ada4d in ManageConnectionWidget::importClicked (this=0x1563320) at ../../../settings/config/manageconnectionwidget.cpp:430
#10 0x00007f939f613761 in QMetaObject::activate (sender=0x17b1690, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff032a3610) at kernel/qobject.cpp:3547
#11 0x00007f939f011432 in QAbstractButton::clicked (this=<optimized out>, _t1=false) at .moc/release-shared/moc_qabstractbutton.cpp:220
#12 0x00007f939ed4eece in QAbstractButtonPrivate::emitClicked (this=<optimized out>) at widgets/qabstractbutton.cpp:548
#13 0x00007f939ed5020b in QAbstractButtonPrivate::click (this=0x17b16d0) at widgets/qabstractbutton.cpp:541
#14 0x00007f939ed5047c in QAbstractButton::mouseReleaseEvent (this=0x17b1690, e=0x7fff032a3ee0) at widgets/qabstractbutton.cpp:1123
#15 0x00007f939e9d0fb4 in QWidget::event (this=0x17b1690, event=0x7fff032a3ee0) at kernel/qwidget.cpp:8371
#16 0x00007f939e9807b4 in notify_helper (e=0x7fff032a3ee0, receiver=0x17b1690, this=0x1392e60) at kernel/qapplication.cpp:4556
#17 QApplicationPrivate::notify_helper (this=0x1392e60, receiver=0x17b1690, e=0x7fff032a3ee0) at kernel/qapplication.cpp:4528
#18 0x00007f939e985f2f in QApplication::notify (this=<optimized out>, receiver=0x17b1690, e=0x7fff032a3ee0) at kernel/qapplication.cpp:4099
#19 0x00007f93a03994a6 in KApplication::notify (this=0x7fff032a4c00, receiver=0x17b1690, event=0x7fff032a3ee0) at ../../kdeui/kernel/kapplication.cpp:311
#20 0x00007f939f5ff30c in QCoreApplication::notifyInternal (this=0x7fff032a4c00, receiver=0x17b1690, event=0x7fff032a3ee0) at kernel/qcoreapplication.cpp:915
#21 0x00007f939e981782 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#22 QApplicationPrivate::sendMouseEvent (receiver=0x17b1690, event=0x7fff032a3ee0, alienWidget=0x17b1690, nativeWidget=0x14f1270, buttonDown=0x17b1690, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3167
#23 0x00007f939ea00b15 in QETWidget::translateMouseEvent (this=0x14f1270, event=<optimized out>) at kernel/qapplication_x11.cpp:4617
#24 0x00007f939e9fface in QApplication::x11ProcessEvent (this=0x7fff032a4c00, event=0x7fff032a47b0) at kernel/qapplication_x11.cpp:3732
#25 0x00007f939ea29052 in x11EventSourceDispatch (s=0x1395800, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#26 0x00007f939b2f3d53 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#27 0x00007f939b2f40a0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#28 0x00007f939b2f4164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#29 0x00007f939f62e89f in QEventDispatcherGlib::processEvents (this=0x13027d0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#30 0x00007f939ea28cde in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#31 0x00007f939f5fde42 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#32 0x00007f939f5fe097 in QEventLoop::exec (this=0x7fff032a4b50, flags=...) at kernel/qeventloop.cpp:204
#33 0x00007f939ee50f86 in QDialog::exec (this=0x14f1270) at dialogs/qdialog.cpp:554
#34 0x00007f938bd5ed2c in kdemain (_argc=<optimized out>, _argv=<optimized out>) at ../../kcmshell/main.cpp:292
#35 0x0000000000408744 in launch (argc=5, _name=0x13b2d68 "kcmshell4", args=<optimized out>, cwd=0x0, envc=<optimized out>, envs=<optimized out>, reset_env=false, tty=0x0, avoid_loops=false, startup_id_str=0x40b3b6 "0") at ../../kinit/kinit.cpp:746
#36 0x0000000000409ab6 in handle_launcher_request (sock=8, who=<optimized out>) at ../../kinit/kinit.cpp:1238
#37 0x0000000000409fe7 in handle_requests (waitForPid=0) at ../../kinit/kinit.cpp:1431
#38 0x00000000004053bf in main (argc=4, argv=0x7fff00000001, envp=0x7fff032a6600) at ../../kinit/kinit.cpp:1919

Reported using DrKonqi
Comment 1 Rajeesh K V 2012-09-29 19:05:09 UTC
Created attachment 74236 [details]
Fix crash when TLS_AUTH_TAG or SECRET_TAG is given only one parameter

Please test this patch, it should fix the issue.

Lamarque, please review.
Comment 2 Lamarque V. Souza 2012-09-30 21:51:09 UTC
Git commit ee89543910d3a879be21bf32b525cba95b3d7b85 by Lamarque V. Souza, on behalf of Rajeesh K Nambiar.
Committed on 30/09/2012 at 23:48.
Pushed by lvsouza into branch 'nm09'.

Ideally, SECRET_TAG and TLS_AUTH_TAG should contain 2 parameters, second
one being the direction (in/out) assuming values 0 or 1 respectively.
Added another check to ensure that the 2nd parameter is present before
accessing that index.
FIXED-IN: 0.9.0.5

M  +1    -1    plasma_nm_version.h
M  +10   -6    vpnplugins/openvpn/openvpn.cpp

http://commits.kde.org/networkmanagement/ee89543910d3a879be21bf32b525cba95b3d7b85
Comment 3 Lamarque V. Souza 2012-09-30 21:52:56 UTC
Git commit 0541202a63d1dc03314e06caa69dc796469c3e86 by Lamarque V. Souza, on behalf of Rajeesh K Nambiar.
Committed on 30/09/2012 at 23:47.
Pushed by lvsouza into branch 'master'.

Ideally, SECRET_TAG and TLS_AUTH_TAG should contain 2 parameters, second
one being the direction (in/out) assuming values 0 or 1 respectively.
Added another check to ensure that the 2nd parameter is present before
accessing that index.
FIXED-IN: 0.9.0.5

M  +1    -1    plasma_nm_version.h
M  +10   -6    vpnplugins/openvpn/openvpn.cpp

http://commits.kde.org/networkmanagement/0541202a63d1dc03314e06caa69dc796469c3e86
Comment 4 Lamarque V. Souza 2012-11-05 14:50:40 UTC
*** Bug 309564 has been marked as a duplicate of this bug. ***
Comment 5 Lamarque V. Souza 2012-11-29 17:51:41 UTC
*** Bug 310886 has been marked as a duplicate of this bug. ***