Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(745)

Issue 2307463003: Avoid use-after-free if frame is deleted when stopping loading. (Closed)

Created:
4 years, 3 months ago by Charlie Reis
Modified:
4 years, 3 months ago
Reviewers:
dcheng
CC:
chromium-reviews, jam, nasko+codewatch_chromium.org, darin-cc_chromium.org, creis+watch_chromium.org, mlamouri+watch-content_chromium.org, nasko, site-isolation-reviews_chromium.org, esprehn
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Avoid use-after-free if frame is deleted when stopping loading. WebFrame::stopLoading can run onload event handlers, which have the ability to delete the frame. This means we must be careful when calling it from within RenderFrameImpl, or else the remainder of the function may try to access a deleted object. BUG=638166, 639689 TEST=See bug 638166 comment 11 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/ba53b47ffb07652d639e68db92743dc9aea21e5c Cr-Commit-Position: refs/heads/master@{#416082}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+96 lines, -5 lines) Patch
M content/browser/frame_host/navigation_controller_impl_browsertest.cc View 3 chunks +61 lines, -2 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 2 chunks +21 lines, -3 lines 0 comments Download
A content/test/data/navigation_controller/remove_blank_iframe_on_load.html View 1 chunk +14 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (9 generated)
Charlie Reis
Daniel, can you review this since Nasko is out? It follows the pattern Nasko used ...
4 years, 3 months ago (2016-09-01 21:14:16 UTC) #5
dcheng
Hmm... One thought, though I'm not sure if this is better... what if WebFrame just ...
4 years, 3 months ago (2016-09-01 21:20:15 UTC) #6
Charlie Reis
On 2016/09/01 21:20:15, dcheng wrote: > Hmm... > > One thought, though I'm not sure ...
4 years, 3 months ago (2016-09-01 21:38:02 UTC) #7
dcheng
This fix LGTM in the short-term.
4 years, 3 months ago (2016-09-01 21:45:51 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2307463003/1
4 years, 3 months ago (2016-09-01 22:03:20 UTC) #11
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 3 months ago (2016-09-01 22:19:47 UTC) #12
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/ba53b47ffb07652d639e68db92743dc9aea21e5c Cr-Commit-Position: refs/heads/master@{#416082}
4 years, 3 months ago (2016-09-01 22:22:49 UTC) #14
LaurentBarbareau
Hi, I suspect this modification to be responsible of new problems we're facing with the ...
4 years, 3 months ago (2016-09-20 09:49:13 UTC) #17
dcheng
On 2016/09/20 09:49:13, LaurentBarbareau wrote: > Hi, > > I suspect this modification to be ...
4 years, 3 months ago (2016-09-20 09:59:14 UTC) #18
LaurentBarbareau
> It's unlikely to be this fix: this simply prevents Chrome from crashing if a ...
4 years, 3 months ago (2016-09-20 16:49:01 UTC) #19
Charlie Reis
On 2016/09/20 16:49:01, LaurentBarbareau wrote: > > It's unlikely to be this fix: this simply ...
4 years, 3 months ago (2016-09-20 18:15:30 UTC) #20
LaurentBarbareau
On 2016/09/20 18:15:30, Charlie Reis (slow) wrote: > Yes, please file a bug at https://new.crbug.com/ ...
4 years, 3 months ago (2016-09-21 08:17:35 UTC) #21
Charlie Reis
4 years, 3 months ago (2016-09-21 16:59:52 UTC) #22
Message was sent while issue was closed.
On 2016/09/21 08:17:35, LaurentBarbareau wrote:
> On 2016/09/20 18:15:30, Charlie Reis (slow) wrote:
> > Yes, please file a bug at https://new.crbug.com/ (with a link or repro steps
> if
> > possible) and reply here with the bug number, and we'll take a look.  We are
> > interested in tracking down the issue you're seeing, but so far it doesn't
> sound
> > likely that this is the responsible CL.  Thanks!
> 
> The bug we're facing is confirmed by other ones. Cf.
>
https://bugs.chromium.org/p/chromium/issues/detail?id=645119&can=2&start=0&nu...
> 
> Thx

Great-- looks like the fix has landed in https://crbug.com/647151 and is being
evaluated for a merge.

Powered by Google App Engine
This is Rietveld 408576698