Issue metadata
Sign in to add a comment
|
heap use-after-free on AsyncCompileJob::CompileTask::Cancel
Reported by
cdsrc2...@gmail.com,
Sep 4
|
||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36 Steps to reproduce the problem: 1. download and unzip the release asan chromium :asan-linux-release-583299 2. Run ./chrome crash.html What is the expected behavior? What went wrong? Can get UAF stably as long as the version number is greater than 70.0.3522.0. In https://chromium.googlesource.com/v8/v8.git/+/07aafb76f60326f5750787cf0e48e859d0eaa194/src/wasm/module-compiler.cc:2179 AsyncCompileJob::~AsyncCompileJob() { background_task_manager_.CancelAndWait(); if (native_module_) native_module_->compilation_state()->Abort(); CancelPendingForegroundTask(); <-----was moved here from abort() for (auto d : deferred_handles_) delete d; } In order to fix missing cancellation of background compilation,the function CancelPendingForegroundTask() was moved from abort() to ~AsyncCompileJob(). Maybe it did not consider that job_ was freed in the progress of backing_thread shutdown. And may the fix could be like this? 1.Check the AsyncCompileJob is deleted or not before CancelPendingForegroundTask? or 2.Try to make abort() not be missing and move CancelPendingForegroundTask() to abort() again? Hope my work helps. Did this work before? N/A Chrome version: 70.0.3524.0 Channel: n/a OS Version: Flash Version:
,
Sep 6
,
Sep 18
hablich: Uh oh! This issue still open and hasn't been updated in the last 14 days. This is a serious vulnerability, and we want to ensure that there's progress. Could you please leave an update with the current status and any potential blockers? If you're not the right owner for this issue, could you please remove yourself as soon as possible or help us find the right one? If the issue is fixed or you can't reproduce it, please close the bug. If you've started working on a fix, please set the status to Started. Thanks for your time! To disable nags, add the Disable-Nags label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Sep 18
Sounds like something you might already have fixed recently?
,
Sep 18
Hi Clemens, has this been fixed by https://crrev.com/c/1209344?
,
Sep 18
That CL was merged back to M-70 in https://crrev.com/c/1215622. Will have to investigate whether this is a separate issue.
,
Sep 18
Cannot reproduce, looks like it's missing the "wasm_idb_worker.js" file.
,
Sep 19
Hi clemensh@ Did you try in 70.0.3524.0? Here is the "wasm_idb_worker.js" file.(You can find it in res.zip too)
,
Sep 19
Note that the version you are using (asan-linux-release-583299, 70.0.3524.0) were before the fix mentioned in #6 was merged. So it should be fixed. I tried reproducing on asan build 583299, but failed. These are my asan options: handle_sigfpe=1:handle_sigbus=1:detect_stack_use_after_return=1:alloc_dealloc_mismatch=0:print_scariness=1:max_uar_stack_size_log=16:quarantine_size_mb=10:detect_odr_violation=0:handle_sigill=1:allocator_release_to_os_interval_ms=500:coverage=0:use_sigaltstack=1:fast_unwind_on_fatal=1:detect_leaks=1:print_summary=1:handle_abort=1:check_malloc_usable_size=0:detect_container_overflow=1:symbolize=1:handle_segv=1:abort_on_error=1:allow_user_segv_handler=1 What I did was: 1) download and unpack asan-linux-release-583299 2) download and unpack res.zip from #1 3) download crash.html from #1 and place it next to the extracted files from (2) 4) set (and export) ASAN_OPTIONS 5) start a webserver to serve the files from (2) and (3): python -m SimpleHTTPServer 8004 6) run: ./asan-linux-release-583299/chrome http://localhost:8004/crash.html
,
Sep 20
Sorry for my mistake. Seem like it lacks of a testharness.js file. Here i upload a new "wasm_idb_worker.js" and get that crash again. Please try this one.
,
Sep 20
Thanks, can reproduce on version 583299 now. Also tried ToT, and it does not reproduce there. Bisecting shows that is was fixed between 589344 and 589346. In-between (at 589345), we rolled v8 version 7.1.54, with these changes: https://chromium.googlesource.com/v8/v8/+log/41db1841..e1220339 This range contains the fix: 98bdaf9 [wasm] Fix worker termination while compiling So everything is fine, this is fixed on the M-70 branch. Thanks for filing this anyway!
,
Sep 20
,
Nov 12
,
Dec 3
hi cdsrc2016@, I'm afraid the VRP panel declined to reward for this bug, as it did not cause us to fix the issue, per comment 5. Cheers!
,
Dec 27
This bug has been closed for more than 14 weeks. Removing security view restrictions. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by tsepez@chromium.org
, Sep 4Owner: hablich@chromium.org
Status: Assigned (was: Unconfirmed)