Closed
Bug 1259572
Opened 10 years ago
Closed 8 years ago
Lots of crashes that look like they might be exploitable under nsSubDocumentFrame::DestroyFrom calling GetDocumentFromView
Categories
(Core :: Layout: Images, Video, and HTML Frames, defect)
Core
Layout: Images, Video, and HTML Frames
Tracking
()
People
(Reporter: bzbarsky, Assigned: tnikkel)
References
Details
(4 keywords)
Crash Data
Attachments
(1 file)
|
13.18 KB,
patch
|
Details | Diff | Splinter Review |
jesup asked me to file this, based on this crash-stats bit: https://crash-stats.mozilla.com/signature/?product=Firefox&address=~e5e5&signature=GetDocumentFromView&_columns=date&_columns=product&_columns=version&_columns=build_id&_columns=platform&_columns=reason&_columns=address&page=1#reports
Looks like we end up crashing on this bit:
nsIFrame* f = aView->GetFrame();
Is it possible that in DestroyFrom mInnerView->GetFirstChild() was a garbage pointer?
Flags: needinfo?
| Reporter | ||
Updated•10 years ago
|
Flags: needinfo?(tnikkel)
Flags: needinfo?(cpearce)
Flags: needinfo?
Comment 1•10 years ago
|
||
possibly sec-critical if we find a reliable reproducer, starting with sec-high for now.
Group: core-security → layout-core-security
Keywords: csectype-uaf,
sec-high
| Assignee | ||
Comment 2•10 years ago
|
||
Patch in bug 1260531 might help with this.
Comment 3•10 years ago
|
||
tnikkel is better placed to help with this than I.
Flags: needinfo?(cpearce)
| Assignee | ||
Comment 4•10 years ago
|
||
This seems likely related to bug 1261175. Either way, the work that happens for that bug is likely to help here, so I'll post updates to that bug.
Comment 6•10 years ago
|
||
I see one crash on 50 in the last 7 days:
https://crash-stats.mozilla.com/report/index/7c19fcd8-778b-4fec-99f2-0e42f2160708
...but none on 49. There are still a good number on 48.
Updated•9 years ago
|
status-firefox49:
--- → wontfix
status-firefox50:
--- → affected
status-firefox52:
--- → affected
status-firefox-esr45:
--- → affected
Updated•9 years ago
|
status-firefox51:
--- → affected
status-firefox53:
--- → affected
Comment 7•9 years ago
|
||
There are still a good number of similar looking crashes in 50, and a handful in 51. I don't know if there's some release only issue, or if we fixed it somewhere.
Updated•9 years ago
|
Crash Signature: [@ GetDocumentFromView ]
Comment 8•9 years ago
|
||
Timothy, it seems you had an idea as to what bugs might or might not fix this. Care to take a look again? :)
Assignee: nobody → tnikkel
Updated•9 years ago
|
Updated•9 years ago
|
status-firefox-esr52:
--- → affected
Comment 10•9 years ago
|
||
Current crashrate across all versions is ~50/day, so not rare
Comment 11•9 years ago
|
||
Mass wontfix for bugs affecting firefox 52.
Updated•9 years ago
|
Flags: needinfo?(tnikkel)
Comment 12•9 years ago
|
||
tnikkel - obviously the bug you referenced didn't fix this... can you have another look? thanks
Flags: needinfo?(tnikkel)
| Assignee | ||
Comment 13•9 years ago
|
||
Yes, I wrote a prototype patch for what I wanted to do recently. Turning it into something landable requires thinking through a lot of complex interactions which I haven't had time to do.
Comment 14•9 years ago
|
||
Given this is somewhere between sec-high, and sec-critical, let's put this on the radar to get fixed soon (preferably 55 and uplift to 54?). I'll fix-optional it for 53. Crash-stats shows that this goes back to around Fx 24 or earlier.
Updated•9 years ago
|
Keywords: crash,
testcase-wanted
Comment 15•9 years ago
|
||
Timothy, did you have a chance to work on this bug?
| Assignee | ||
Comment 16•9 years ago
|
||
I haven't had a chance to touch the prototype patch at all. Besides cleaning up this patch here is what needs to be done:
Besides in this patch, there are three other places in the code that touch root views that might conflict with this patch. nsDocShell::RestoreFromHistory plucks a view from its current location and places a different view in its place. nsDocumentViewer::MakeWindow creates a new root view and inserts it. nsDocumentViewer::Destory plucks a root view from the hierarchy and stashes it in the bf cache.
We need to check the following scenarios:
1) subdocumentframe stores one detached view
2) subdocumentframe stores one detached view, that view gets destroyed
3) subdocumentframe stores two or more detached views
4) subdocumentframe stores two or more detached views, they all get destroyed
5) subdocumentframe stores two or more detached views, the first one gets destroyed
6) subdocumentframe stores two or more detached views, the second one gets destroyed
and then each one of the above six followed by one (or more) of the three places from the previous paragraph, and then nsSubDocumentFrame::Init or nsHideViewer::Run runs.
It's not easy because I don't know how to trigger these conditions, but I think it is precisely these conditions happening which are the cause of this bug. If we don't get the interactions right then at best we don't fix the bug, at worst we make it worse.
Comment 17•8 years ago
|
||
(In reply to Timothy Nikkel (:tnikkel) from comment #16)
> It's not easy because I don't know how to trigger these conditions, but I
> think it is precisely these conditions happening which are the cause of this
> bug. If we don't get the interactions right then at best we don't fix the
> bug, at worst we make it worse.
Timothy, would someone else who works on that code be a helpful guide here?
If not, do you think we should wade through crash report URLs and try to find something reproducible?
Comment 18•8 years ago
|
||
Crashes in the signature and the query in comment 0 are only affecting old versions. Seems to have been fixed for all currently supported versions of firefox (ESR-52 and later)
Group: layout-core-security
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
| Assignee | ||
Updated•8 years ago
|
Flags: needinfo?(tnikkel)
Updated•8 years ago
|
Product: Core → Core Graveyard
Updated•8 years ago
|
Component: Layout: HTML Frames → Layout: Images
Product: Core Graveyard → Core
You need to log in
before you can comment on or make changes to this bug.
Description
•