Bug 1659217 - mutt does not correctly decode PGP emails
Summary: mutt does not correctly decode PGP emails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mutt
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Matej Mužila
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-13 20:13 UTC by Riccardo Schirone
Modified: 2019-03-21 21:08 UTC (History)
11 users (show)

Fixed In Version: mutt-1.11.3-1.fc29 mutt-1.11.3-2.fc29 mutt-1.11.3-2.fc28
Clone Of:
Environment:
Last Closed: 2019-03-05 15:21:01 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
proposed patch (497 bytes, patch)
2018-12-13 20:13 UTC, Riccardo Schirone
no flags Details | Diff

Description Riccardo Schirone 2018-12-13 20:13:34 UTC
Created attachment 1514187 [details]
proposed patch

Description of problem:
With the new Secure Email feature of bugzilla.redhat.com, you may receive encrypted emails with the main attachment being "multipart/encrypted" + "Content-Transfer-Encoding: 7bit" and the sub-attachments "application/octet-stream" + "Content-Transfer-Encoding: quoted-printable".

I'm not able to decode these emails with mutt, because of the Content-Trasfer-Enconding which changes, for example, the common `=` present in base64 encodings used for PGP encrypted messages with "=3D"

Version-Release number of selected component (if applicable):
Mutt 1.10.1 (2018-07-13)

How reproducible:
Always

Steps to Reproduce:
1. Configure mutt with `set pgp_decrypt_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f"`
2. Add a key in the Secure Email option on bugzilla.redhat.com
3. Wait for the test email to appear in your inbox
3. Press enter on the encrypted test email


Actual results:
error with:
"Could not decrypt PGP message
Could not copy message"

Expected results:
The decrypted email is visible as usual.

Additional info:

By looking at the code, I think the valid_pgp_encrypted_handler is assuming that the octet-stream is not encoded, so it directly calls crypt_pgp_encrypted_handler. However, in some cases like this one, it may be necessary to decode the octet-stream attachment as well.

I'm attaching a patch I've tested locally and that seems to work.

Comment 1 Dominik 'Rathann' Mierzejewski 2018-12-19 13:01:55 UTC
Have you tried sending this upstream?

Comment 2 Riccardo Schirone 2018-12-19 13:08:18 UTC
Not yet. I only recently noticed they have a repository on GitLab. If they accept Merge Requests there, that's great I can send it right now.

Comment 3 Riccardo Schirone 2018-12-19 13:19:54 UTC
Patch submitted upstream: https://gitlab.com/muttmua/mutt/merge_requests/35

Comment 4 Riccardo Schirone 2018-12-26 18:47:18 UTC
A fix for this issue has been merged on master branch upstream (see https://gitlab.com/muttmua/mutt/commit/450de4637f6590487a073b250da342a1400a3ac3).

Please let me know if you'd like a PR to include the fix for the mutt package in Fedora.

Comment 5 Matej Mužila 2019-01-02 12:06:07 UTC
Hi,

thank you for submitting the patch upstream.

It will be included in Fedora after upstream release it.

Comment 6 Riccardo Schirone 2019-02-06 10:17:18 UTC
Hi,

It seems mutt has released at least a couple of releases with my fix included. Could it be added to the Fedora package as well?
Thanks

Comment 7 Fedora Update System 2019-02-06 15:31:50 UTC
mutt-1.11.3-1.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-7bb21ad3f6

Comment 8 Fedora Update System 2019-02-06 15:46:07 UTC
mutt-1.11.3-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2019-3fc457b33f

Comment 9 Fedora Update System 2019-02-10 01:50:29 UTC
mutt-1.11.3-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-3fc457b33f

Comment 10 Fedora Update System 2019-02-10 04:27:30 UTC
mutt-1.11.3-1.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-7bb21ad3f6

Comment 11 Fedora Update System 2019-02-23 02:06:36 UTC
mutt-1.11.3-1.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Edgar Hoch 2019-02-24 21:00:46 UTC
mutt update is skipped because it seams to be build with something not compatible with pgp-tools-2.7-3.fc29.x86_64, but there is no newer package available.

 Problem: problem with installed package pgp-tools-2.7-3.fc29.x86_64
  - package pgp-tools-2.7-3.fc29.x86_64 requires /usr/bin/pgpring, but none of the providers can be installed
  - cannot install both mutt-5:1.11.3-1.fc29.x86_64 and mutt-5:1.10.1-1.fc29.x86_64
  - cannot install both mutt-5:1.10.1-1.fc29.x86_64 and mutt-5:1.11.3-1.fc29.x86_64
  - cannot install the best update candidate for package mutt-5:1.10.1-1.fc29.x86_64

Comment 13 Matej Mužila 2019-02-25 13:49:37 UTC
(In reply to Edgar Hoch from comment #12)
> mutt update is skipped because it seams to be build with something not
> compatible with pgp-tools-2.7-3.fc29.x86_64, but there is no newer package
> available.
> 
>  Problem: problem with installed package pgp-tools-2.7-3.fc29.x86_64
>   - package pgp-tools-2.7-3.fc29.x86_64 requires /usr/bin/pgpring, but none
> of the providers can be installed
>   - cannot install both mutt-5:1.11.3-1.fc29.x86_64 and
> mutt-5:1.10.1-1.fc29.x86_64
>   - cannot install both mutt-5:1.10.1-1.fc29.x86_64 and
> mutt-5:1.11.3-1.fc29.x86_64
>   - cannot install the best update candidate for package
> mutt-5:1.10.1-1.fc29.x86_64

Hi,

thank you for reporting this issue. It was caused by upstream change [1].

[1] https://gitlab.com/muttmua/mutt/commit/a2b289361d90360c37eb19cca2cf1216ab60fb7b

Comment 14 Fedora Update System 2019-02-25 14:03:31 UTC
mutt-1.11.3-2.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-3cb0b5c78e

Comment 15 Fedora Update System 2019-02-25 14:15:56 UTC
mutt-1.11.3-2.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2019-87fa716dde

Comment 16 Fedora Update System 2019-02-26 02:12:04 UTC
mutt-1.11.3-2.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-87fa716dde

Comment 17 Fedora Update System 2019-02-26 04:11:13 UTC
mutt-1.11.3-2.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-3cb0b5c78e

Comment 18 Fedora Update System 2019-03-05 15:21:01 UTC
mutt-1.11.3-2.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2019-03-21 21:08:22 UTC
mutt-1.11.3-2.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.