[Pkg-gnutls-maint] Bug#429183: Bug#429183: /usr/bin/gnutls-cli: segfaults when doing starttls against smtp.hispeed.ch
James Westby
jw+debian at jameswestby.net
Sat Jun 16 10:07:26 UTC 2007
Hi Marc,
Thanks for the report.
On (16/06/07 10:44), Marc Haber wrote:
> *** Starting TLS handshake
> *** Fatal error: A record packet with illegal version was received.
> *** Handshake has failed
> Segmentation fault
> $
>
> The "record packet with illegal version was received" sounds familiar
> and might be a bug already known, but gnutls-cli should definetely not
> segfault in this situation.
Indeed it shouldn't
The code that is causing this is
for (;;)
{
if (starttls_alarmed && !hd.secure)
{
fprintf (stderr, "*** Starting TLS handshake\n");
ret = do_handshake (&hd);
if (ret < 0)
{
fprintf (stderr, "*** Handshake has failed\n");
socket_bye (&hd);
user_term = 1;
break;
}
}
FD_ZERO (&rset);
FD_SET (fileno (stdin), &rset);
FD_SET (hd.fd, &rset);
where it is the final FD_SET call that is failing as hd.fd is -1. This
is set in the socket_bye call. However I do not understand why the break
does not jump out of the loop and avoid the FD_SET call. Does anyone
have any ideas?
Thanks,
James
--
James Westby -- GPG Key ID: B577FE13 -- http://jameswestby.net/
seccure key - (3+)k7|M*edCX/.A:n*N!>|&7U.L#9E)Tu)T0>AM - secp256r1/nistp256
More information about the Pkg-gnutls-maint
mailing list