unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: 10904@debbugs.gnu.org
Cc: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Subject: bug#10904: 24.0.93; Infinite loop in GnuTLS code during Gnus nnimap-initiated SSL handshake
Date: Fri, 05 Feb 2016 18:26:46 +1100	[thread overview]
Message-ID: <87powbzkg9.fsf@gnus.org> (raw)
In-Reply-To: <878uif8p0f.fsf@lifelogs.com> (Ted Zlatanov's message of "Wed, 10 Dec 2014 11:10:08 -0500")

Ted Zlatanov <tzz@lifelogs.com> writes:

> On Mon, 08 Dec 2014 21:06:21 +0100 Lars Magne Ingebrigtsen <larsi@gnus.org> wrote: 
>
> LMI> Ted Zlatanov <tzz@lifelogs.com> writes:
>>> I plan to follow Nikos' advice here:
>>> 
>>> http://permalink.gmane.org/gmane.comp.encryption.gpg.gnutls.devel/6017
>>> 
>>> so we'll drop from NORMAL to PERFORMANCE, basically, if the user
>>> approves.  After the 24.1 release I'll look at this.
>
> LMI> Would it make sense to just default to PERFORMANCE now that we have the
> LMI> NSM?
>
> The default priority string should correspond to the medium
> `network-security-level' so yes, I think so.  But I really think those
> two should be bound closer together, as I mentioned.

Yeah...  running with PERFORMANCE by default is perhaps hubris.  :-)
But how would we do this within the open-network-stream/nsm
framework...  Basically, with NORMAL the tls negotiation will fail.  It
would be nice if we could then let the NSM query the user for whether
they want to lower the security to PERFORMANCE and reconnect.

But that doesn't quite fit the way all of this is structured.  If the
user says "yes, go ahead and lower security", then the NSM will have to,
er, bind something, and then call open-network-stream all over again?
Sort of?

That's probably possible, but it may require some extensive tinkering
with how `nsm-verify-connection' is called...  or with how
open-network-stream structures the call to NSM.

*time passes*

Hm!  Perhaps it won't be that difficult or invasive.  This is how this
is called:

(defun network-stream-open-tls (name buffer host service parameters)
  (with-current-buffer buffer
    (let* ((start (point-max))
	   (stream
            (if (gnutls-available-p)
                (open-gnutls-stream name buffer host service
                                    (plist-get parameters :nowait))
              (open-tls-stream name buffer host service)))
	   (eoc (plist-get parameters :end-of-command)))
      ;; Check certificate validity etc.
      (when (and (gnutls-available-p) stream)
	(setq stream (nsm-verify-connection stream host service)))

So what happens here is that stream will be nil or dead from
open-gnutls-stream.  In that case, it could call nsm-verify-connection
with some special parameters, have it prompt, and then reconnect if the
user says "yes"...

Hm.  But then those stores parameters should be used the next time in
network-stream, and it doesn't have access to those stored parameters.

Gah.  This stuff is hard.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2016-02-05  7:26 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
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 [this message]
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=87powbzkg9.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=10904@debbugs.gnu.org \
    --cc=fitzsim@fitzsim.org \
    /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).