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

Issue 1725363005: Fix use after free in memory only backend. (Closed)

Created:
4 years, 10 months ago by gavinp
Modified:
4 years, 10 months ago
Reviewers:
mmenke
CC:
chromium-reviews, cbentzel+watch_chromium.org, gavinp+disk_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@shorter2
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix use after free in memory only backend. Writing to a sparse entry could result that entry being evicted while the write was still in progress. This fix considers sparse entries in use if any of their children are in use; this can drive up memory use but avoids tickling the dragon by expanding the hand rolled refcounting implementation in the in memory cache. R=mmenke@chromium.org BUG=589186 Committed: https://crrev.com/b7129635933594a6eb91e82e8139235e6a843a05 Cr-Commit-Position: refs/heads/master@{#377598}

Patch Set 1 #

Patch Set 2 : clean up #

Patch Set 3 : one more test check #

Patch Set 4 : narrow #

Patch Set 5 : coding style #

Total comments: 6

Patch Set 6 : remediate #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -9 lines) Patch
M net/disk_cache/backend_unittest.cc View 1 2 3 4 5 1 chunk +38 lines, -0 lines 1 comment Download
M net/disk_cache/memory/mem_entry_impl.cc View 1 2 3 4 1 chunk +3 lines, -9 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 13 (6 generated)
gavinp
Matt, Another way to fix this is to extend the refcounting in to child entries. ...
4 years, 10 months ago (2016-02-24 20:30:34 UTC) #1
mmenke
This LGTM. This does mean one parent entry with a bunch of sparse entries could ...
4 years, 10 months ago (2016-02-25 07:14:06 UTC) #4
gavinp
Thanks for the quick review. I'll upload the merge version of this fix shortly. https://codereview.chromium.org/1725363005/diff/80001/net/disk_cache/backend_unittest.cc ...
4 years, 10 months ago (2016-02-25 15:55:32 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1725363005/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1725363005/100001
4 years, 10 months ago (2016-02-25 15:57:24 UTC) #8
gavinp
On 2016/02/25 07:14:06, mmenke wrote: > This LGTM. This does mean one parent entry with ...
4 years, 10 months ago (2016-02-25 15:58:18 UTC) #9
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 10 months ago (2016-02-25 17:20:43 UTC) #11
commit-bot: I haz the power
4 years, 10 months ago (2016-02-25 17:21:44 UTC) #13
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/b7129635933594a6eb91e82e8139235e6a843a05
Cr-Commit-Position: refs/heads/master@{#377598}

Powered by Google App Engine
This is Rietveld 408576698