Closed
Bug 51442
Opened 25 years ago
Closed 25 years ago
JS in mail/news running with system principal
Categories
(Core :: Security, defect, P1)
Core
Security
Tracking
()
VERIFIED
FIXED
M18
People
(Reporter: security-bugs, Assigned: mscott)
Details
(Whiteboard: [nsbeta3+])
Attachments
(1 file)
|
1.05 KB,
patch
|
Details | Diff | Splinter Review |
This is really bad. Not only is the "Disable JS in mail/news" pref not working,
scripts in mail are actually running with the all-powerful system principal. This
needs to be fixed immediately.
| Reporter | ||
Comment 1•25 years ago
|
||
Suggest nsbeta3+ as this is serious. I'll try to track it down, but I'll probably
need help from mailnews.
| Assignee | ||
Comment 2•25 years ago
|
||
I'm willing to help. How would JS get the system principal? Here's how we create
that iframe in messenger.xul:
<iframe id="messagepane" context="messagePaneContext" style="height: 0px"
flex="1" name="messagepane" type="content-primary" src="about:blank"/>
When JS runs inside this iframe, how does the security code figure out that this
iframe should get the system principal?
Why is it treated any different than any other ol' iframe?
| Assignee | ||
Comment 3•25 years ago
|
||
Oh I see the trouble maker....oh dear. in nsStreamConverter.cpp around line 596,
libmime gets the system principal and assigns it as the owner on the channel we
are using for displaying the message.
Could this be how it's sneaking in? In any case, that snippet scares me a bit.
cc'ing rhp, the author of that code.
| Assignee | ||
Comment 4•25 years ago
|
||
| Assignee | ||
Comment 5•25 years ago
|
||
Here's my proposed fix. nsStreamConverter was setting the system principal on
the channel being used to load content into the message pane iframe. I just took
this code out.
Rich, do you know why we needed to do that? I'm not seeing any side effects by
taking these lines out.
Comment 6•25 years ago
|
||
My gut feel is that this was a copy and paste issue. When I got the code to
dork around with the channel's, I might have copied this stuff as well. Just a
thought, but the change looks good to me. r: rhp
- rhp
| Assignee | ||
Comment 7•25 years ago
|
||
per triage mtg.
Just for PDT's sake, the consequences of this are that arbitrary JS in email
messages have access to XP-Connect among other things and can do all sorts of
nasty things.
Severity: normal → critical
Priority: P3 → P1
Whiteboard: [nsbeta3+]
| Reporter | ||
Comment 8•25 years ago
|
||
This fix works for me. Scott, can you get this checked in?
| Assignee | ||
Comment 9•25 years ago
|
||
You bet. Thanks for the review Rich!
Assignee: mstoltz → mscott
Status: ASSIGNED → NEW
| Assignee | ||
Comment 10•25 years ago
|
||
Fixed.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 11•25 years ago
|
||
John could you verify this bug - Thanks
Changing QA contact to junruh@netscape.com
Updated•25 years ago
|
QA Contact: czhang → junruh
| Reporter | ||
Comment 13•25 years ago
|
||
Opening fixed security bugs to the public.
Group: netscapeconfidential?
You need to log in
before you can comment on or make changes to this bug.
Description
•