New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 752774 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Aug 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug



Sign in to add a comment

Null-dereference READ in net::HttpCache::Transaction::DoCacheReadDataComplete

Project Member Reported by ClusterFuzz, Aug 5 2017

Issue description

Detailed report: https://clusterfuzz.com/testcase?key=4691180070895616

Fuzzer: inferno_twister_c
Job Type: mac_asan_chrome
Platform Id: mac

Crash Type: Null-dereference READ
Crash Address: 0x000000000008
Crash State:
  net::HttpCache::Transaction::DoCacheReadDataComplete
  net::HttpCache::Transaction::DoLoop
  net::HttpCache::Transaction::Read
  
Sanitizer: address (ASAN)

Reproducer Testcase: https://clusterfuzz.com/download?testcase_id=4691180070895616


Additional requirements: Requires HTTP

Issue filed automatically.

See https://github.com/google/clusterfuzz-tools for more information.
 
Cc: msrchandra@chromium.org
Labels: M-62 Test-Predator-Wrong
Owner: shivanisha@chromium.org
Status: Assigned (was: Untriaged)
Predator and CL did not provide any possible suspects.
Using Code Search for the file, "http_cache_transaction.cc" assigning to the concern owner.

Suspecting Commit#
https://chromium.googlesource.com/chromium/src/+/c6582e1924c76f68e2b8873712cdf26a0b0c1edb

@shivanisha -- Could you please look into the issue, kindly re-assign if this is not related to your changes.
Thank You.
Tried loading data-bundles/ltests/web-platform-tests-master/service-workers/service-worker/fuzz-http-69.html on Linux build with the clusterfuzz flags but no crash.
Will try on Mac and see if I can reproduce this.
I was not able to reproduce the issue and nothing jumped out of code read either. 

The suspecting commit https://chromium.googlesource.com/chromium/src/+/c6582e1924c76f68e2b8873712cdf26a0b0c1edb does not make any changes to the functionality. It only adds a new class HttpCache::Writers which is not invoked anywhere.

488980 (https://chromium-review.googlesource.com/575867) is the latest change made in a series of CLs that impact the functionality in HttpCache layer. Is there a way to see if clusterfuzz test fails on this version or not?

The crash occurs at entry->readers.erase which implies that the transaction was not actually a member of entry->readers. This looks like an edge case though difficult to figure out the root cause without reproducing the issue.
Cc: infe...@chromium.org
inferno@, Please see comment#3, do you have any suggestions as to how to reproduce this since the cluster fuzz tool does not work on mac and this is a mac test case.
Is there a way to do either of the following at the clusterfuzz server:
- Run this as a linux test case and then possibly be able to reproduce it locally using the clusterfuzz tool.
- Run it with an earlier version 488980 (https://chromium-review.googlesource.com/575867) to check the regression range


Cc: tanin@chromium.org
Project Member

Comment 6 by ClusterFuzz, Aug 8 2017

ClusterFuzz is analyzing your testcase. Developers can follow the progress at https://clusterfuzz.com/testcase?key=5880672270155776.
Project Member

Comment 7 by ClusterFuzz, Aug 9 2017

ClusterFuzz is analyzing your testcase. Developers can follow the progress at https://clusterfuzz.com/testcase?key=5225228719620096.
Labels: M-61
tanin@, tried the following steps as discussed to locally reproduce the issue on MAC but there was no crash and the page seems to be working correctly.

1. Download the build as well. When you extract it, you will find Chromium.app/Contents/MacOS/Chromium
2. Download the testcase from https://clusterfuzz.com/v2/testcase-detail/4691180070895616 and extract it somewhere.
3. Start an HTTP server on the extracted folder. I used python -m SimpleHTTPServer 8000
4. Run chrome with appropriate flags, which is seen in the stacktrace. Here's the full command:

Chromium.app/Contents/MacOS/Chromium --user-data-dir=/b/tmp/user_profile_0 --log-net-log=/b/tmp/net_log_0 --disable-in-process-stack-traces --ignore-gpu-blacklist --allow-file-access-from-files --disable-gesture-requirement-for-media-playback --disable-click-to-play --disable-hang-monitor --dns-prefetch-disable --disable-default-apps --disable-component-update --safebrowsing-disable-auto-update --metrics-recording-only --disable-gpu-watchdog --disable-metrics --disable-popup-blocking --disable-prompt-on-repost --enable-experimental-extension-apis --enable-extension-apps --js-flags="--expose-gc --verify-heap" --new-window --no-default-browser-check --no-first-run --no-process-singleton-dialog --enable-shadow-dom --enable-media-stream --use-fake-device-for-media-stream --use-fake-ui-for-media-stream --disable-breakpad --use-gl=any --ppapi-flash-path=Chromium.app/Contents/MacOS/flash/PepperFlashPlayer.plugin http://127.0.0.1:8000/data-bundles/ltests/web-platform-tests-master/service-workers/service-worker/fuzz-http-69.html
Trying a speculative fix in https://chromium-review.googlesource.com/c/611022
Project Member

Comment 11 by bugdroid1@chromium.org, Aug 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e5adc0ab20701a715379ff987bc8e5000906b093

commit e5adc0ab20701a715379ff987bc8e5000906b093
Author: Shivani Sharma <shivanisha@chromium.org>
Date: Fri Aug 11 03:51:19 2017

Cannot assume that cache reading transaction is a reader in DoneReadingFromEntry.

Ideally this should be true but in some edge case, its not happening. Invoking
either DoneWritingToEntry or DoneWithEntry (which will default to DoneReadingFromEntry
in most cases except the case in which the crash is happening).
Note that the clusterfuzz issue cannot be reproduced locally since its a Mac test case
or when running the same case on Linux as linked in the bug.
The same stack trace was also reported in M61 Beta in the field.

This is a speculative fix.

Bug:  752774 
Change-Id: I04064e7b9712a87ceb7036c41122b7466f952fc4
Reviewed-on: https://chromium-review.googlesource.com/611022
Reviewed-by: Randy Smith <rdsmith@chromium.org>
Commit-Queue: Shivani Sharma <shivanisha@chromium.org>
Cr-Commit-Position: refs/heads/master@{#493659}
[modify] https://crrev.com/e5adc0ab20701a715379ff987bc8e5000906b093/net/http/http_cache_transaction.cc

Status: Fixed (was: Assigned)
Since the issue is not reproducing locally, speculatively marking this as fixed as per comment #11. Feel free to change the status if the issue still persists.
Status: Assigned (was: Fixed)
Since this is reproducible on ClusterFuzz, ClusterFuzz will auto-close in a day if this is fix worked.
Cc: gov...@chromium.org
shivanisha@ if the fix looks good can you please request for M61(branch 3163) beta merge please, since this is top#4 browser crash on latest Chrome Beta given so far all the crashes are from single client.


Project Member

Comment 15 by ClusterFuzz, Aug 12 2017

ClusterFuzz has detected this issue as fixed in range 493628:493749.

Detailed report: https://clusterfuzz.com/testcase?key=4691180070895616

Fuzzer: inferno_twister_c
Job Type: mac_asan_chrome
Platform Id: mac

Crash Type: Null-dereference READ
Crash Address: 0x000000000008
Crash State:
  net::HttpCache::Transaction::DoCacheReadDataComplete
  net::HttpCache::Transaction::DoLoop
  net::HttpCache::Transaction::Read
  
Sanitizer: address (ASAN)

Fixed: https://clusterfuzz.com/revisions?job=mac_asan_chrome&range=493628:493749

Reproducer Testcase: https://clusterfuzz.com/download?testcase_id=4691180070895616

Additional requirements: Requires HTTP

See https://github.com/google/clusterfuzz-tools for more information.

If you suspect that the result above is incorrect, try re-doing that job on the test case report page.
Project Member

Comment 16 by ClusterFuzz, Aug 12 2017

Labels: ClusterFuzz-Verified
Status: Verified (was: Assigned)
ClusterFuzz testcase 4691180070895616 is verified as fixed, so closing issue as verified.

If this is incorrect, please add ClusterFuzz-Wrong label and re-open the issue.

Sign in to add a comment