subversion crashes in gnutls x509 certificate verify

Bug #297130 reported by Tomasz Sterna
6
Affects Status Importance Assigned to Milestone
Debian
Fix Released
Unknown
gnutls26 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

After upgrade to jaunty, subversion started crashing while commiting to HTTPS repository.

I installed -dbg packages and traced a crash to _gnutls_x509_crt_get_raw_dn2() call in gnutls x509.c:1718.

ii libgnutls26 2.4.2-2 the GNU TLS library - runtime library
ii libgnutls26-dbg 2.4.2-2 GNU TLS library - debugger symbols
ii libneon27-gnutls 0.28.2-5 An HTTP and WebDAV client library (GnuTLS en
ii libneon27-gnutls-dbg 0.28.2-5 Detached symbols for libneon27 (GnuTLS enabl
ii libsvn1 1.5.1dfsg1-1ubuntu2 Shared libraries used by Subversion
ii subversion 1.5.1dfsg1-1ubuntu2 Advanced version control system

The trace:

$ gdb svn
GNU gdb 6.8-debian
Copyright (C) 2008 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 "i486-linux-gnu"...
(no debugging symbols found)
(gdb) run ci -m "#874 Using domain" verticals
Starting program: /usr/bin/svn ci -m "#874 Using domain" verticals
(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)
(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)
[Thread debugging using libthread_db enabled]
[New Thread 0xb71ddb20 (LWP 10547)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb71ddb20 (LWP 10547)]
0xb7675314 in _gnutls_x509_crt_get_raw_dn2 (cert=0x11, whom=0xb76b0e67 "issuer", start=0xbff362c4) at x509.c:1718
1718 x509.c: No such file or directory.
 in x509.c

(gdb) bt
#0 0xb7675314 in _gnutls_x509_crt_get_raw_dn2 (cert=0x11, whom=0xb76b0e67 "issuer", start=0xbff362c4) at x509.c:1718
#1 0xb767a21a in is_issuer (cert=0xb76af8ce, issuer_cert=0x9fbfee8) at verify.c:164
#2 0xb767b0f2 in _gnutls_verify_certificate2 (cert=0x11, trusted_cas=<value optimized out>, tcas_size=142, flags=0, output=0xbff36388) at verify.c:199
#3 0xb767b961 in gnutls_x509_crt_list_verify (cert_list=0xa138c20, cert_list_length=0, CA_list=0xa115a90, CA_list_length=142, CRL_list=0x0,
    CRL_list_length=0, flags=0, verify=0xbff3644c) at verify.c:396
#4 0xb765cb7c in _gnutls_x509_cert_verify_peers (session=0xa136238, status=0xbff3644c) at gnutls_x509.c:176
#5 0xb764ebf1 in gnutls_certificate_verify_peers2 (session=0xa136238, status=0xbff3644c) at gnutls_cert.c:606
#6 0xb764ec29 in gnutls_certificate_verify_peers (session=0xa136238) at gnutls_cert.c:639
#7 0xb7c64899 in ne__negotiate_ssl (sess=0x9fda7d0) at /build/buildd/neon27-0.28.2/src/ne_gnutls.c:683
#8 0xb7c52289 in send_request (req=0xa126e60, request=0xa12c800) at /build/buildd/neon27-0.28.2/src/ne_request.c:1542
#9 0xb7c516c5 in ne_begin_request (req=0xa126e60) at /build/buildd/neon27-0.28.2/src/ne_request.c:1167
#10 0xb7c51edd in ne_request_dispatch (req=0xa126e60) at /build/buildd/neon27-0.28.2/src/ne_request.c:1376
#11 0xb7c81d01 in svn_ra_neon__request_dispatch () from /usr/lib/libsvn_ra_neon-1.so.1
#12 0xb7c7f00b in ?? () from /usr/lib/libsvn_ra_neon-1.so.1
#13 0xb7c7fe20 in ?? () from /usr/lib/libsvn_ra_neon-1.so.1
#14 0xb7e8c9ae in svn_ra_open3 () from /usr/lib/libsvn_ra-1.so.1
#15 0xb7efcfec in svn_client__open_ra_session_internal () from /usr/lib/libsvn_client-1.so.1
#16 0xb7ed9573 in ?? () from /usr/lib/libsvn_client-1.so.1
#17 0xb7eda688 in svn_client_commit4 () from /usr/lib/libsvn_client-1.so.1
#18 0x0804d8b6 in ?? ()
#19 0x080549b5 in ?? ()
#20 0xb76d4685 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#21 0x0804c2c1 in ?? ()
(gdb)

I guess there is a problem with gnutls26 package - 2.4.2 is a bit old.

Revision history for this message
Tomasz Sterna (smoku) wrote :

I recompiled gnutls26_2.4.2-2.dsc by myself and installed libgnutls26_2.4.2-2_i386.deb libgnutls26-dbg_2.4.2-2_i386.deb. It didn't help - svn still segfaults.

Revision history for this message
Tomasz Sterna (smoku) wrote :

 uupdate ../gnutls-2.6.1.tar.bz2
 cd ../gnutls26-2.6.1
 rm debian/patches/20_GNUTLS-SA-2008-3.patch
 debuild
 sudo dpkg -i libgnutls26_2.6.1-0ubuntu1_i386.deb libgnutls26-dbg_2.6.1-0ubuntu1_i386.deb

$ dpkg -l libgnutls26
ii libgnutls26 2.6.1-0ubuntu1 the GNU TLS library - runtime library

Subversion still crashes during "svn commit".

Revision history for this message
Tomasz Sterna (smoku) wrote :

Downgrading to libgnutls26_2.4.1-1build1_i386.deb helped.

Revision history for this message
Javier Cabezas (javier-cabezas) wrote :

Confirmed

Changed in gnutls26:
status: New → Confirmed
Revision history for this message
Javier Cabezas (javier-cabezas) wrote :

libgnutls26_2.4.2-3 fixes it

Changed in gnutls26:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.