Closed Bug 1908113 Opened 2 years ago Closed 2 years ago

Thunderbird 128 no longer uses base64 encoding for signed-only OpenPGP messages, resulting in broken signatures with some providers.

Categories

(Thunderbird :: Security, defect)

Thunderbird 128
defect

Tracking

(thunderbird_esr128 fixed, thunderbird129 fixed)

VERIFIED FIXED
130 Branch
Tracking Status
thunderbird_esr128 --- fixed
thunderbird129 --- fixed

People

(Reporter: u757434, Assigned: KaiE)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0

Steps to reproduce:

I tried TB 115.12. Everything is OK.
Error only in TB 128.0esr.

Actual results:

If the signature text field in the account settings is empty, I can send a digitally signed email using OpenPGP.
The digital signature is valid.

However, if the signature text field contains text, then the digital signature of a sent email is invalid.

But strangely enough, the digital signature is valid if I send this email encrypted.

additional information

The following error message appears in the email software eM Client:

The message signature contains confirmation errors:

Signature verification: The hash value of the message differs from the value of the signature.

I cannot reproduce.
I tried both plain text and html emails.

Please send an example email to yourself, then save that email to a file (using menu file save as), and provide the resulting .eml file
(Either attach it here, or if you prefer, zip it, and send it by email to me. zipping is important to ensure no bits get modified in transit.)

Flags: needinfo?(andy76.honda)

Or simply send a signed email to kaie@kuix.de

cc yourself on the test email to me, so you can confirm (in sent folder, after sending) that it looks broken for you.

I sent you a signed email. With an eml file as an attachment.

Digital signature valid in the sent folder.

But the recipient receives an invalid signature.

(In reply to andy76.honda from comment #5)

Digital signature valid in the sent folder.

That means the message is probably modified by your mail provider after you send it.

I see that we're sending out 8bit messages for messages with OpenPGP signatures.

We have recently changed outgoing signed-only S/MIME messages to always use base64 encoding for the inner message, which makes it unnecessary for MTAs to change the encoding.

Looking at the test messages from Andy, I see they use quoted-printable encoding.

I think we should implement the equivalent fix from bug 1741362 for OpenPGP.

Status: UNCONFIRMED → NEW
Ever confirmed: true

Andreas has provided me test messages that confirm my theory.

The test message used 7bit encoding, but still the provider converted it to quoted-printable.

This appears to be regression and change of functional behavior.

Looking at signed-only OpenPGP messages sent with TB 115, I see did already use base64 encoding.

This also explains why the reporter says it worked with 115, and it broken in 128, only.

Blocks: tb128found
Keywords: regression
Summary: Invalid digital signature with OpenPGP → Thunderbird 128 no longer uses base64 encoding for signed-only OpenPGP messages, resulting in broken signatures with some providers.

I found the cause.

It was this "cleanup" work:
https://hg.mozilla.org/comm-central/rev/66f9d9e76038#l2.1153

I failed to notice the functional change in the cleanup.

Magnus, I think we need to be more careful when doing cleanup in the future, and be even more careful to not introduce accidental behavior changes.

I have a patch, which restores the code.
It fixes the issue in my test, we again produce base64 encoding.

Flags: needinfo?(andy76.honda)
Assignee: nobody → kaie
Status: NEW → ASSIGNED
Regressed by: 1814893
See Also: → 1908251
Attachment #9413111 - Attachment description: Bug 1908113 - Revert accidental functional change from cleanup. r=mkmelin → Bug 1908113 - Revert accidental functional change from cleanup, and improve decision logic. r=mkmelin

Pushed by daniel@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/3f5427cedad6
Revert accidental functional change from cleanup, and improve decision logic. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED

Comment on attachment 9413111 [details]
Bug 1908113 - Revert accidental functional change from cleanup, and improve decision logic. r=mkmelin

[Approval Request Comment]
Regression caused by (bug #): 1814893
User impact if declined: broken digital signatures on sent messages
Testing completed (on c-c, etc.): manually
Risk to taking this patch (and alternatives if risky): very low, because it's re-enable previously removed functionality

Attachment #9413111 - Flags: approval-comm-esr128?
Attachment #9413111 - Flags: approval-comm-beta?
Target Milestone: --- → 130 Branch

Comment on attachment 9413111 [details]
Bug 1908113 - Revert accidental functional change from cleanup, and improve decision logic. r=mkmelin

[Triage Comment]
Approved for beta
Approved for esr128

Attachment #9413111 - Flags: approval-comm-esr128?
Attachment #9413111 - Flags: approval-comm-esr128+
Attachment #9413111 - Flags: approval-comm-beta?
Attachment #9413111 - Flags: approval-comm-beta+

Everything works with TB 128.1.0esr.
With my email provider web.de and gmx.de, digital signatures are now valid again when I use OpenPGP.
Thank you very much.

Thanks for confirming.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: