[gnutls-devel] gnutls-cli 2.x segfault

Andreas Metzler ametzler at downhill.at.eu.org
Wed May 22 19:29:44 CEST 2013


On 2013-05-22 Alessandro Ghedini <ghedo at debian.org> wrote:
[...]
Hello,

gnutls-cli 2.12.23 segfaults on amd64 when conecting to a specific
host:
------------------------------------------------------------
(sid-AMD64)ametzler at argenau:/tmp$  gdb /usr/lib/x86_64-linux-gnu/libgnutls26/gnu
tls-cli
GNU gdb (GDB) 7.6-debian
Copyright (C) 2013 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 "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/lib/x86_64-linux-gnu/libgnutls26/gnutls-cli...done.
(gdb) run sede.dgt.gob.es -p 443
Starting program: /usr/lib/x86_64-linux-gnu/libgnutls26/gnutls-cli sede.dgt.gob.es -p 443
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Resolving 'sede.dgt.gob.es'...
Connecting to '213.4.59.219:443'...

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b3908e in _gnutls_ciphertext2compressed (
    session=session at entry=0x6214c0,
    compress_data=compress_data at entry=0x624e30 "\001",
    compress_size=compress_size at entry=16384, ciphertext=..., type=21 '\025',
    params=params at entry=0x622600) at gnutls_cipher.c:572
572     gnutls_cipher.c: No such file or directory.
(gdb) bt
#0  0x00007ffff7b3908e in _gnutls_ciphertext2compressed (
    session=session at entry=0x6214c0,
    compress_data=compress_data at entry=0x624e30 "\001",
    compress_size=compress_size at entry=16384, ciphertext=..., type=21 '\025',
    params=params at entry=0x622600) at gnutls_cipher.c:572
#1  0x00007ffff7b392a3 in _gnutls_decrypt (session=session at entry=0x6214c0,
    ciphertext=ciphertext at entry=0x622285 "P\301=\347\030\201\357K\353\312\270\306O\n\202)\255\341\327\323\031\004,Y\325C\343y\361_l\367",
    ciphertext_size=ciphertext_size at entry=32, data=data at entry=0x624e30 "\001",
    max_data_size=16384, type=type at entry=GNUTLS_ALERT, params=0x622600)
    at gnutls_cipher.c:148
#2  0x00007ffff7b36cd1 in _gnutls_recv_int (session=session at entry=0x6214c0,
    type=type at entry=GNUTLS_HANDSHAKE,
    htype=htype at entry=GNUTLS_HANDSHAKE_FINISHED,
    data=data at entry=0x621aa0 "\016", sizeofdata=sizeofdata at entry=1)
    at gnutls_record.c:1068
#3  0x00007ffff7b3aa0c in _gnutls_handshake_io_recv_int (
    session=session at entry=0x6214c0, type=type at entry=GNUTLS_HANDSHAKE,
    htype=htype at entry=GNUTLS_HANDSHAKE_FINISHED, iptr=iptr at entry=0x621aa0,
    sizeOfPtr=sizeOfPtr at entry=1) at gnutls_buffers.c:893
#4  0x00007ffff7b3db1d in _gnutls_recv_handshake_header (
    recv_type=<synthetic pointer>, type=type at entry=GNUTLS_HANDSHAKE_FINISHED,
    session=session at entry=0x6214c0) at gnutls_handshake.c:1285
#5  _gnutls_recv_handshake (session=session at entry=0x6214c0,
    data=data at entry=0x7fffffffd388, datalen=datalen at entry=0x7fffffffd384,
    type=type at entry=GNUTLS_HANDSHAKE_FINISHED,
    optional=optional at entry=MANDATORY_PACKET) at gnutls_handshake.c:1447
#6  0x00007ffff7b3e55c in _gnutls_recv_finished (session=0x6214c0)
    at gnutls_handshake.c:748
#7  _gnutls_recv_handshake_final (session=session at entry=0x6214c0,
    init=init at entry=0) at gnutls_handshake.c:2956
#8  0x00007ffff7b3e954 in _gnutls_handshake_common (
    session=session at entry=0x6214c0) at gnutls_handshake.c:3138
#9  0x00007ffff7b400ba in gnutls_handshake (session=0x6214c0)
    at gnutls_handshake.c:2690
#10 0x00000000004069be in do_handshake (socket=0x7fffffffd4c0) at cli.c:1108
#11 0x00000000004056b4 in main (argc=<optimized out>, argv=<optimized out>)
    at cli.c:793
------------------------------------------------------------

Strangely I don't see this on ix86.

cu Andreas

-- 
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'



More information about the Gnutls-devel mailing list