use-after-free in [@ nsIPresShell::GetRootScrollFrame]
Categories
(Core :: Layout, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr60 | --- | unaffected |
firefox64 | --- | unaffected |
firefox65 | + | fixed |
firefox66 | + | fixed |
People
(Reporter: tsmith, Assigned: tnikkel)
References
(Blocks 1 open bug)
Details
(5 keywords, Whiteboard: [post-critsmash-triage])
Attachments
(4 files, 1 obsolete file)
439 bytes,
text/html
|
Details | |
14.19 KB,
application/x-javascript
|
Details | |
8.32 KB,
patch
|
kats
:
review+
abillings
:
sec-approval+
|
Details | Diff | Splinter Review |
7.87 KB,
patch
|
RyanVM
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
Comment 1•6 years ago
|
||
Reporter | ||
Comment 2•6 years ago
|
||
Comment 3•6 years ago
|
||
Comment 4•6 years ago
|
||
Updated•6 years ago
|
Updated•6 years ago
|
Comment 5•6 years ago
|
||
Reporter | ||
Comment 6•6 years ago
|
||
Comment 7•6 years ago
|
||
Comment 8•6 years ago
|
||
Comment 9•6 years ago
|
||
Reporter | ||
Comment 10•6 years ago
|
||
Assignee | ||
Comment 11•6 years ago
|
||
Reporter | ||
Updated•6 years ago
|
Assignee | ||
Comment 12•6 years ago
|
||
Thanks to Tyson for running some try builds I was able to figure this out. The ResizeReflowIgnoreOverride call in MobileViewportManager::RefreshViewportSize kills the presshell and MobileViewportManager, so the call into the presshell in ShrinkToDisplaySizeIfNeeded is using deleted memory for mPresShell pointer.
(In reply to Timothy Nikkel (:tnikkel) from comment #11)
The AccessibleCaret code observes Reflow done notifications, and the first
thing is does is FlushLayout before updating the caret. Which is silly.
Looks like that is covered by bug 1445794, but reflow could still potentially kill us via reflow callbacks that ask for a flush.
Assignee | ||
Comment 13•6 years ago
|
||
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Updated•6 years ago
|
Comment 15•6 years ago
•
|
||
Comment on attachment 9034806 [details] [diff] [review]
patch
Review of attachment 9034806 [details] [diff] [review]:
LGTM, thanks!
::: layout/base/MobileViewportManager.cpp
@@ +523,5 @@
> // Update internal state.
> mMobileViewportSize = viewport;
>
> + // ResizeReflowIgnoreOverride can kill us.
> + RefPtr<MobileViewportManager> strongThis(this);
you don't like the kungFuDeathGrip? :p
Assignee | ||
Comment 16•6 years ago
|
||
Comment on attachment 9034806 [details] [diff] [review]
patch
[Security Approval Request]
How easily could an exploit be constructed based on the patch?: I'll strip the commit msg and comment from the patch but not much we can do to hide this, the fix makes it obvious which object dies and what call causes that, they'd need a fuzzer or some smarts/work to trigger it though
Do comments in the patch, the check-in comment, or tests included in the patch paint a bulls-eye on the security problem?: Yes
Which older supported branches are affected by this flaw?: probably all of them
If not all supported branches, which bug introduced the flaw?: None
Do you have backports for the affected branches?: No
If not, how different, hard to create, and risky will they be?: should be pretty trivial
How likely is this patch to cause regressions; how much testing does it need?: very unlikely
Comment 17•6 years ago
|
||
(In reply to Timothy Nikkel (:tnikkel) from comment #12)
The ResizeReflowIgnoreOverride call in MobileViewportManager::RefreshViewportSize kills the presshell and MobileViewportManager, so the call into the presshell in ShrinkToDisplaySizeIfNeeded is using deleted memory for mPresShell pointer.
Oh whoops. My bad for not catching that during review.
(In reply to Timothy Nikkel (:tnikkel) from comment #16)
Which older supported branches are affected by this flaw?: probably all of them
If not all supported branches, which bug introduced the flaw?: None
The problematic call to ShrinkToDisplaySizeIfNeeded() was introduced in bug 1423709, which landed in 65, so branches older than 65 should not be affected.
Updated•6 years ago
|
Comment 18•6 years ago
|
||
sec-approval+ for trunk. Let's get a beta nomination on a patch so we can avoid shipping the issue.
Updated•6 years ago
|
Assignee | ||
Comment 19•6 years ago
|
||
[Beta/Release Uplift Approval Request]
Feature/Bug causing the regression: Bug 1423709
User impact if declined: sec uaf
Is this code covered by automated tests?: No
Has the fix been verified in Nightly?: No
Needs manual test from QE?: No
If yes, steps to reproduce:
List of other uplifts needed: None
Risk to taking this patch: Low
Why is the change risky/not risky? (and alternatives if risky): just holds a strong ref to this to keep it alive
String changes made/needed: none
Assignee | ||
Comment 20•6 years ago
|
||
Assignee | ||
Comment 21•6 years ago
|
||
Assignee | ||
Comment 22•6 years ago
|
||
Assignee | ||
Comment 23•6 years ago
|
||
Comment on attachment 9035131 [details] [diff] [review]
beta patch
[Beta/Release Uplift Approval Request]
Feature/Bug causing the regression: Bug 1423709
User impact if declined: sec uaf
Is this code covered by automated tests?: No
Has the fix been verified in Nightly?: No
Needs manual test from QE?: No
If yes, steps to reproduce:
List of other uplifts needed: None
Risk to taking this patch: Low
Why is the change risky/not risky? (and alternatives if risky): just holds a strong ref to this to keep it alive
String changes made/needed: none
Comment 24•6 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/1913de91fd89
https://hg.mozilla.org/mozilla-central/rev/8d9995ade756
Comment 25•6 years ago
|
||
Comment on attachment 9035131 [details] [diff] [review]
beta patch
[Triage Comment]
Fixes a sec-crit UAF. Approved for 65.0b10.
Comment 26•6 years ago
|
||
uplift |
Updated•6 years ago
|
Updated•6 years ago
|
Description
•