diff -Nru qt4-x11-4.7.0/debian/changelog qt4-x11-4.7.0/debian/changelog --- qt4-x11-4.7.0/debian/changelog 2010-11-19 13:15:33.000000000 +0000 +++ qt4-x11-4.7.0/debian/changelog 2011-03-25 14:55:45.000000000 +0000 @@ -1,3 +1,14 @@ +qt4-x11 (4:4.7.0-0ubuntu4.3) maverick-security; urgency=low + + * SECURITY UPDATE: Fake SSL certificates produced by Comodo, LP: #742377 + - Add kubuntu_30_blacklist_ssl_certificates.diff from upstream staging, lists + and blocks known bad certificates + - http://qt.gitorious.org/+qt-developers/qt/staging/commit/04e074e8d7c097295505e63565abdc7ca2b49f7b + - http://bugreports.qt.nokia.com/browse/QTBUG-18338 + - http://www.comodo.com/Comodo-Fraud-Incident-2011-03-23.html + + -- Jonathan Riddell Fri, 25 Mar 2011 14:55:18 +0000 + qt4-x11 (4:4.7.0-0ubuntu4.2) maverick-proposed; urgency=low * disable NEON on armel builds (LP: #664431) diff -Nru qt4-x11-4.7.0/debian/patches/kubuntu_30_blacklist_ssl_certificates.diff qt4-x11-4.7.0/debian/patches/kubuntu_30_blacklist_ssl_certificates.diff --- qt4-x11-4.7.0/debian/patches/kubuntu_30_blacklist_ssl_certificates.diff 1970-01-01 01:00:00.000000000 +0100 +++ qt4-x11-4.7.0/debian/patches/kubuntu_30_blacklist_ssl_certificates.diff 2011-03-25 18:52:25.000000000 +0000 @@ -0,0 +1,105 @@ +From 04e074e8d7c097295505e63565abdc7ca2b49f7b Mon Sep 17 00:00:00 2001 +From: Peter Hartmann +Date: Thu, 24 Mar 2011 14:42:22 +0100 +Subject: [PATCH] QSslCertificate: report fraudulent certificates as invalid + +There are some fraudulent certificates in the wild that are not valid; +this patch introduces a blacklist of serial numbers of those +certificates. + +Reviewed-by: Richard J. Moore +Reviewed-by: Markus Goetz +Task-number: QTBUG-18338 +--- + src/network/ssl/qsslcertificate.cpp | 34 +++++++++++++++++-- + src/network/ssl/qsslcertificate_p.h | 1 + + +Index: qt4-x11-4.7.2/src/network/ssl/qsslcertificate.cpp +=================================================================== +--- qt4-x11-4.7.2.orig/src/network/ssl/qsslcertificate.cpp 2011-03-25 17:30:38.059644389 +0000 ++++ qt4-x11-4.7.2/src/network/ssl/qsslcertificate.cpp 2011-03-25 17:31:17.879644378 +0000 +@@ -219,17 +219,19 @@ + Returns true if this certificate is valid; otherwise returns + false. + +- Note: Currently, this function only checks that the current ++ Note: Currently, this function checks that the current + data-time is within the date-time range during which the +- certificate is considered valid. No other checks are +- currently performed. ++ certificate is considered valid, and checks that the ++ certificate is not in a blacklist of fraudulent certificates. + + \sa isNull() + */ + bool QSslCertificate::isValid() const + { + const QDateTime currentTime = QDateTime::currentDateTime(); +- return currentTime >= d->notValidBefore && currentTime <= d->notValidAfter; ++ return currentTime >= d->notValidBefore && ++ currentTime <= d->notValidAfter && ++ ! QSslCertificatePrivate::isBlacklisted(*this); + } + + /*! +@@ -798,6 +800,30 @@ + return certificates; + } + ++// These certificates are known to be fraudulent and were created during the comodo ++// compromise. See http://www.comodo.com/Comodo-Fraud-Incident-2011-03-23.html ++static const char *certificate_blacklist[] = { ++ "04:7e:cb:e9:fc:a5:5f:7b:d0:9e:ae:36:e1:0c:ae:1e", ++ "f5:c8:6a:f3:61:62:f1:3a:64:f5:4f:6d:c9:58:7c:06", ++ "d7:55:8f:da:f5:f1:10:5b:b2:13:28:2b:70:77:29:a3", ++ "39:2a:43:4f:0e:07:df:1f:8a:a3:05:de:34:e0:c2:29", ++ "3e:75:ce:d4:6b:69:30:21:21:88:30:ae:86:a8:2a:71", ++ "e9:02:8b:95:78:e4:15:dc:1a:71:0a:2b:88:15:44:47", ++ "92:39:d5:34:8f:40:d1:69:5a:74:54:70:e1:f2:3f:43", ++ "b0:b7:13:3e:d0:96:f9:b5:6f:ae:91:c8:74:bd:3a:c0", ++ "d8:f3:5f:4e:b7:87:2b:2d:ab:06:92:e3:15:38:2f:b0", ++ 0 ++}; ++ ++bool QSslCertificatePrivate::isBlacklisted(const QSslCertificate &certificate) ++{ ++ for (int a = 0; certificate_blacklist[a] != 0; a++) { ++ if (certificate.serialNumber() == certificate_blacklist[a]) ++ return true; ++ } ++ return false; ++} ++ + #ifndef QT_NO_DEBUG_STREAM + QDebug operator<<(QDebug debug, const QSslCertificate &certificate) + { +Index: qt4-x11-4.7.2/src/network/ssl/qsslcertificate_p.h +=================================================================== +--- qt4-x11-4.7.2.orig/src/network/ssl/qsslcertificate_p.h 2011-03-25 17:30:38.039644389 +0000 ++++ qt4-x11-4.7.2/src/network/ssl/qsslcertificate_p.h 2011-03-25 17:31:17.889644378 +0000 +@@ -96,6 +96,7 @@ + static QSslCertificate QSslCertificate_from_X509(X509 *x509); + static QList certificatesFromPem(const QByteArray &pem, int count = -1); + static QList certificatesFromDer(const QByteArray &der, int count = -1); ++ static bool isBlacklisted(const QSslCertificate &certificate); + + friend class QSslSocketBackendPrivate; + +Index: qt4-x11-4.7.2/src/network/ssl/qsslsocket_openssl.cpp +=================================================================== +--- qt4-x11-4.7.2.orig/src/network/ssl/qsslsocket_openssl.cpp 2011-02-22 12:04:00.000000000 +0000 ++++ qt4-x11-4.7.2/src/network/ssl/qsslsocket_openssl.cpp 2011-03-25 17:31:17.899644378 +0000 +@@ -1183,6 +1183,13 @@ + X509 *x509 = q_SSL_get_peer_certificate(ssl); + configuration.peerCertificate = QSslCertificatePrivate::QSslCertificate_from_X509(x509); + q_X509_free(x509); ++ if (QSslCertificatePrivate::isBlacklisted(configuration.peerCertificate)) { ++ q->setErrorString(QSslSocket::tr("The peer certificate is blacklisted")); ++ q->setSocketError(QAbstractSocket::SslHandshakeFailedError); ++ emit q->error(QAbstractSocket::SslHandshakeFailedError); ++ plainSocket->disconnectFromHost(); ++ return false; ++ } + + // Start translating errors. + QList errors; diff -Nru qt4-x11-4.7.0/debian/patches/series qt4-x11-4.7.0/debian/patches/series --- qt4-x11-4.7.0/debian/patches/series 2010-10-03 03:08:56.000000000 +0100 +++ qt4-x11-4.7.0/debian/patches/series 2011-03-25 14:55:11.000000000 +0000 @@ -48,3 +48,4 @@ kubuntu_19_gtkstyle_inactive_background.diff kubuntu_20_gtkstyle_tabwidget_focus.diff kubuntu_21_fix_phantom_cursor.diff +kubuntu_30_blacklist_ssl_certificates.diff