TB102: receiving many (>120) OpenPGP keys in one email hangs/crashes Thunderbird
Categories
(MailNews Core :: Security: OpenPGP, defect, P1)
Tracking
(thunderbird_esr102+ fixed, thunderbird103 affected)
People
(Reporter: c3023, Assigned: KaiE)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(2 files)
(deleted),
text/x-phabricator-request
|
wsmwk
:
approval-comm-beta-
wsmwk
:
approval-comm-esr102+
|
Details |
(deleted),
text/x-phabricator-request
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:101.0) Gecko/20100101 Firefox/101.0
Steps to reproduce:
- send an email with more than 90 keys attached (e.g. choose "Send public key(s) via E-Mail" in the TB Open PGP Key manager - to distribute all organizational keys without the need for the recipient to add them separately from keyservers, or to share keys which are not on keyservers)
- try to open this email, and click on the arrow to expand the list of attachments
Actual results:
- thunderbird starts to hang for some minutes (~90 keys attached), but eventually succeeds to import. If there are more keys, like >120 keys, TB becomes unresponsive for a very long time, and I have to end the process via the task manager)
- there is nothing in the error console
- I use Win10Pro latest 64bit
This didn't happen with TB91 (I can import 180 keys without problems with TB91), and I think this might have to do with the new functionality to automatically import keys which are attached (and/or check whether the keys exist in the keyring?). I don't finding the bug anymore where this functionality is discussed, but I wonder if there is a parameter to disable the automatic key-checking, automatic import? I know 180 keys is a lot, but its still a bug which crashes/hangs TB, and this didn't happen in previous versions (we do this since TB60 or so).
Expected results:
- I should be able to successfully complete key import, just as this happened in TB91.
Comment 1•2 years ago
|
||
It doesn't automatically import, it will only collect them in a separate storage area so that you can use them later.
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 2•2 years ago
|
||
I can reproduce. I found an operation that we perform repeatedly and which is very expensive (that's even before we deal with caching it in CollectedKeysDB).
I see very good potential to optimize, reducing from O(n²) to O(n).
Working on a patch.
Assignee | ||
Comment 3•2 years ago
|
||
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 4•2 years ago
|
||
Comment on attachment 9285901 [details]
Bug 1775115 - Optimize automatic processing of OpenPGP public key atttachments, avoid quadratic complexity. r=mkmelin
[Approval Request Comment]
Regression caused by (bug #): 1767942
User impact if declined: Slowness/Lockup/DoS
Testing completed (on c-c, etc.): manually
Risk to taking this patch (and alternatives if risky): low, we reuse an existing functionality to retrieve the same data, avoiding repeated unnecessary processing
Updated•2 years ago
|
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/e21ab006cec7
Optimize automatic processing of OpenPGP public key atttachments, avoid quadratic complexity. r=mkmelin
Comment 6•2 years ago
|
||
comm/mail/test/browser/openpgp/browser_openPGPDrafts.js is failing since this landed
Assignee | ||
Comment 7•2 years ago
|
||
(In reply to Magnus Melin [:mkmelin] from comment #6)
comm/mail/test/browser/openpgp/browser_openPGPDrafts.js is failing since this landed
getKeyListFromKeyBlockImpl@chrome://openpgp/content/modules/RNP.jsm fails because parameter keyBlockStr is null/empty.
I cannot yet reproduce this by running the test locally.
Comment 8•2 years ago
|
||
This missed beta uplift, so it will appear in beta 104 with the next esr opportunity being 102.1.1
Comment 9•2 years ago
|
||
Comment on attachment 9285901 [details]
Bug 1775115 - Optimize automatic processing of OpenPGP public key atttachments, avoid quadratic complexity. r=mkmelin
[Triage Comment]
Comment 10•2 years ago
|
||
(In reply to Kai Engert (:KaiE:) from comment #7)
(In reply to Magnus Melin [:mkmelin] from comment #6)
comm/mail/test/browser/openpgp/browser_openPGPDrafts.js is failing since this landed
getKeyListFromKeyBlockImpl@chrome://openpgp/content/modules/RNP.jsm fails because parameter keyBlockStr is null/empty.
I cannot yet reproduce this by running the test locally.
browser_collectKeys.js needs to run first for the failures to happen.
Assignee | ||
Comment 11•2 years ago
|
||
Thanks Geoff for the detective work.
I made a mistake in the original patch. I had intended to set parameter 6 to true.
I had wrongly counted parameters, and didn't pay attention to default parameters, and I had wrongly changed parameter 5.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 12•2 years ago
|
||
Updated•2 years ago
|
Comment 13•2 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/ef78f19d4bfd
Follow up to fix mistake in earlier patch, set correct parameter (for pubkey) to true. r=mkmelin
Updated•2 years ago
|
Comment 14•2 years ago
|
||
Comment on attachment 9285901 [details]
Bug 1775115 - Optimize automatic processing of OpenPGP public key atttachments, avoid quadratic complexity. r=mkmelin
[Triage Comment]
Approved for esr102
Comment 15•2 years ago
|
||
bugherder uplift |
Thunderbird 102.1.1:
https://hg.mozilla.org/releases/comm-esr102/rev/b9e298caf597
Thunderbird 102.1.1:
https://hg.mozilla.org/releases/comm-esr102/rev/f88668012316
Description
•