New issue
Advanced search Search tips

Issue 839529 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Aug 14
Cc:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 1
Type: Bug

Blocking:
issue 783296



Sign in to add a comment

Null-dereference in base::CreateThreadInternal

Project Member Reported by ClusterFuzz, May 3 2018

Issue description

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

Fuzzer: noel-image-surku
Job Type: windows_asan_chrome
Platform Id: windows

Crash Type: Null-dereference
Crash Address: 0x000000000000
Crash State:
  base::CreateThreadInternal
  base::Thread::StartWithOptions
  base::Thread::Start
  
Sanitizer: address (ASAN)

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

Issue filed automatically.

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

Note: This crash might not be reproducible with the provided testcase. That said, for the past 14 days we've been seeing this crash frequently. If you are unable to reproduce this, please try a speculative fix based on the crash stacktrace in the report. The fix can be verified by looking at the crash statistics in the report, a day after the fix is deployed. We will auto-close the bug if the crash is not seen for 14 days.
 
Project Member

Comment 1 by ClusterFuzz, May 3 2018

Components: Internals>Core
Labels: Test-Predator-Auto-Components
Automatically applying components based on crash stacktrace and information from OWNERS files.

If this is incorrect, please apply the Test-Predator-Wrong-Components label.
Components: -Internals>Core Internals>GPU
Labels: M-67
Owner: sadrul@chromium.org
Status: Assigned (was: Untriaged)
Stack implicates a base::LazyInstance<class ChromeContentGpuClient...>, setting component to GPU.

sadrul@ - looks like you were poking around with GPU threads a few weeks ago, could you take a look or re-assign as appropriate? Thanks.

Project Member

Comment 3 by sheriffbot@chromium.org, May 4 2018

Labels: Security_Impact-Beta
Project Member

Comment 4 by sheriffbot@chromium.org, May 4 2018

Labels: Pri-1
Cc: wittman@chromium.org
+wittman@

That's interesting. wittman@ Do you have ideas on what could be going on here?
Hm. This is happening before we even attempt to start the sandbox in the gpu process.
This is crashing trying to execute at address 0x0 within __asan_wrap_CreateThread, presumably because ASAN's CreateThread hook is calling into a null function pointer. This seems like either a problem with ASAN's hooking of CreateThread or a really unlucky memory corruption.

It seems very unlikely that this could be caused by code on the crash stack, which is getting here via the same PlatformThread::Start() invocation that is used by pretty much every other thread within Chrome.
Project Member

Comment 8 by sheriffbot@chromium.org, May 19 2018

sadrul: 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

Comment 9 by sadrul@chromium.org, May 24 2018

Cc: tsepez@chromium.org sadrul@chromium.org siggi@chromium.org
Components: -Internals>GPU
Owner: ----
Status: Untriaged (was: Assigned)
Agree with comment#7. Someone more familiar with asan-on-windows should take a look and confirm. +siggi@
Cc: -siggi@chromium.org
Owner: siggi@chromium.org
Status: Assigned (was: Untriaged)
Security sheriff ping: siggi@, can you confirm this is some ASAN issue / unlucky memory corruption so I can close this out?

Comment 11 by siggi@chromium.org, May 24 2018

Owner: sadrul@chromium.org
Sorry, I'm not that familiar with ASAN, and I don't have time to tend this.
Blockedon: 827006
Cc: -sadrul@chromium.org r...@chromium.org
Labels: -Type-Bug-Security -Restrict-View-SecurityTeam -Security_Severity-High -Security_Impact-Beta Type-Bug
I think this is all win64-asan instability, needs some help to get it in shape.

Comment 13 by r...@chromium.org, May 25 2018

I built chrome locally with asan, and I was not able to reproduce this locally. The GPU process seems to start up just fine. wittman@, were you able to reproduce this? Did you use the CF builds or your own local build?

This is the code in ASan's CreateThread interceptor:

INTERCEPTOR_WINAPI(DWORD, CreateThread,
                   void* security, uptr stack_size,
                   DWORD (__stdcall *start_routine)(void*), void* arg,
                   DWORD thr_flags, void* tid) {
  // Strict init-order checking is thread-hostile.
  if (flags()->strict_init_order)
    StopInitOrderChecking();
  GET_STACK_TRACE_THREAD;
  // FIXME: The CreateThread interceptor is not the same as a pthread_create
  // one.  This is a bandaid fix for PR22025.
  bool detached = false;  // FIXME: how can we determine it on Windows?
  u32 current_tid = GetCurrentTidOrInvalid();
  AsanThread *t =
        AsanThread::Create(start_routine, arg, current_tid, &stack, detached);
  return REAL(CreateThread)(security, stack_size,
                            asan_thread_start, t, thr_flags, tid);
}

My best guess for what's happening based on c#7 is that `REAL(CreateThread)` is null. That can happen if code runs before __asan_init runs.
Blockedon: -827006
Blocking: 783296
I did not try to reproduce this. This code runs on every GPU process startup under 64-bit Windows and Mac, so if it did reproduce I would expect to see it crashing the GPU process consistently under ASAN.
 Issue 837093  has been merged into this issue.
Project Member

Comment 18 by ClusterFuzz, Aug 14

Status: WontFix (was: Assigned)
ClusterFuzz testcase 5142947511926784 is flaky and no longer crashes, so closing issue.

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

Sign in to add a comment