unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>,
	notmuch mailing list <notmuch@notmuchmail.org>
Subject: Re: possible infinite recursion in notmuch-cli
Date: Sun, 26 Dec 2021 09:05:59 -0400	[thread overview]
Message-ID: <87fsqfms7c.fsf@tethera.net> (raw)
In-Reply-To: <874n8ospsy.fsf@alice.fifthhorseman.net>

Daniel Kahn Gillmor <dkg@fifthhorseman.net> writes:


> After some discussion with amdragon on IRC, i believe that this is only
> relevant to notmuch when actively decrypting a message -- OpenPGP's
> ability to embed compression makes it possible to write a PGP/MIME
> message that is a quine: that is, when decompressed, it would expand to
> itself, which would send our parser into an infinite loop.
>
> Since we're not decrypting during indexing, only notmuch-show and
> notmuch-reply are probably affected by this problem. (but if someone
> implements indexing of encrypted messages, then we'd have to worry about
> this in the indexer as well)

This is indeed our current situation.

> The simple and generalized solution would be to limit the recursive
> depth of our walk of the MIME tree; probably a large limit of something
> like 30 or 50 would not trigger any real-world problems, and would halt
> a runaway recursion well before most modern machines ran out of
> resources.

So do I understand correctly that to test this proposed fix, we would
not need to generate a MIME-quine (which sounds challenging) but just a
very deep MIME tree?

      reply	other threads:[~2021-12-26 13:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-10 22:51 possible infinite recursion in notmuch-cli Daniel Kahn Gillmor
2021-12-26 13:05 ` David Bremner [this message]

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://notmuchmail.org/

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

  git send-email \
    --in-reply-to=87fsqfms7c.fsf@tethera.net \
    --to=david@tethera.net \
    --cc=dkg@fifthhorseman.net \
    --cc=notmuch@notmuchmail.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://yhetil.org/notmuch.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).