Closed
Bug 1025078
Opened 12 years ago
Closed 12 years ago
AddressSanitizer: Crash at nsPerformance::GetDOMTiming()
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
VERIFIED
FIXED
mozilla33
People
(Reporter: smichaud, Assigned: smaug)
References
(Blocks 1 open bug)
Details
(Keywords: crash)
Crash Data
Attachments
(4 files)
|
13.97 KB,
text/plain
|
Details | |
|
776 bytes,
patch
|
baku
:
review+
|
Details | Diff | Splinter Review |
|
741 bytes,
patch
|
baku
:
review+
|
Details | Diff | Splinter Review |
|
746 bytes,
patch
|
Sylvestre
:
approval-mozilla-aurora+
Sylvestre
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
I just saw this crash, testing with my new Mac ASan build on OS X 10.8.5.
http://people.mozilla.org/~stmichaud/bmo/firefox-asan.dmg
http://people.mozilla.org/~stmichaud/bmo/firefox-asan-howto.txt
I can't find any of these in bmo or Socorro, and they happen in code that hasn't been changed recently. But given the high quality of ASan crash stacks, I figure it's worth opening a bug.
Note that the main process appears to have been interacting with a plugin when the crash happened -- my stack (when I attach it) will show the plugin-container process aborting after the main process has died.
Though you can't tell (directly) from the stack, the plugin is probably Flash. My Mac ASan builds, though universal, only use ASan in the 64-bit component. And I can't think of any other 64-bit plugins.
| Reporter | ||
Comment 1•12 years ago
|
||
The crashes happen here:
https://hg.mozilla.org/mozilla-central/annotate/48eee276b1ee/dom/base/nsPerformance.h#l272
As best I can tell, the value of mDOMTiming is invalid -- not NULL. If so, then it must have been initialized with an invalid value, here:
https://hg.mozilla.org/mozilla-central/annotate/48eee276b1ee/dom/base/nsPerformance.cpp#l370
| Assignee | ||
Updated•12 years ago
|
Group: core-security
| Assignee | ||
Comment 2•12 years ago
|
||
Er, not a security bug I think. Just a null pointer crash (null + offset)
Group: core-security
| Reporter | ||
Comment 3•12 years ago
|
||
I actually don't think it's a null pointer dereference -- see comment #1.
But I agree that it's not security sensitive -- I don't think it can possibly be a use-after-free.
| Assignee | ||
Comment 4•12 years ago
|
||
Based on the log it is null + offset crash (which is effectively a null pointer crash).
| Assignee | ||
Updated•12 years ago
|
Assignee: nobody → bugs
| Reporter | ||
Comment 5•12 years ago
|
||
So a call to nsRefPtr<blah>::get() on a NULL (or unitialized) nsRefPtr object crashes, like here?
I'd have thought it'd return NULL (and not crash).
| Assignee | ||
Comment 6•12 years ago
|
||
This should do it. As far as I see we end up doing null_nsPerformance->mDOMTiming access. So, null+offset
Attachment #8439998 -
Flags: review?(amarchesini)
| Reporter | ||
Comment 7•12 years ago
|
||
> As far as I see we end up doing null_nsPerformance->mDOMTiming access. So, null+offset
OK, now I get it.
Comment 8•12 years ago
|
||
Comment on attachment 8439998 [details] [diff] [review]
patch
Review of attachment 8439998 [details] [diff] [review]:
-----------------------------------------------------------------
Is it correct that the window returns a null Performance object without an error?
I think the issue is here:
https://mxr.mozilla.org/mozilla-central/source/dom/base/nsGlobalWindow.cpp#3643
3643 if (mPerformance || !mDoc) {
3644 return;
3645 }
Smaug, what do you think about this?
Attachment #8439998 -
Flags: review?(amarchesini) → review+
| Assignee | ||
Comment 9•12 years ago
|
||
I guess we could make GetPerformance throw in case of null.
| Assignee | ||
Comment 10•12 years ago
|
||
Attachment #8440014 -
Flags: review?(amarchesini)
| Reporter | ||
Comment 11•12 years ago
|
||
For what it's worth, I just got another one of these. They must be more common than I thought.
Comment 12•12 years ago
|
||
Comment on attachment 8440014 [details] [diff] [review]
v2
Review of attachment 8440014 [details] [diff] [review]:
-----------------------------------------------------------------
lgtm
Attachment #8440014 -
Flags: review?(amarchesini) → review+
Comment 13•12 years ago
|
||
Mark it not nullable in the IDL too, if it's no longer nullable?
| Assignee | ||
Comment 14•12 years ago
|
||
bz prefers .Throw
https://hg.mozilla.org/integration/mozilla-inbound/rev/3c7598b60128
| Assignee | ||
Comment 15•12 years ago
|
||
Too late :/.
I wonder why the attribute got [Throws] and ?, yet the spec doesn't have either one.
Comment 16•12 years ago
|
||
Because the spec has no concept of "window without a document".
| Assignee | ||
Comment 17•12 years ago
|
||
That doesn't explain both [Throws] and ?.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
Comment 19•12 years ago
|
||
The [Throws] was due to the fallible forward-to-inner-window...
Comment 20•12 years ago
|
||
#22 crash on v30. Not very high on 31 beta, but perhaps that might change when it reaches the release population. Should we uplift?
Crash Signature: [@ nsPerformance::Now()]
Keywords: crash
Comment 21•12 years ago
|
||
I think if we uplift depends on the risk of the patch. Saving .5% of our crashes on release is a small step, but one in the right direction. And this happens across all OSes and versions to some degree, see https://crash-stats.mozilla.com/report/list?signature=nsPerformance%3A%3ANow%28%29
Smaug, do you think the risk/reward of this patch warrants an uplift?
Flags: needinfo?(bugs)
| Assignee | ||
Comment 23•12 years ago
|
||
Comment on attachment 8440071 [details] [diff] [review]
v3
[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 965860
User impact if declined: crashes
Testing completed (on m-c, etc.): landed to m-c two weeks ago
Risk to taking this patch (and alternatives if risky): shouldn't be risky
String or IDL/UUID changes made by this patch: NA
Attachment #8440071 -
Flags: approval-mozilla-beta?
Attachment #8440071 -
Flags: approval-mozilla-aurora?
Updated•12 years ago
|
Updated•12 years ago
|
Attachment #8440071 -
Flags: approval-mozilla-beta?
Attachment #8440071 -
Flags: approval-mozilla-beta+
Attachment #8440071 -
Flags: approval-mozilla-aurora?
Attachment #8440071 -
Flags: approval-mozilla-aurora+
Comment 24•12 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/fba1326dd727
https://hg.mozilla.org/releases/mozilla-beta/rev/be6b13f262cc
status-b2g-v2.0:
--- → fixed
status-b2g-v2.1:
--- → fixed
Comment 25•12 years ago
|
||
Steven, is there a way I can reproduce this crash in order to verify that the issue is fixed?
Flags: needinfo?(smichaud)
| Reporter | ||
Comment 26•12 years ago
|
||
> Steven, is there a way I can reproduce this crash in order to verify that the issue is fixed?
No, these weren't easily reproducible.
Flags: needinfo?(smichaud)
Comment 27•12 years ago
|
||
Looking through Socorro (https://crash-stats.mozilla.com/report/list?range_unit=days&range_value=28&signature=nsPerformance%3A%3ANow%28%29#tab-reports) I don't see any more crashes reported for:
- Firefox 31 Beta builds after build 20140623175014 (the fix entered Beta on June 26)
- Firefox 32 Aurora builds after build 20140625004001 (the fix entered Aurora on June 26)
- Firefox 33 Nightly builds after build 20140612030349 (the fix entered Nightly on June 13)
Status: RESOLVED → VERIFIED
Keywords: verifyme
Updated•6 years ago
|
Blocks: asan-maintenance
You need to log in
before you can comment on or make changes to this bug.
Description
•