unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Thomas Fitzsimmons <fitzsim@fitzsim.org>
To: Ted Zlatanov <tzz@lifelogs.com>
Cc: Lars Magne Ingebrigtsen <larsi@gnus.org>, 10904@debbugs.gnu.org
Subject: bug#10904: 24.0.93; Infinite loop in GnuTLS code during Gnus nnimap-initiated SSL handshake
Date: Mon, 09 Apr 2012 23:07:34 -0400	[thread overview]
Message-ID: <m3vcl89te1.fsf@fitzsim.org> (raw)
In-Reply-To: <87sjgdoi43.fsf@lifelogs.com> (Ted Zlatanov's message of "Sun, 08 Apr 2012 20:37:32 -0400")

Ted Zlatanov <tzz@lifelogs.com> writes:

> On Sun, 08 Apr 2012 13:46:56 -0400 Thomas Fitzsimmons <fitzsim@fitzsim.org> wrote:
>
> TF> The loop happens when the GnuTLS handshake fails for some reason, within
> TF> a network process.  I use the attached patch to limit the number of
> TF> iterations.  I'm not familiar enough with the Emacs process code to
> TF> suggest a fix though.
>
> Thanks again for the help and provided patch.  I modified it to keep the
> number of handshakes tried per connection, not globally.  Please try
> it.  I will also propose it on emacs-devel for inclusion in the upcoming
> 24.1 release.

I tried trunk against my IMAP server and the applied patch prevents the
infinite loop.  At the default gnutls-log-level, a connection attempt
fails with:

Warning: Opening nnimap server on <imap_server_hostname>...failed: ; Unable to open server nnimap+<imap_server_hostname> due to: GnuTLS error: #<process *nnimap*>, -9
gnutls.c: [0] (Emacs) fatal error: The specified session has been invalidated for some reason.

A nice improvement would be to detect when the server uses a ciphersuite
that GnuTLS's default priority list ("NORMAL") rejects, warn the user,
and ask if they want to retry with a more permissive list
("PERFORMANCE").  But that's a separate enhancement -- for now your
patch fixes the infinite loop and setting gnutls-algorithm-priority to
"performance" works around the server's weak ciphersuite.

Thanks,
Thomas





  parent reply	other threads:[~2012-04-10  3:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-27 23:51 bug#10904: 24.0.93; Infinite loop in GnuTLS code during Gnus nnimap-initiated SSL handshake Thomas Fitzsimmons
2012-03-03 14:56 ` Lars Magne Ingebrigtsen
2012-03-19 13:54   ` Ted Zlatanov
2012-03-21 15:40     ` Thomas Fitzsimmons
2012-03-22 21:29       ` Lars Magne Ingebrigtsen
2012-03-24 22:04         ` Thomas Fitzsimmons
2012-03-30 12:13           ` Ted Zlatanov
2012-03-30 21:52             ` Thomas Fitzsimmons
2012-04-08 17:46               ` Thomas Fitzsimmons
2012-04-09  0:37                 ` Ted Zlatanov
2012-04-09 13:14                   ` Ted Zlatanov
2012-04-10  3:07                   ` Thomas Fitzsimmons [this message]
2012-04-10 11:54                     ` Ted Zlatanov
2012-04-10 17:44                       ` Lars Magne Ingebrigtsen
2012-04-11 12:02                         ` Ted Zlatanov
2014-12-08 20:06                       ` Lars Magne Ingebrigtsen
2014-12-10 16:10                         ` Ted Zlatanov
2016-02-05  7:26                           ` Lars Ingebrigtsen
2016-06-02 14:21                             ` Ted Zlatanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3vcl89te1.fsf@fitzsim.org \
    --to=fitzsim@fitzsim.org \
    --cc=10904@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=tzz@lifelogs.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).