* segmentation fault caused by empty application/pgp-signature part
@ 2013-07-19 12:10 David Bremner
2013-07-19 15:02 ` Daniel Kahn Gillmor
0 siblings, 1 reply; 4+ messages in thread
From: David Bremner @ 2013-07-19 12:10 UTC (permalink / raw)
To: notmuch mailing list
[-- Attachment #1: Type: text/plain, Size: 363 bytes --]
The attached message is edited from one I managed to convince notmuch-emacs to
send via some mishap with gpg-agent. It has an empty signature
part. Clearly this is wrong, but on the other hand, it should not cause
notmuch show --decrypt to segmentation fault. As for the actual creation
of the message, I suppose that's more likely a bug in emacs, if
anything.
[-- Attachment #2: pgp-fail.eml --]
[-- Type: message/rfc822, Size: 482 bytes --]
[-- Attachment #2.1.1: Type: text/plain, Size: 6 bytes --]
blah
[-- Attachment #2.1.2: Type: application/pgp-signature, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: segmentation fault caused by empty application/pgp-signature part
2013-07-19 12:10 segmentation fault caused by empty application/pgp-signature part David Bremner
@ 2013-07-19 15:02 ` Daniel Kahn Gillmor
2013-07-19 15:57 ` Jameson Graef Rollins
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Kahn Gillmor @ 2013-07-19 15:02 UTC (permalink / raw)
To: notmuch
[-- Attachment #1: Type: text/plain, Size: 2481 bytes --]
On 07/19/2013 08:10 AM, David Bremner wrote:
>
> The attached message is edited from one I managed to convince notmuch-emacs to
> send via some mishap with gpg-agent. It has an empty signature
> part. Clearly this is wrong, but on the other hand, it should not cause
> notmuch show --decrypt to segmentation fault. As for the actual creation
> of the message, I suppose that's more likely a bug in emacs, if
> anything.
confirmed the bug in notmuch.
here is the backtrace:
>> Program received signal SIGSEGV, Segmentation fault.
>> __strcasecmp_l_avx () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:164
>> 164 ../sysdeps/x86_64/multiarch/strcmp-sse42.S: No such file or directory.
>> (gdb) bt
>> #0 __strcasecmp_l_avx () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:164
>> #1 0x0000000000412973 in notmuch_crypto_get_context (crypto=0x7fffffffe248, protocol=0x0) at crypto.c:36
>> #2 0x00000000004123a9 in _mime_node_create (part=0x6dc180, parent=0x66a5a0) at mime-node.c:190
>> #3 mime_node_child (parent=parent@entry=0x66a5a0, child=child@entry=0) at mime-node.c:310
>> #4 0x000000000040f3ef in format_part_text (ctx=<optimized out>, sp=0x6695a0, node=0x66a5a0, indent=0, params=0x7fffffffe230) at notmuch-show.c:592
>> #5 0x000000000040eda9 in show_message (ctx=ctx@entry=0x6280f0, sp=sp@entry=0x6695a0, message=message@entry=0x6697c0, indent=indent@entry=0, params=params@entry=0x7fffffffe230, format=0x61bd30 <format_text>)
>> at notmuch-show.c:905
>> #6 0x000000000040ee15 in show_messages (ctx=ctx@entry=0x6280f0, format=format@entry=0x61bd30 <format_text>, sp=sp@entry=0x6695a0, messages=0x66a3a0, indent=indent@entry=0, params=params@entry=0x7fffffffe230)
>> at notmuch-show.c:941
>> #7 0x0000000000410955 in do_show (params=0x7fffffffe230, sp=0x6695a0, format=0x61bd30 <format_text>, query=0x643a20, ctx=0x6280f0) at notmuch-show.c:1024
>> #8 notmuch_show_command (ctx=0x6280f0, argc=<optimized out>, argv=<optimized out>) at notmuch-show.c:1228
>> #9 0x000000000040691c in main (argc=4, argv=0x7fffffffe6a8) at notmuch.c:329
>> (gdb) up
>> #1 0x0000000000412973 in notmuch_crypto_get_context (crypto=0x7fffffffe248, protocol=0x0) at crypto.c:36
>> 36 if ((strcasecmp (protocol, "application/pgp-signature") == 0)
>> (gdb) p protocol
>> $1 = 0x0
>> (gdb)
Looks like it's a pretty obvious fix -- test protocol for NULL before
strcasecmp'ing it. sorry i don't have time to fix it right now.
--dkg
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 1027 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: segmentation fault caused by empty application/pgp-signature part
2013-07-19 15:02 ` Daniel Kahn Gillmor
@ 2013-07-19 15:57 ` Jameson Graef Rollins
2013-07-19 17:32 ` Tomi Ollila
0 siblings, 1 reply; 4+ messages in thread
From: Jameson Graef Rollins @ 2013-07-19 15:57 UTC (permalink / raw)
To: Daniel Kahn Gillmor, notmuch
[-- Attachment #1: Type: text/plain, Size: 358 bytes --]
On Fri, Jul 19 2013, Daniel Kahn Gillmor <dkg@fifthhorseman.net> wrote:
> confirmed the bug in notmuch.
>
> here is the backtrace:
I just sent a patch to the fix this, but I munged the In-Reply-To:
id:1374248172-14199-1-git-send-email-jrollins@finestructure.net
Maybe it's better that it's not in this thread, since maybe now it will
be viewable!
jamie.
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: segmentation fault caused by empty application/pgp-signature part
2013-07-19 15:57 ` Jameson Graef Rollins
@ 2013-07-19 17:32 ` Tomi Ollila
0 siblings, 0 replies; 4+ messages in thread
From: Tomi Ollila @ 2013-07-19 17:32 UTC (permalink / raw)
To: Jameson Graef Rollins, Daniel Kahn Gillmor, notmuch
On Fri, Jul 19 2013, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> On Fri, Jul 19 2013, Daniel Kahn Gillmor <dkg@fifthhorseman.net> wrote:
>> confirmed the bug in notmuch.
>>
>> here is the backtrace:
>
> I just sent a patch to the fix this, but I munged the In-Reply-To:
>
> id:1374248172-14199-1-git-send-email-jrollins@finestructure.net
>
> Maybe it's better that it's not in this thread, since maybe now it will
> be viewable!
The patch in (*) works. apply jetzt :D
(*) id:1374248172-14199-1-git-send-email-jrollins@finestructure.net
> jamie.
Tomi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-07-19 17:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-19 12:10 segmentation fault caused by empty application/pgp-signature part David Bremner
2013-07-19 15:02 ` Daniel Kahn Gillmor
2013-07-19 15:57 ` Jameson Graef Rollins
2013-07-19 17:32 ` Tomi Ollila
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).