Bug 77735 - examing ssl certificate details will crash konqueror
Summary: examing ssl certificate details will crash konqueror
Status: RESOLVED WORKSFORME
Alias: None
Product: konqueror
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-16 07:12 UTC by Jani Averbach
Modified: 2004-03-16 08:50 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jani Averbach 2004-03-16 07:12:51 UTC
Version:            (using KDE KDE 3.2.1)
Installed from:    Gentoo Packages
Compiler:          gcc (GCC) 3.3.3 amd64
OS:          Linux

When I try examine details of ssl certificate, konqueror will crash. 

Every other aspect of ssl system seems to be ok, and I could
inspect certificate details with ie. Mozilla firefox without any
problem. The version of ssl library is:
OpenSSL 0.9.7c 30 Sep 2003

Here is partial incomplete crash-log (if it helps):

This backtrace appears to be useless.
This is probably because your packages are built in a way which prevents creating of proper backtraces, or the stack frame was seriously corrupted in the crash.

(no debugging symbols found)...Using host libthread_db library "/lib/libthread_db.so.1".
(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
0x0000002a9847d9ec in waitpid () from /lib/libpthread.so.0
#0  0x0000002a9847d9ec in waitpid () from /lib/libpthread.so.0
#1  0x0000002a96307a8a in KCrash::defaultCrashHandler(int) ()
   from /usr/kde/3.2/lib/libkdecore.so.4
#2  0x0000002a9847c84e in pthread_barrierattr_setpshared ()
   from /lib/libpthread.so.0
#3  <signal handler called>
#4  0x0000002a9b5c90b9 in bn_div_words () from /usr/lib/libcrypto.so.0.9.7
#5  0x0000002a9b5c6445 in BN_div_word () from /usr/lib/libcrypto.so.0.9.7
#6  0x0000002a9b5c5546 in BN_bn2dec () from /usr/lib/libcrypto.so.0.9.7
#7  0x0000002a9b61a5d4 in i2s_ASN1_INTEGER () from /usr/lib/libcrypto.so.0.9.7
#8  0x0000002a9592612a in KOpenSSLProxy::i2s_ASN1_INTEGER(v3_ext_method*, asn1_string_st*) () from /usr/kde/3.2/lib/libkio.so.4
#9  0x0000002a959213c6 in ASN1_INTEGER_QString(asn1_string_st*) ()
   from /usr/kde/3.2/lib/libkio.so.4
#10 0x0000002a959161f0 in KSSLCertificate::getSerialNumber() const ()
   from /usr/kde/3.2/lib/libkio.so.4
#11 0x0000002a9591e6aa in KSSLInfoDlg::displayCert(KSSLCertificate*) ()
   from /usr/kde/3.2/lib/libkio.so.4
#12 0x0000002a9591e07e in KSSLInfoDlg::setup(KSSLCertificate*, QString const&, QString const&, QString const&, QString const&, QString const&, int, int, KSSLCertificate::KSSLValidation) () from /usr/kde/3.2/lib/libkio.so.4
#13 0x0000002a994a3d11 in UIServer::showSSLInfoDialog(QString const&, KIO::MetaData const&) () from /usr/kde/3.2/lib/libkdeinit_kio_uiserver.so
#14 0x0000002a994a7960 in UIServer::process(QCString const&, QMemArray<char> const&, QCString&, QMemArray<char>&) ()
   from /usr/kde/3.2/lib/libkdeinit_kio_uiserver.so
#15 0x0000002a96515cd7 in DCOPClient::receive(QCString const&, QCString const&, QCString const&, QMemArray<char> const&, QCString&, QMemArray<char>&) ()
   from /usr/kde/3.2/lib/libDCOP.so.4
#16 0x0000002a9650fecc in DCOPClient::processPostedMessagesInternal() ()
   from /usr/kde/3.2/lib/libDCOP.so.4
#17 0x0000002a9650fa07 in DCOPClient::processPostedMessagesInternal() ()
   from /usr/kde/3.2/lib/libDCOP.so.4
#18 0x0000002a965186b2 in DCOPClient::qt_invoke(int, QUObject*) ()
   from /usr/kde/3.2/lib/libDCOP.so.4
#19 0x0000002a96cdcbe3 in QObject::activate_signal(QConnectionList*, QUObject*)
    () from /usr/qt/3/lib/libqt-mt.so.3
#20 0x0000002a96cdca3c in QObject::activate_signal(int) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#21 0x0000002a96f95cd4 in QTimer::timeout() () from /usr/qt/3/lib/libqt-mt.so.3
#22 0x0000002a96cf85c1 in QTimer::event(QEvent*) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#23 0x0000002a96c8cc62 in QApplication::internalNotify(QObject*, QEvent*) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#24 0x0000002a96c8c34c in QApplication::notify(QObject*, QEvent*) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#25 0x0000002a96286558 in KApplication::notify(QObject*, QEvent*) ()
   from /usr/kde/3.2/lib/libkdecore.so.4
#26 0x0000002a96c7e529 in QEventLoop::activateTimers() ()
   from /usr/qt/3/lib/libqt-mt.so.3
#27 0x0000002a96c42e11 in QEventLoop::processEvents(unsigned) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#28 0x0000002a96c9c2e4 in QEventLoop::enterLoop() ()
   from /usr/qt/3/lib/libqt-mt.so.3
#29 0x0000002a96c9c1b2 in QEventLoop::exec() ()
   from /usr/qt/3/lib/libqt-mt.so.3
#30 0x0000002a96c8ce05 in QApplication::exec() ()
   from /usr/qt/3/lib/libqt-mt.so.3
#31 0x0000002a994a4856 in kdemain ()
   from /usr/kde/3.2/lib/libkdeinit_kio_uiserver.so
#32 0x0000002a99382b49 in kdeinitmain ()
   from /usr/kde/3.2/lib/kde3/kio_uiserver.so
#33 0x0000000000405d39 in ?? ()
#34 0x0000000000406f6a in ?? ()
#35 0x0000000000407504 in ?? ()
#36 0x0000000000408332 in ?? ()
#37 0x0000002a98eb68b1 in __libc_start_main () from /lib/libc.so.6
#38 0x000000000040476a in ?? ()
Comment 1 George Staikos 2004-03-16 07:39:08 UTC
  I am 99.9% sure this is an openssl bug.  The code there is as follows:

char *rep = KOSSL::self()->i2s_ASN1_INTEGER(NULL, aint);
QString yy = rep;
KOSSL::self()->OPENSSL_free(rep);

   Can you check to see if 64bit fixes were applied to OpenSSL since that 
release?

Comment 2 Jani Averbach 2004-03-16 08:50:43 UTC
Indeed you were right, this was the cure for that disease:

Thank you for prompt reply!
 
--- openssl-0.9.7c/crypto/bn/asm/x86_64-gcc.c   2002-12-14 13:45:35.000000000 -0700
+++ openssl-f-0.9.7-stable-SNAP-20040316/crypto/bn/asm/x86_64-gcc.c     2004-02-07 03:03:16.000000000 -0700
@@ -142,7 +142,7 @@
 BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d)
 {      BN_ULONG ret,waste;

-       asm ("divq      %3"
+       asm ("divq      %4"
                : "=a"(ret),"=d"(waste)
                : "a"(l),"d"(h),"g"(d)
                : "cc");