From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 2AD806DE0314 for ; Thu, 31 Aug 2017 08:18:33 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.012 X-Spam-Level: X-Spam-Status: No, score=-0.012 tagged_above=-999 required=5 tests=[AWL=0.089, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FkVAi1PN1OlV for ; Thu, 31 Aug 2017 08:18:32 -0700 (PDT) Received: from mail.koumakan.jp (happysky.koumakan.jp [195.154.222.77]) by arlo.cworth.org (Postfix) with ESMTPS id 168966DE0119 for ; Thu, 31 Aug 2017 08:18:32 -0700 (PDT) Received: from localhost (unknown [10.0.0.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.koumakan.jp (Postfix) with ESMTPSA id 3CBC4A431; Fri, 1 Sep 2017 00:17:56 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oxij.org; s=default; t=1504192710; bh=aTe7HwZIvVI4kVvAx/fF9AvXG8I6lRUeb4ezIG/oDdU=; h=From:To:Subject:In-Reply-To:References:Date; b=pz8UWtXzpfEgumHGmSZBDGmgG9xWY99iEMNnkXJmwj7V10gMqDnLYi08wrUx54Vnw N4RgQcchWspvMPeV2ur6zsn+xnHYE4yaav97HfB8Kw72BKFN+BliQn1bzmYql6GFWl KHRxYVBsuhbJRluXHYLlcDf7uLr/TRd7nOOD0ixY= From: Jan Malakhovski To: David Bremner , notmuch@notmuchmail.org Subject: Re: [PATCH] crypto: gracefully handle gmime errors In-Reply-To: <87o9qvernd.fsf@tesseract.cs.unb.ca> References: <20170831133133.9944-1-git-send-email-oxij@oxij.org> <87r2vres0h.fsf@tesseract.cs.unb.ca> <87o9qvernd.fsf@tesseract.cs.unb.ca> Date: Thu, 31 Aug 2017 15:17:02 +0000 Message-ID: <871snr6a35.fsf@oxij.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Aug 2017 15:18:33 -0000 David Bremner writes: > Oh, by the way, I think this was reported already in > id:qf5d17wzq90.fsf@google.com, but we don't have a test case. Yep. Seems to be the same bug. Added to References. > So if you have (or can make) a message that triggers these segfaults, > and that you can share, that would be helpful. The test suite has such a message already. "signature verification (notmuch CLI)" test fails with a SIGSEGV when built with gmime-2.6.23. T355-smime: Testing S/MIME signature verification and decryption gpgsm: keybox '/tmp/nix-build-notmuch-0.25.drv-0/notmuch-test-8789.qe2sRf/gnupg/pubring.kbx' created PASS emacs delivery of S/MIME signed message PASS emacs delivery of S/MIME encrypted + signed message PASS Signature verification (openssl) FAIL signature verification (notmuch CLI) --- T355-smime.4.expected 2017-08-31 14:57:24.145052329 +0000 +++ T355-smime.4.output 2017-08-31 14:57:24.145052329 +0000 @@ -1,56 +1 @@ -[ - [ - [ - { - "body": [ - { - "content": [ - { - "content": "This is a test signed message.\n", - "content-type": "text/plain", - "id": 2 - }, - { - "content-disposition": "attachment", - "content-length": "NONZERO", - "content-transfer-encoding": "base64", - "content-type": "application/x-pkcs7-signature", - "filename": "smime.p7s", - "id": 3 - } - ], - "content-type": "multipart/signed", - "id": 1, - "sigstatus": [ - { - "created": 946728000, - "expires": 424242424, - "fingerprint": "616F46CD73834C63847756AF0DFB64A6E0972A47", - "status": "good" - } - ] - } - ], - "date_relative": "2000-01-01", - "excluded": false, - "filename": [ - "YYYYY" - ], - "headers": { - "Date": "Sat, 01 Jan 2000 12:00:00 +0000", - "From": "Notmuch Test Suite ", - "Subject": "test signed message 001", - "To": "test_suite@notmuchmail.org" - }, - "id": "XXXXX", - "match": true, - "tags": [ - "inbox", - "signed" - ], - "timestamp": 946728000 - }, - [] - ] - ] -] + Failed to construct pkcs7 context. No JSON object could be decoded PASS Decryption and signature verification (openssl) Cheers, Jan