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

Inappropriate implementation in WebGL (CVE-2026-5291)

A WebGL entrypoint in Chromium's Blink bindings passed typed-array arguments as raw spans without pinning their backing stores, and a user-defined valueOf() on the final drawcount argument could detach those stores before the C++ code read them. The stale pointers were then copied with memcpy, causing an AddressSanitizer read crash in the renderer.

heapracer Follow

Originally disclosed on Chrome VRP

  • Fix shipped in 26 days

Vulnerability Details

This is a renderer-side memory-safety bug reachable from JavaScript via WEBGL_multi_draw.

The bug is caused by passing Int32List arguments as PassAsSpan into a [NoAllocDirectCall] WebGL entrypoint. For these bindings, Blink deliberately disables reentry-safe backing-store retention, so the generated conversion passes raw spans without pinning detachable ArrayBuffer storage. A user-controlled valueOf() on the final drawcount argument runs after the typed-array arguments have already been converted, and can detach those backing stores before the C++ implementation consumes them.

WebGLMultiDraw::multiDrawElementsWEBGL() then forwards stale raw pointers into gpu::gles2::GLES2Implementation::MultiDrawElementsWEBGLHelper(), which copies drawcount * sizeof(GLsizei) bytes from those stale addresses into a transfer buffer. The copy happens in gpu::CopyArraysToBuffer() via memcpy, leading to an ASan SEGV on a renderer READ.

=================================================================
==79018==ERROR: AddressSanitizer: SEGV on unknown address 0x6de700000000 (pc 0x7327b4dadf0d bp 0x7ffd9e5b3ed0 sp 0x7ffd9e5b3688 T0)
==79018==The signal is caused by a READ memory access.
    #0 0x7327b4dadf0d in __memcpy_avx512_unaligned_erms string/../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:265
    #1 0x7327ad8a226f in std::__Cr::array<unsigned int, sizeof... (fp2)> gpu::CopyArraysToBuffer<int const, int const>(unsigned int, unsigned int, void*, int const*, int const*) gpu/command_buffer/client/transfer_buffer_cmd_copy_helpers.h:87:5
    #2 0x7327ad818a2a in bool internal::TransferArraysAndExecute<gpu::gles2::GLES2Implementation::MultiDrawElementsWEBGLHelper(unsigned int, int const*, unsigned int, int const*, int)::$_1, gpu::ScopedTransferBufferPtr, int const, int const>(unsigned int, gpu::ScopedTransferBufferPtr*, gpu::gles2::GLES2Implementation::MultiDrawElementsWEBGLHelper(unsigned int, int const*, unsigned int, int const*, int)::$_1 const&, int const*, int const*) gpu/command_buffer/client/transfer_buffer_cmd_copy_helpers.h:177:9
    #3 0x7327ad74fae2 in bool gpu::TransferArraysAndExecute<gpu::gles2::GLES2Implementation::MultiDrawElementsWEBGLHelper(unsigned int, int const*, unsigned int, int const*, int)::$_1, int const, int const>(unsigned int, gpu::ScopedTransferBufferPtr*, gpu::gles2::GLES2Implementation::MultiDrawElementsWEBGLHelper(unsigned int, int const*, unsigned int, int const*, int)::$_1 const&, int const*, int const*) gpu/command_buffer/client/transfer_buffer_cmd_copy_helpers.h:195:10
    #4 0x7327ad74f7dd in gpu::gles2::GLES2Implementation::MultiDrawElementsWEBGLHelper(unsigned int, int const*, unsigned int, int const*, int) gpu/command_buffer/client/gles2_implementation.cc:2277:8
    #5 0x7327ad751e68 in gpu::gles2::GLES2Implementation::MultiDrawElementsWEBGL(unsigned int, int const*, unsigned int, int const*, int) gpu/command_buffer/client/gles2_implementation.cc:2441:3
    #6 0x7327cd45b4fb in blink::WebGLMultiDraw::multiDrawElementsWEBGL(unsigned int, base::span<int const, 18446744073709551615ul, int const*>, unsigned int, unsigned int, base::span<int const, 18446744073709551615ul, int const*>, unsigned int, int)::$_0::operator()() const third_party/blink/renderer/modules/webgl/webgl_multi_draw.cc:93:40
    #7 0x7327cd458dc7 in void blink::WebGLRenderingContextBase::DrawWrapper<blink::WebGLMultiDraw::multiDrawElementsWEBGL(unsigned int, base::span<int const, 18446744073709551615ul, int const*>, unsigned int, unsigned int, base::span<int const, 18446744073709551615ul, int const*>, unsigned int, int)::$_0>(char const*, blink::CanvasPerformanceMonitor::DrawType, blink::WebGLMultiDraw::multiDrawElementsWEBGL(unsigned int, base::span<int const, 18446744073709551615ul, int const*>, unsigned int, unsigned int, base::span<int const, 18446744073709551615ul, int const*>, unsigned int, int)::$_0) third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h:845:5
    #8 0x7327cd45854f in blink::WebGLMultiDraw::multiDrawElementsWEBGL(unsigned int, base::span<int const, 18446744073709551615ul, int const*>, unsigned int, unsigned int, base::span<int const, 18446744073709551615ul, int const*>, unsigned int, int) third_party/blink/renderer/modules/webgl/webgl_multi_draw.cc:90:21
    #9 0x7327c7a1ff9c in blink::(anonymous namespace)::v8_webgl_multi_draw::MultiDrawElementsWEBGLOperationCallback(v8::FunctionCallbackInfo<v8::Value> const&) gen/third_party/blink/renderer/bindings/modules/v8/v8_webgl_multi_draw.cc:378:17
    #10 0x6f27669e9aaf  (<unknown module>)
    #11 0x6f27669e5c13  (<unknown module>)
    #12 0x6f27669d8366  (<unknown module>)
    #13 0x6f27669d80aa  (<unknown module>)
    #14 0x7327de15b584 in v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) v8/src/execution/simulator.h:216:12
    #15 0x7327de158dd6 in v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::DirectHandle<v8::internal::Object>, v8::internal::DirectHandle<v8::internal::Object>, v8::base::Vector<v8::internal::DirectHandle<v8::internal::Object> const>) v8/src/execution/execution.cc:564:10
    #16 0x7327dd911166 in v8::Function::Call(v8::Isolate*, v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) v8/src/api/api.cc:5584:27
    #17 0x7328018c15a0 in blink::V8ScriptRunner::CallFunction(v8::Local<v8::Function>, blink::ExecutionContext*, v8::Local<v8::Value>, int, v8::Local<v8::Value>*, v8::Isolate*) third_party/blink/renderer/bindings/core/v8/v8_script_runner.cc:851:48
    #18 0x7328013654e4 in blink::bindings::CallbackInvokeHelper<blink::CallbackFunctionBase, (blink::bindings::CallbackInvokeHelperMode)0, (blink::bindings::CallbackReturnTypeIsPromise)0>::CallInternal(int, v8::Local<v8::Value>*) third_party/blink/renderer/bindings/core/v8/callback_invoke_helper.cc:124:12
    #19 0x7328013650b6 in blink::bindings::CallbackInvokeHelper<blink::CallbackFunctionBase, (blink::bindings::CallbackInvokeHelperMode)0, (blink::bindings::CallbackReturnTypeIsPromise)0>::Call(int, v8::Local<v8::Value>*) third_party/blink/renderer/bindings/core/v8/callback_invoke_helper.cc:148:10
    #20 0x73280d7be2c8 in blink::V8Function::Invoke(blink::bindings::V8ValueOrScriptWrappableAdapter, blink::BasicHeapVector<(blink::internal::HeapCollectionType)1, blink::ScriptValue, 0u> const&) gen/third_party/blink/renderer/bindings/core/v8/v8_function.cc:73:13
    #21 0x73280d7bf6bc in blink::V8Function::InvokeAndReportException(blink::bindings::V8ValueOrScriptWrappableAdapter, blink::BasicHeapVector<(blink::internal::HeapCollectionType)1, blink::ScriptValue, 0u> const&) gen/third_party/blink/renderer/bindings/core/v8/v8_function.cc:133:15
    #22 0x73280a961834 in blink::ScheduledAction::Execute(blink::ExecutionContext*) third_party/blink/renderer/core/scheduler/scheduled_action.cc:145:18
    #23 0x73280a93b2a0 in blink::DOMTimer::Fired() third_party/blink/renderer/core/scheduler/dom_timer.cc:446:11
    #24 0x7327eb80ce6d in blink::TimerBase::RunInternal() third_party/blink/renderer/platform/timer.cc:166:3
    #25 0x732807f6d9ea in void base::internal::DecayedFunctorTraits<void (blink::TimerBase::*)(), blink::TimerBase*>::Invoke<void (blink::TimerBase::*)(), blink::TimerBase*>(void (blink::TimerBase::*)(), blink::TimerBase*&&) base/functional/bind_internal.h:740:12
    #26 0x732807f6d8ac in void base::internal::InvokeHelper<false, base::internal::FunctorTraits<void (blink::TimerBase::*&&)(), blink::TimerBase*>, void, 0ul>::MakeItSo<void (blink::TimerBase::*)(), std::__Cr::tuple<blink::UnretainedWrapper<blink::TimerBase>>>(void (blink::TimerBase::*&&)(), std::__Cr::tuple<blink::UnretainedWrapper<blink::TimerBase>>&&) base/functional/bind_internal.h:932:12
    #27 0x732807f6d651 in void base::internal::Invoker<base::internal::FunctorTraits<void (blink::TimerBase::*&&)(), blink::TimerBase*>, base::internal::BindState<true, true, false, void (blink::TimerBase::*)(), blink::UnretainedWrapper<blink::TimerBase>>, void ()>::RunImpl<void (blink::TimerBase::*)(), std::__Cr::tuple<blink::UnretainedWrapper<blink::TimerBase>>, 0ul>(void (blink::TimerBase::*&&)(), std::__Cr::tuple<blink::UnretainedWrapper<blink::TimerBase>>&&, std::__Cr::integer_sequence<unsigned long, 0ul>) base/functional/bind_internal.h:1069:14
    #28 0x732807f6d4e8 in base::internal::Invoker<base::internal::FunctorTraits<void (blink::TimerBase::*&&)(), blink::TimerBase*>, base::internal::BindState<true, true, false, void (blink::TimerBase::*)(), blink::UnretainedWrapper<blink::TimerBase>>, void ()>::RunOnce(base::internal::BindStateBase*) base/functional/bind_internal.h:982:12
    #29 0x732801518b12 in base::OnceCallback<void ()>::Run() && base/functional/callback.h:155:12
    #30 0x732801518994 in blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>::RunInternal(base::OnceCallback<void ()>*) third_party/blink/renderer/platform/wtf/functional.h:212:33
    #31 0x7328015164c3 in blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>::Run() third_party/blink/renderer/platform/wtf/functional.h:197:12
    #32 0x732801518031 in void base::internal::DecayedFunctorTraits<void (blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>::*)(), std::__Cr::unique_ptr<blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>, std::__Cr::default_delete<blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>>>&&>::Invoke<void (blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>::*)(), std::__Cr::unique_ptr<blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>, std::__Cr::default_delete<blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>>>>(void (blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>::*)(), std::__Cr::unique_ptr<blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>, std::__Cr::default_delete<blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>>>&&) base/functional/bind_internal.h:740:12
    #33 0x732801517f77 in void base::internal::InvokeHelper<false, base::internal::FunctorTraits<void (blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>::*&&)(), std::__Cr::unique_ptr<blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>, std::__Cr::default_delete<blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>>>&&>, void, 0ul>::MakeItSo<void (blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>::*)(), std::__Cr::tuple<std::__Cr::unique_ptr<blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>, std::__Cr::default_delete<blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>>>>>(void (blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>::*&&)(), std::__Cr::tuple<std::__Cr::unique_ptr<blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>, std::__Cr::default_delete<blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>>>>&&) base/functional/bind_internal.h:932:12
    #34 0x732801517de1 in void base::internal::Invoker<base::internal::FunctorTraits<void (blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>::*&&)(), std::__Cr::unique_ptr<blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>, std::__Cr::default_delete<blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>>>&&>, base::internal::BindState<true, true, false, void (blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>::*)(), std::__Cr::unique_ptr<blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>, std::__Cr::default_delete<blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>>>>, void ()>::RunImpl<void (blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>::*)(), std::__Cr::tuple<std::__Cr::unique_ptr<blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>, std::__Cr::default_delete<blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>>>>, 0ul>(void (blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>::*&&)(), std::__Cr::tuple<std::__Cr::unique_ptr<blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>, std::__Cr::default_delete<blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>>>>&&, std::__Cr::integer_sequence<unsigned long, 0ul>) base/functional/bind_internal.h:1069:14
    #35 0x732801517c78 in base::internal::Invoker<base::internal::FunctorTraits<void (blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>::*&&)(), std::__Cr::unique_ptr<blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>, std::__Cr::default_delete<blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>>>&&>, base::internal::BindState<true, true, false, void (blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>::*)(), std::__Cr::unique_ptr<blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>, std::__Cr::default_delete<blink::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>>>>, void ()>::RunOnce(base::internal::BindStateBase*) base/functional/bind_internal.h:982:12
    #36 0x7328f5768482 in base::OnceCallback<void ()>::Run() && base/functional/callback.h:155:12
    #37 0x7328f5c94abe in base::TaskAnnotator::RunTaskImpl(base::PendingTask&) base/task/common/task_annotator.cc:229:34
    #38 0x7328f5dc5317 in void base::TaskAnnotator::RunTask<base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::LazyNow*)::$_4>(perfetto::StaticString, base::PendingTask&, base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::LazyNow*)::$_4&&) base/task/common/task_annotator.h:112:5
    #39 0x7328f5dc430e in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::LazyNow*) base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:475:23
    #40 0x7328f5dc308a in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:346:40
    #41 0x7328f5dc47e2 in non-virtual thunk to base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() base/task/sequence_manager/thread_controller_with_message_pump_impl.cc
    #42 0x7328f58e3bea in base::MessagePumpDefault::Run(base::MessagePump::Delegate*) base/message_loop/message_pump_default.cc:42:55
    #43 0x7328f5dc6482 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool, base::TimeDelta) base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:650:12
    #44 0x7328f5b1caa7 in base::RunLoop::Run(base::Location const&) base/run_loop.cc:135:14
    #45 0x7328ddf01955 in content::RendererMain(content::MainFunctionParams) content/renderer/renderer_main.cc:332:16
    #46 0x7328de9ec1ba in content::RunZygote(content::ContentMainDelegate*) content/app/content_main_runner_impl.cc:664:14
    #47 0x7328de9ed9ec 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:771:12
    #48 0x7328de9f11e6 in content::ContentMainRunnerImpl::Run() content/app/content_main_runner_impl.cc:1152:10
    #49 0x7328de9e706f in content::RunContentProcess(content::ContentMainParams, content::ContentMainRunner*) content/app/content_main.cc:358:36
    #50 0x7328de9e7eb5 in content::ContentMain(content::ContentMainParams) content/app/content_main.cc:371:10
    #51 0x5f9acbff47e0 in ChromeMain chrome/app/chrome_main.cc:191:12
    #52 0x5f9acbff4041 in main chrome/app/chrome_exe_main_aura.cc:17:10
    #53 0x7327b4c2a577 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #54 0x7327b4c2a63a in __libc_start_main csu/../csu/libc-start.c:360:3
    #55 0x5f9acbf0e049 in _start (/home/shou/coding/chromium/src/out/asan_debug_nodcheck/chrome+0xf14e049) (BuildId: 39154d2d2bd938c6)

==79018==Register values:
rax = 0x00006f2701432070  rbx = 0x00006f2701432070  rcx = 0x00000de56027e48e  rdx = 0x0000000000000400  
rdi = 0x00006f2701432070  rsi = 0x00006de700000000  rbp = 0x00007ffd9e5b3ed0  rsp = 0x00007ffd9e5b3688  
 r8 = 0x0000000000000000   r9 = 0x000000000000000f  r10 = 0x000000000000000c  r11 = 0x0000000000000001  
r12 = 0x00006de700000000  r13 = 0x00000000000003bf  r14 = 0x0000000000000400  r15 = 0x00006de700000000  
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV string/../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:265 in __memcpy_avx512_unaligned_erms

==79018==ADDITIONAL INFO

==79018==Note: Please include this section with the ASan report.
Task trace:
    #0 0x73280a936f0b in blink::DOMTimer::DOMTimer(blink::ExecutionContext&, blink::ScheduledAction*, base::TimeDelta, bool) third_party/blink/renderer/core/scheduler/dom_timer.cc:343:27
    #1 0x73280cb0884a in blink::HTMLDocumentParser::SchedulePumpTokenizer(bool) third_party/blink/renderer/core/html/parser/html_document_parser.cc:858:7
    #2 0x7328c4fc4106 in IPC::ChannelAssociatedGroupController::Accept(mojo::Message*) ipc/ipc_mojo_bootstrap.cc:1138:13


Command line: `/proc/self/exe --type=renderer --crashpad-handler-pid=78899 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/org.chromium.Chromium.scoped_dir.F2rMUY --change-stack-guard-on-fork=enable --disable-in-process-stack-traces --no-sandbox --disable-breakpad --ozone-platform=headless --lang=en-US --num-raster-threads=4 --enable-main-frame-before-activation --renderer-client-id=5 --time-ticks-at-unix-epoch=-1771447530144636 --launch-time-ticks=1325126586276 --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,16554769914338161308,16393762372383704334,262144 --disable-features=PaintHolding --variations-seed-version --pseudonymization-salt-handle=7,i,929498045835722835,11515194025570577038,4 --trace-process-track-uuid=2297823529537201119`


==79018==END OF ADDITIONAL INFO

==79018==ABORTING

Impact

This is an attacker-triggerable renderer memory-safety bug caused by a stale-pointer dereference after JavaScript reentry.

  • The JavaScript caller controls the typed-array arguments passed into multiDrawElementsWEBGL().
  • The JavaScript caller controls drawcount, which directly controls the number of bytes copied by the helper. In the attached minimized PoC, the helper attempts two 1024-byte reads in one call.
  • A user-defined valueOf() on drawcount runs after the typed-array arguments have already been converted, and can detach those backing stores before the C++ implementation consumes them.
  • The stale raw pointers are then dereferenced in memcpy, producing an ASan READ-side crash in the renderer.

Version

  • Chrome Version: 147.0.7719.0 (local ASan Chromium build from source; dev/ToT-style build)
  • Operating System: Ubuntu 25.04, Linux 6.14.0-37-generic x86_64

Reproduction Case

Attached files:

  • min_poc.html

Verified Reproduction Steps

  1. Launch the ASan Chromium build with:
Bash
ASAN_OPTIONS=detect_odr_violation=0 chrome \
  --headless=new \
  --ozone-platform=headless \
  --no-sandbox \
  --disable-breakpad \
  --disable-crash-reporter \
  --disable-in-process-stack-traces \
  --enable-unsafe-swiftshader \
  --use-angle=swiftshader-webgl \
  file:///path/to/min_poc.html
  1. No interaction is required. The PoC triggers automatically on load.
  2. The renderer crashes with ASan reporting a SEGV on READ.

Notes on Flag

--enable-unsafe-swiftshader is not needed for this vulnerability - it is there simply for no GPU cases.

Detailed Root Cause

1. WebGL typed-array arguments use PassAsSpan

Int32List is defined as a [PassAsSpan] typedef in:

  • src/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.idl:43

2. multiDrawElementsWEBGL() is marked [NoAllocDirectCall]

The vulnerable WebGL entrypoint is declared in:

  • src/third_party/blink/renderer/modules/webgl/webgl_multi_draw.idl:17

Because the method is [NoAllocDirectCall], Blink's bindings generator disables reentry-safe span retention:

  • src/third_party/blink/renderer/bindings/scripts/bind_gen/blink_v8_bridge.py:506

Relevant logic:

Python
support_reentry = "NoAllocDirectCall" not in argument.owner.extended_attributes

3. PassAsSpan only pins backing stores when reentry support is enabled

In ByteSpanWithInlineStorage::MaybeSetBackingStore(), the ArrayBuffer backing store is retained only when kSupportReentry is enabled:

  • src/third_party/blink/renderer/bindings/core/v8/pass_as_span.h:42

4. Blink forwards stale raw pointers into the GPU client helper

After validation, WebGLMultiDraw::multiDrawElementsWEBGL() forwards raw pointers derived from the spans:

  • src/third_party/blink/renderer/modules/webgl/webgl_multi_draw.cc:71
  • src/third_party/blink/renderer/modules/webgl/webgl_multi_draw.cc:92

5. The GPU client helper copies from those stale pointers with memcpy

The data reaches:

  • src/gpu/command_buffer/client/gles2_implementation.cc:2260

which calls TransferArraysAndExecute(), and ultimately gpu::CopyArraysToBuffer() does:

  • src/gpu/command_buffer/client/transfer_buffer_cmd_copy_helpers.h:87
C++
memcpy(static_cast<int8_t*>(buffer) + byte_offsets[i], byte_pointers[i],
       copy_lengths[i]);

At this point byte_pointers[i] may refer to detached / stale typed-array backing storage that was invalidated by JavaScript reentry in drawcount.valueOf().

Vulnerable Code Snippets and Locations

Blink typedef and entrypoint

  • src/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.idl:43
  • src/third_party/blink/renderer/modules/webgl/webgl_multi_draw.idl:17

Reentry disabled for [NoAllocDirectCall]

  • src/third_party/blink/renderer/bindings/scripts/bind_gen/blink_v8_bridge.py:506

Backing-store pinning only with reentry support

  • src/third_party/blink/renderer/bindings/core/v8/pass_as_span.h:42

Raw-pointer forwarding into GLES2 client code

  • src/third_party/blink/renderer/modules/webgl/webgl_multi_draw.cc:71
  • src/third_party/blink/renderer/modules/webgl/webgl_multi_draw.cc:92
  • src/gpu/command_buffer/client/gles2_implementation.cc:2260

Faulting copy

  • src/gpu/command_buffer/client/transfer_buffer_cmd_copy_helpers.h:87

Crash Information

  • Type of crash: Renderer / tab crash
  • Crash site: gpu/command_buffer/client/transfer_buffer_cmd_copy_helpers.h:87
  • Crash state: stale-pointer READ during memcpy from detached Int32Array backing stores reached via gpu::gles2::GLES2Implementation::MultiDrawElementsWEBGLHelper
  • Client ID: N/A

See attached asan_crash.log for the ASan signal.

Reporter Credit

  • Reporter credit: heapracer

The original report as published on the Chromium issue tracker, by heapracer (@heapracer). Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the bindings generator disabled reentry-safe backing-store retention for a [NoAllocDirectCall] WebGL method, so a valueOf() callback could detach the typed-array storage after conversion but before the C++ helper copied from it.

Impact

An attacker could crash the renderer tab by getting a victim to load a crafted page; the report demonstrates only a read-side crash, not code execution.

What the attacker needed

Victim loads a crafted page; WebGL multi-draw support

How it was found

  1. Launch the ASan Chromium build in headless mode with the provided flags and open the PoC file.
  2. No interaction is needed; the page triggers the bug on load.
  3. The renderer crashes with an ASan SEGV on a read.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Web pages can call browser graphics functions with typed arrays, which are blocks of memory the page controls. The browser converted those arrays into raw memory addresses but did not keep the memory alive, and a page-supplied function could free it in between. The browser then read from the freed memory, which crashed the tab.

What is Memory corruption?

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

More by heapracer

View all

6 more disclosed reports, best first.

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.