Bug 875809 (CVE-2012-5524)

Summary: CVE-2012-5524 gajim: Improper handling of invalid certificates
Product: [Other] Security Response Reporter: Jan Lieskovsky <jlieskov>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: mschmidt
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: impact=moderate,public=20121023,reported=20121111,source=oss-security,cvss2=4.3/AV:N/AC:M/Au:N/C:N/I:P/A:N,fedora-all/gajim=affected,epel-all/gajim=affected
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 875820, 875821    
Bug Blocks:    

Description Jan Lieskovsky 2012-11-12 10:41:01 EST
A security flaw was found in the way Gajim, a Jabber client written in PyGTK, performed verification of invalid (broken / expired) x.509v3 SSL certificates (True as return value was returned always regardless if error during certificate validation occurred or not). A rogue XMPP server could use this flaw to conduct man-in-the-middle attack (MiTM) and trick Gajim client to accept the certificate even when it was invalid / should not be accepted.

Upstream ticket:
[1] https://trac.gajim.org/ticket/7252

References:
[2] http://www.openwall.com/lists/oss-security/2012/11/11/6
Comment 1 Jan Lieskovsky 2012-11-12 10:42:29 EST
Reproducer from upstream ticket [1]:
------------------------------------

 To confirm this behavior, add at the begining of _ssl_verify_callback:

        self._dumpX509(cert)
        print >>self.stderr, "Args:", errnum, depth, ok, '\n-------'

And try to connect to a server with an invalid server certificate (for example, an expired one). You will observe the following:

Digest (SHA-1): {CA cert fingerprint}
(...)
Expired: No
Subject:
X509Name: {The CA Name}
(...)
Args: 0 1 1 
-----------------------------
Digest (SHA-1): {Server cert fingerprint}
(...)
Expired: Yes
Subject:
X509Name: {The Server's CN}
(...)
Args: 10 0 0 
-----------------------------
Digest (SHA-1): {Server cert fingerprint again}
(...)
Expired: Yes
Subject:
X509Name: {The Server's CN again}
(...)
Args: 0 0 1
-----------------------------
Comment 2 Jan Lieskovsky 2012-11-12 10:44:24 EST
This issue affects the versions of the gajim package, as shipped with Fedora release of 16 and 17. Please schedule an update (once there is final upstream patch available).

--

This issue affects the versions of the gajim package, as shipped with Fedora EPEL 5 and Fedora EPEL 6. Please schedule an update (once there is final upstream patch available).
Comment 3 Jan Lieskovsky 2012-11-12 10:48:18 EST
Created gajim tracking bugs for this issue

Affects: fedora-all [bug 875820]
Affects: epel-all [bug 875821]
Comment 4 Jan Lieskovsky 2012-11-14 11:29:59 EST
The CVE identifier of CVE-2012-5524 has been assigned to this issue:
http://www.openwall.com/lists/oss-security/2012/11/14/4
Comment 5 Fedora Update System 2014-06-17 12:57:53 EDT
gajim-0.14.4-4.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.