Attachments Security Review Action Items
Categories
(MailNews Core :: Attachments, defect)
Tracking
(Not tracked)
People
(Reporter: hjtoi-bugzilla, Unassigned)
References
Details
(Keywords: meta, sec-audit, Whiteboard: [sg:audit])
| Reporter | ||
Updated•23 years ago
|
Updated•21 years ago
|
| Assignee | ||
Updated•18 years ago
|
Updated•18 years ago
|
Comment 1•14 years ago
|
||
Comment 2•14 years ago
|
||
Updated•14 years ago
|
Updated•4 years ago
|
Comment 3•3 years ago
|
||
This hasn't been touched in 20 years. And with the exception mime, the product is now signficantly different.
Kaie, is there anything of value here to keep this open?
Comment 4•3 years ago
|
||
This bug lists ideas for triggering unexpected behavior in Thunderbird, possibly causing crashes.
Only some of the prevented ideas were related to JS, so one could argue comment 2 wasn't a sufficient argument to make this list public.
It would still make sense to investigate the remaining listed scenarios for hardening purposes.
Given this bug has been open for so long, it's possible this has inspired some bad actors to hunt for security issues in Thunderbird.
Comment 5•3 years ago
|
||
(In reply to Heikki Toivonen (remove -bugzilla when emailing directly) from comment #0)
Old C code, new uses (like smileys), need to check for buffer overflows
Smilies are replaced by their corresponding emoji now.
Code is here: https://searchfox.org/mozilla-central/rev/3067ba33c2202459aae52b7a0f7218a71fe5f7c3/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp#664
Attachments can "overflow" into message content and spoof the actual message.
This is known but covered in other bugs.
Can you put scripts in vCard? If so, make sure that it does not run with
content
privileges, and that it honors the "disable JS for mail" pref.
JS in mail is completely disabled since a long time ago. The vCard is in the same context so can't run scripts. And it's all in content, not chrome.
Stress test with long content types to make sure that they don't cause buffer
overflows or write over other message headers
Header parsing is in JavaScript now, so can't buffer overflow.
Also, libmime went through fuzzing recently.
Print can print stuff you did not see (we re-fetch message before print,
scripts
can change content, scripts won't run in print, stylesheet can be different
for
print media). If we detect print media or scripts are on and there are
scripts,
we should warn the user and recommend they preview before actually printing.
We always preview before printing now.
What if an attachment name contained path separators, would a user write the
file in a place they did not expect? We should replace path separators with
underscore. It would be better to list characters that are allowed.
Forbidden chars are replaced.
Can JS resize, close etc. mailnews windows?
JS is disabled in mail, and it's in content, so no.
Will we render and run XUL attachments as inline?
The "active" parts of XUL, XBL was removed years ago. Nothing to run.
We do not display all From: headers (possibly others) in the message list
view (we only display the first).
Right, we do, and we must do so per spec.
Make sure that we never put content derived from messages or mailserver into
chrome in a way that causes the content to be parsed (and then run).
document.write and innerHTML are two such methods, there may be others. (This
prevents situations like: From: <script>doBadStuff()</script>)
We do take care. Any exploitable case would have to be filed separately with detail.
Make sure you never put a URL from content into a clickable link in the
chrome,
because link might be of the form javascript:doBadStuff() etc.
Same as above, we do take care.
How do we deal with <title><script>doBadStuff()</script></title>?
Scripts are not active in mail.
For non-mail contexts, it's js in content.
Do not trust message content or headers
Do not trust the mailserver
I don't see any action point for these.
Comment 6•3 years ago
|
||
Magnus, thanks a lot for your very helpful analysis, it's great you know the current state of the mentioned code areas.
Your explanations sound reasonable.
Resolving as worksforme.
Description
•