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

Issue 11428052: [android_webview] Fix use after free in intercepted requests. (Closed)

Created:
8 years ago by mkosiba (inactive)
Modified:
8 years ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, android-webview-reviews_chromium.org
Visibility:
Public.

Description

[android_webview] Fix use after free in intercepted requests. This fixes the use after free problem that can occur if the Seek or Read request on the worker thread runs after the job has been deleted. TEST=AndroidWebViewTests,android_webview_unittests BUG=None R=mnaganov@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=170505

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Total comments: 15

Patch Set 3 : #

Patch Set 4 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+129 lines, -77 lines) Patch
M android_webview/browser/input_stream.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M android_webview/browser/net/android_stream_reader_url_request_job.h View 1 2 4 chunks +6 lines, -5 lines 0 comments Download
M android_webview/browser/net/android_stream_reader_url_request_job.cc View 1 2 8 chunks +82 lines, -27 lines 0 comments Download
M android_webview/browser/net/android_stream_reader_url_request_job_unittest.cc View 1 2 16 chunks +25 lines, -27 lines 0 comments Download
M android_webview/browser/net/input_stream_reader.h View 2 chunks +2 lines, -7 lines 0 comments Download
M android_webview/browser/net/input_stream_reader_unittest.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M android_webview/native/android_protocol_handler.cc View 1 2 4 chunks +5 lines, -5 lines 0 comments Download
M android_webview/native/intercepted_request_data_impl.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
mkosiba (inactive)
8 years ago (2012-11-29 10:05:22 UTC) #1
mnaganov (inactive)
I assume it's OK for the InputStream implementation to have an instance deleted on a ...
8 years ago (2012-11-29 10:46:55 UTC) #2
mkosiba (inactive)
The InputStream should be safe to delete on a different thread (it's using a GlobalJavaRef ...
8 years ago (2012-11-29 15:39:22 UTC) #3
mnaganov (inactive)
LGTM with a comment https://codereview.chromium.org/11428052/diff/5002/android_webview/browser/net/android_stream_reader_url_request_job.cc File android_webview/browser/net/android_stream_reader_url_request_job.cc (right): https://codereview.chromium.org/11428052/diff/5002/android_webview/browser/net/android_stream_reader_url_request_job.cc#newcode64 android_webview/browser/net/android_stream_reader_url_request_job.cc:64: scoped_ptr<android_webview::InputStreamReader> input_stream_reader_; nit: please add ...
8 years ago (2012-11-29 17:05:22 UTC) #4
joth
lgtm with couple questions & nits/ https://codereview.chromium.org/11428052/diff/5002/android_webview/browser/net/android_stream_reader_url_request_job.cc File android_webview/browser/net/android_stream_reader_url_request_job.cc (right): https://codereview.chromium.org/11428052/diff/5002/android_webview/browser/net/android_stream_reader_url_request_job.cc#newcode34 android_webview/browser/net/android_stream_reader_url_request_job.cc:34: // Thread-safe ref ...
8 years ago (2012-11-29 17:44:09 UTC) #5
mkosiba (inactive)
https://codereview.chromium.org/11428052/diff/5002/android_webview/browser/net/android_stream_reader_url_request_job.cc File android_webview/browser/net/android_stream_reader_url_request_job.cc (right): https://codereview.chromium.org/11428052/diff/5002/android_webview/browser/net/android_stream_reader_url_request_job.cc#newcode34 android_webview/browser/net/android_stream_reader_url_request_job.cc:34: // Thread-safe ref counting is used to ensure that ...
8 years ago (2012-11-29 18:54:11 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mkosiba@chromium.org/11428052/9001
8 years ago (2012-11-30 17:14:54 UTC) #7
commit-bot: I haz the power
8 years ago (2012-11-30 19:20:36 UTC) #8
Message was sent while issue was closed.
Change committed as 170505

Powered by Google App Engine
This is Rietveld 408576698