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

Integer overflow in Skia (CVE-2026-3538)

An integer overflow when accumulating path verb counts in Skia's Ganesh atlas renderer causes an undersized vertex buffer to be allocated, and the subsequent fan triangle write loop overruns it. An attacker could trigger a heap-buffer-overflow write in the GPU process via the HTML Canvas 2D API, with attacker-controlled path vertex coordinates written past the buffer.

Symeon Paraschoudis Follow

Originally disclosed on Chrome VRP

Critical View original
  • Fix shipped in 15 days

Security Bug

Important: Please do not change the component of this bug manually.

VULNERABILITY DETAILS

Component: Skia Ganesh GPU backend — AtlasPathRenderer / PathStencilCoverOp (Canvas 2D fill path)

An integer overflow in AtlasRenderTask::AtlasPathList::add() allows a user to trigger a heap-buffer-overflow write in PathStencilCoverOp::onPrepare() via the HTML Canvas 2D API. The attacker controls the data written past the buffer (path vertex coordinates).

AtlasRenderTask.h:98 accumulates path verb counts with no overflow check:

C++
fTotalCombinedPathVerbCnt += path.countVerbs();  // int32, no overflow check

The atlas only validates path pixel bounds (must fit in 2048x2048), not verb count.

This overflowed count is passed to PathStencilCoverOp (AtlasRenderTask.cpp:120), which uses it to allocate a single contiguous fan triangle buffer (GrEagerDynamicVertexAllocator):

C++
// PathStencilCoverOp.cpp:277-280
int maxTrianglesInFans = std::max(fTotalCombinedPathVerbCnt - 2, 0);
vertexAlloc.lockWriter(sizeof(SkPoint), maxTrianglesInFans * 3);  // undersized!

The fan triangle write loop (PathStencilCoverOp.cpp:281-289) then iterates all actual paths with no runtime bounds checking (VertexWriter::validate() is gated on SK_DEBUG, which is off in official builds):

C++
for (auto [pathMatrix, path, color] : *fPathDrawList) {
    for (tess::PathMiddleOutFanIter it(path); !it.done();) {
        for (auto [p0, p1, p2] : it.nextStack()) {
            triangleVertexWriter << m.map2Points(p0, p1) << m.mapPoint(p2);  // OOB write
        }
    }
}

VERSION Chrome Version: Chrome 147.0.7691.0 ASAN, Windows stable

Operating System: Windows 11 Version 24H2, OS Build 26100.7840

REPRODUCTION CASE

The following flags were used: chrome.exe --disable-gpu-sandbox --enable-gpu-rasterization --disable-features=SkiaGraphite --disable-gpu-watchdog --disable-gpu-driver-bug-workarounds --use-angle=vulkan --user-data-dir="%TEMP%\chrome-test-profile" --no-first-run --no-default-browser-check skia_atlas_overflow_poc.html

FOR CRASHES, PLEASE INCLUDE THE FOLLOWING ADDITIONAL INFORMATION Type of crash: browser

chrome.exe --disable-gpu-sandbox --enable-gpu-rasterization --disable-features=SkiaGraphite --disable-gpu-watchdog --disable-gpu-driver-bug-workarounds --use-angle=vulkan --user-data-dir="%TEMP%\chrome-test-profile" --no-first-run --no-default-browser-check skia_atlas_overflow_poc.html
=================================================================
==46964==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x11acaa5d1820 at pc 0x7fff153543db bp 0x001237ffd540 sp 0x001237ffd588
WRITE of size 16 at 0x11acaa5d1820 thread T0
    #0 0x7fff153543da in skgpu::BufferWriter::write C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\BufferWriter.h:92
    #1 0x7fff153543da in skgpu::operator<< C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\BufferWriter.h:321
    #2 0x7fff153543da in skgpu::ganesh::PathStencilCoverOp::onPrepare(class GrOpFlushState *) C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\ganesh\ops\PathStencilCoverOp.cpp:285:46
    #3 0x7fff15116c04 in GrOp::prepare(class GrOpFlushState *) C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\ganesh\ops\GrOp.cpp:59:11
    #4 0x7fff1511e412 in skgpu::ganesh::OpsTask::onPrepare(class GrOpFlushState *) C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\ganesh\ops\OpsTask.cpp:548:27
    #5 0x7fff15284653 in GrRenderTask::prepare(class GrOpFlushState *) C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\ganesh\GrRenderTask.cpp:111:11
    #6 0x7fff153ec37a in GrDrawingManager::executeRenderTasks(class GrOpFlushState *) C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\ganesh\GrDrawingManager.cpp:266:21
    #7 0x7fff153ea19a in GrDrawingManager::flush(class SkSpan<class GrSurfaceProxy *>, enum SkSurfaces::BackendSurfaceAccess, struct GrFlushInfo const &, class skgpu::MutableTextureState const *) C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\ganesh\GrDrawingManager.cpp:209:34
    #8 0x7fff153ed7cd in GrDrawingManager::flushSurfaces(class SkSpan<class GrSurfaceProxy *>, enum SkSurfaces::BackendSurfaceAccess, struct GrFlushInfo const &, class skgpu::MutableTextureState const *) C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\ganesh\GrDrawingManager.cpp:540:27
    #9 0x7fff1540584b in GrDirectContextPriv::flushSurfaces(class SkSpan<class GrSurfaceProxy *>, enum SkSurfaces::BackendSurfaceAccess, struct GrFlushInfo const &, class skgpu::MutableTextureState const *) C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\ganesh\GrDirectContextPriv.cpp:92:47
    #10 0x7fff1541794a in GrDirectContextPriv::flushSurface C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\ganesh\GrDirectContextPriv.h:106
    #11 0x7fff1541794a in GrDirectContext::flush(class SkSurface *, struct GrFlushInfo const &, class skgpu::MutableTextureState const *) C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\ganesh\GrDirectContext.cpp:520:25
    #12 0x7fff150c88ed in skgpu::ganesh::Flush(class SkSurface *) C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\ganesh\surface\SkSurface_Ganesh.cpp:759:45
    #13 0x7fff1937ff06 in gpu::SharedContextState::FlushWriteAccess(class gpu::SkiaImageRepresentation::ScopedWriteAccess *) C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\shared_context_state.cc:869:9
    #14 0x7fff19627512 in gpu::raster::RasterDecoderImpl::DoEndRasterCHROMIUM(void) C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\raster_decoder.cc:3099:30
    #15 0x7fff19622078 in gpu::raster::RasterDecoderImpl::HandleEndRasterCHROMIUM(unsigned int, void const volatile *) C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\raster_decoder_autogen.h:151:3
    #16 0x7fff1962c03d in gpu::raster::RasterDecoderImpl::DoCommandsImpl<0>(unsigned int, void const volatile *, int, int *) C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\raster_decoder.cc:1526:18
    #17 0x7fff035de36b in gpu::CommandBufferService::Flush(int, class gpu::AsyncAPIInterface *) C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\command_buffer_service.cc:267:35
    #18 0x7fff196e36e1 in gpu::CommandBufferStub::OnAsyncFlush(int, unsigned int, class std::__Cr::vector<struct gpu::SyncToken, class std::__Cr::allocator<struct gpu::SyncToken>> const &) C:\b\s\w\ir\cache\builder\src\gpu\ipc\service\command_buffer_stub.cc:504:22
    #19 0x7fff196e25f3 in gpu::CommandBufferStub::ExecuteDeferredRequest(class gpu::mojom::DeferredCommandBufferRequestParams &, class gpu::FenceSyncReleaseDelegate *) C:\b\s\w\ir\cache\builder\src\gpu\ipc\service\command_buffer_stub.cc:173:7
    #20 0x7fff196af4a1 in gpu::GpuChannel::ExecuteDeferredRequest(class mojo::StructPtr<class gpu::mojom::DeferredRequestParams>, class gpu::FenceSyncReleaseDelegate *) C:\b\s\w\ir\cache\builder\src\gpu\ipc\service\gpu_channel.cc:833:13
    #21 0x7fff196bf4cf in base::internal::DecayedFunctorTraits<void (gpu::GpuChannel::*)(mojo::StructPtr<gpu::mojom::DeferredRequestParams>, gpu::FenceSyncReleaseDelegate *),base::WeakPtr<gpu::GpuChannel> &&,mojo::StructPtr<gpu::mojom::DeferredRequestParams> &&>::Invoke C:\b\s\w\ir\cache\builder\src\base\functional\bind_internal.h:740
    #22 0x7fff196bf4cf in base::internal::InvokeHelper<1,base::internal::FunctorTraits<void (gpu::GpuChannel::*&&)(mojo::StructPtr<gpu::mojom::DeferredRequestParams>, gpu::FenceSyncReleaseDelegate *),base::WeakPtr<gpu::GpuChannel> &&,mojo::StructPtr<gpu::mojom::DeferredRequestParams> &&>,void,0,1>::MakeItSo C:\b\s\w\ir\cache\builder\src\base\functional\bind_internal.h:956
    #23 0x7fff196bf4cf in base::internal::Invoker<base::internal::FunctorTraits<void (gpu::GpuChannel::*&&)(mojo::StructPtr<gpu::mojom::DeferredRequestParams>, gpu::FenceSyncReleaseDelegate *),base::WeakPtr<gpu::GpuChannel> &&,mojo::StructPtr<gpu::mojom::DeferredRequestParams> &&>,base::internal::BindState<1,1,0,void (gpu::GpuChannel::*)(mojo::StructPtr<gpu::mojom::DeferredRequestParams>, gpu::FenceSyncReleaseDelegate *),base::WeakPtr<gpu::GpuChannel>,mojo::StructPtr<gpu::mojom::DeferredRequestParams> >,void (gpu::FenceSyncReleaseDelegate *)>::RunImpl C:\b\s\w\ir\cache\builder\src\base\functional\bind_internal.h:1069
    #24 0x7fff196bf4cf in base::internal::Invoker<struct base::internal::FunctorTraits<void (__cdecl gpu::GpuChannel::*&&)(class mojo::StructPtr<class gpu::mojom::DeferredRequestParams>, class gpu::FenceSyncReleaseDelegate *), class base::WeakPtr<class gpu::GpuChannel> &&, class mojo::StructPtr<class gpu::mojom::DeferredRequestParams> &&>, struct base::internal::BindState<1, 1, 0, void (__cdecl gpu::GpuChannel::*)(class mojo::StructPtr<class gpu::mojom::DeferredRequestParams>, class gpu::FenceSyncReleaseDelegate *), class base::WeakPtr<class gpu::GpuChannel>, class mojo::StructPtr<class gpu::mojom::DeferredRequestParams>>, (class gpu::FenceSyncReleaseDelegate *)>::RunOnce(class base::internal::BindStateBase *, class gpu::FenceSyncReleaseDelegate *) C:\b\s\w\ir\cache\builder\src\base\functional\bind_internal.h:982:12
    #25 0x7fff036204cb in base::OnceCallback<void (gpu::FenceSyncReleaseDelegate *)>::Run C:\b\s\w\ir\cache\builder\src\base\functional\callback.h:155
    #26 0x7fff036204cb in base::internal::DecayedFunctorTraits<base::OnceCallback<void (gpu::FenceSyncReleaseDelegate *)>,gpu::FenceSyncReleaseDelegate *>::Invoke C:\b\s\w\ir\cache\builder\src\base\functional\bind_internal.h:815
    #27 0x7fff036204cb in base::internal::InvokeHelper<0,base::internal::FunctorTraits<base::OnceCallback<void (gpu::FenceSyncReleaseDelegate *)> &&,gpu::FenceSyncReleaseDelegate *>,void,0>::MakeItSo C:\b\s\w\ir\cache\builder\src\base\functional\bind_internal.h:932
    #28 0x7fff036204cb in base::internal::Invoker<struct base::internal::FunctorTraits<class base::OnceCallback<(class gpu::FenceSyncReleaseDelegate *)> &&, class gpu::FenceSyncReleaseDelegate *>, struct base::internal::BindState<0, 1, 1, class base::OnceCallback<(class gpu::FenceSyncReleaseDelegate *)>, class base::internal::UnretainedWrapper<class gpu::FenceSyncReleaseDelegate, struct base::unretained_traits::MayNotDangle, 0>>, (void)>::RunImpl<class base::OnceCallback<(class gpu::FenceSyncReleaseDelegate *)>, class std::__Cr::tuple<class base::internal::UnretainedWrapper<class gpu::FenceSyncReleaseDelegate, struct base::unretained_traits::MayNotDangle, 0>>, 0>(class base::OnceCallback<(class gpu::FenceSyncReleaseDelegate *)> &&, class std::__Cr::tuple<class base::internal::UnretainedWrapper<class gpu::FenceSyncReleaseDelegate, struct base::unretained_traits::MayNotDangle, 0>> &&, struct std::__Cr::integer_sequence<unsigned __int64, 0>) C:\b\s\w\ir\cache\builder\src\base\functional\bind_internal.h:1069:14
    #29 0x7fff035f42f2 in base::OnceCallback<void ()>::Run C:\b\s\w\ir\cache\builder\src\base\functional\callback.h:155
    #30 0x7fff035f42f2 in gpu::Scheduler::ExecuteSequence(class base::IdType<class gpu::SyncPointOrderData, unsigned int, 0, 1>) C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\scheduler.cc:707:29
    #31 0x7fff035f2420 in gpu::Scheduler::RunNextTask(void) C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\scheduler.cc:625:3
    #32 0x7fff035f6fa4 in base::internal::DecayedFunctorTraits<void (gpu::Scheduler::*)(),gpu::Scheduler *>::Invoke C:\b\s\w\ir\cache\builder\src\base\functional\bind_internal.h:740
    #33 0x7fff035f6fa4 in base::internal::InvokeHelper<0,base::internal::FunctorTraits<void (gpu::Scheduler::*&&)(),gpu::Scheduler *>,void,0>::MakeItSo C:\b\s\w\ir\cache\builder\src\base\functional\bind_internal.h:932
    #34 0x7fff035f6fa4 in base::internal::Invoker<base::internal::FunctorTraits<void (gpu::Scheduler::*&&)(),gpu::Scheduler *>,base::internal::BindState<1,1,0,void (gpu::Scheduler::*)(),base::internal::UnretainedWrapper<gpu::Scheduler,base::unretained_traits::MayNotDangle,0> >,void ()>::RunImpl C:\b\s\w\ir\cache\builder\src\base\functional\bind_internal.h:1069
    #35 0x7fff035f6fa4 in base::internal::Invoker<struct base::internal::FunctorTraits<void (__cdecl gpu::Scheduler::*&&)(void), class gpu::Scheduler *>, struct base::internal::BindState<1, 1, 0, void (__cdecl gpu::Scheduler::*)(void), class base::internal::UnretainedWrapper<class gpu::Scheduler, struct base::unretained_traits::MayNotDangle, 0>>, (void)>::RunOnce(class base::internal::BindStateBase *) C:\b\s\w\ir\cache\builder\src\base\functional\bind_internal.h:982:12
    #36 0x7fff1434a988 in base::OnceCallback<void ()>::Run C:\b\s\w\ir\cache\builder\src\base\functional\callback.h:155
    #37 0x7fff1434a988 in base::TaskAnnotator::RunTaskImpl(struct base::PendingTask &) C:\b\s\w\ir\cache\builder\src\base\task\common\task_annotator.cc:229:34
    #38 0x7fff1431add1 in base::TaskAnnotator::RunTask C:\b\s\w\ir\cache\builder\src\base\task\common\task_annotator.h:112
    #39 0x7fff1431add1 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(class base::LazyNow *) C:\b\s\w\ir\cache\builder\src\base\task\sequence_manager\thread_controller_with_message_pump_impl.cc:475:23
    #40 0x7fff14319c33 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork(void) C:\b\s\w\ir\cache\builder\src\base\task\sequence_manager\thread_controller_with_message_pump_impl.cc:346:40
    #41 0x7fff14484b10 in base::MessagePumpDefault::Run(class base::MessagePump::Delegate *) C:\b\s\w\ir\cache\builder\src\base\message_loop\message_pump_default.cc:42:55
    #42 0x7fff1431cb1f in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool, class base::TimeDelta) C:\b\s\w\ir\cache\builder\src\base\task\sequence_manager\thread_controller_with_message_pump_impl.cc:650:12
    #43 0x7fff143c25ac in base::RunLoop::Run(class base::Location const &) C:\b\s\w\ir\cache\builder\src\base\run_loop.cc:135:14
    #44 0x7fff1deb4f03 in content::GpuMain(struct content::MainFunctionParams) C:\b\s\w\ir\cache\builder\src\content\gpu\gpu_main.cc:479:14
    #45 0x7fff0ff97536 in content::RunOtherNamedProcessTypeMain(class std::__Cr::basic_string<char, struct std::__Cr::char_traits<char>, class std::__Cr::allocator<char>> const &, struct content::MainFunctionParams, class content::ContentMainDelegate *) C:\b\s\w\ir\cache\builder\src\content\app\content_main_runner_impl.cc:762:14
    #46 0x7fff0ff99bcb in content::ContentMainRunnerImpl::Run(void) C:\b\s\w\ir\cache\builder\src\content\app\content_main_runner_impl.cc:1147:10
    #47 0x7fff0ff8da9f in content::RunContentProcess(struct content::ContentMainParams, class content::ContentMainRunner *) C:\b\s\w\ir\cache\builder\src\content\app\content_main.cc:358:36
    #48 0x7fff0ff8e242 in content::ContentMain(struct content::ContentMainParams) C:\b\s\w\ir\cache\builder\src\content\app\content_main.cc:371:10
    #49 0x7ffefff02b06 in ChromeMain C:\b\s\w\ir\cache\builder\src\chrome\app\chrome_main.cc:191:12
    #50 0x7ff7bac44807 in MainDllLoader::Launch(struct HINSTANCE__*, class base::TimeTicks) C:\b\s\w\ir\cache\builder\src\chrome\app\main_dll_loader_win.cc:204:12
    #51 0x7ff7bac42074 in main C:\b\s\w\ir\cache\builder\src\chrome\app\chrome_exe_main_win.cc:351:20
    #52 0x7ff7bb13c83f in invoke_main D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
    #53 0x7ff7bb13c83f in __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
    #54 0x7ff84e4be8d6  (C:\Windows\System32\KERNEL32.DLL+0x18002e8d6)
    #55 0x7ff84f06c40b  (C:\Windows\SYSTEM32\ntdll.dll+0x18008c40b)

0x11acaa5d1820 is located 0 bytes after 1572896-byte region [0x11acaa451800,0x11acaa5d1820)
allocated by thread T0 here:
    #0 0x7fff6924e51f  (C:\Users\symeon\Desktop\chromium-147.0.7691.0-win64-asan\clang_rt.asan_dynamic-x86_64.dll+0x18005e51f)
    #1 0x7fff15436d32 in GrCpuBuffer::Make C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\ganesh\GrCpuBuffer.h:29
    #2 0x7fff15436d32 in GrBufferAllocPool::CpuBufferCache::makeBuffer(unsigned __int64, bool) C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\ganesh\GrBufferAllocPool.cpp:56:30
    #3 0x7fff15437fc7 in GrBufferAllocPool::resetCpuData(unsigned __int64) C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\ganesh\GrBufferAllocPool.cpp:389:60
    #4 0x7fff15439cd1 in GrBufferAllocPool::createBlock(unsigned __int64) C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\ganesh\GrBufferAllocPool.cpp:362:15
    #5 0x7fff15438fce in GrBufferAllocPool::makeSpace(unsigned __int64, unsigned __int64, class sk_sp<class GrBuffer const> *, unsigned __int64 *) C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\ganesh\GrBufferAllocPool.cpp:229:16
    #6 0x7fff1543b8c0 in GrVertexBufferAllocPool::makeSpace(unsigned __int64, int, class sk_sp<class GrBuffer const> *, int *) C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\ganesh\GrBufferAllocPool.cpp:445:28
    #7 0x7fff15349b27 in GrEagerDynamicVertexAllocator::lock(unsigned __int64, int) C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\ganesh\GrEagerVertexAllocator.cpp:20:31
    #8 0x7fff153528b8 in GrEagerVertexAllocator::lockWriter C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\ganesh\GrEagerVertexAllocator.h:39
    #9 0x7fff153528b8 in skgpu::ganesh::PathStencilCoverOp::onPrepare(class GrOpFlushState *) C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\ganesh\ops\PathStencilCoverOp.cpp:280:33
    #10 0x7fff15116c04 in GrOp::prepare(class GrOpFlushState *) C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\ganesh\ops\GrOp.cpp:59:11
    #11 0x7fff1511e412 in skgpu::ganesh::OpsTask::onPrepare(class GrOpFlushState *) C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\ganesh\ops\OpsTask.cpp:548:27
    #12 0x7fff15284653 in GrRenderTask::prepare(class GrOpFlushState *) C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\ganesh\GrRenderTask.cpp:111:11
    #13 0x7fff153ec37a in GrDrawingManager::executeRenderTasks(class GrOpFlushState *) C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\ganesh\GrDrawingManager.cpp:266:21
    #14 0x7fff153ea19a in GrDrawingManager::flush(class SkSpan<class GrSurfaceProxy *>, enum SkSurfaces::BackendSurfaceAccess, struct GrFlushInfo const &, class skgpu::MutableTextureState const *) C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\ganesh\GrDrawingManager.cpp:209:34
    #15 0x7fff153ed7cd in GrDrawingManager::flushSurfaces(class SkSpan<class GrSurfaceProxy *>, enum SkSurfaces::BackendSurfaceAccess, struct GrFlushInfo const &, class skgpu::MutableTextureState const *) C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\ganesh\GrDrawingManager.cpp:540:27
    #16 0x7fff1540584b in GrDirectContextPriv::flushSurfaces(class SkSpan<class GrSurfaceProxy *>, enum SkSurfaces::BackendSurfaceAccess, struct GrFlushInfo const &, class skgpu::MutableTextureState const *) C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\ganesh\GrDirectContextPriv.cpp:92:47
    #17 0x7fff1541794a in GrDirectContextPriv::flushSurface C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\ganesh\GrDirectContextPriv.h:106
    #18 0x7fff1541794a in GrDirectContext::flush(class SkSurface *, struct GrFlushInfo const &, class skgpu::MutableTextureState const *) C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\ganesh\GrDirectContext.cpp:520:25
    #19 0x7fff150c88ed in skgpu::ganesh::Flush(class SkSurface *) C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\ganesh\surface\SkSurface_Ganesh.cpp:759:45
    #20 0x7fff1937ff06 in gpu::SharedContextState::FlushWriteAccess(class gpu::SkiaImageRepresentation::ScopedWriteAccess *) C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\shared_context_state.cc:869:9
    #21 0x7fff19627512 in gpu::raster::RasterDecoderImpl::DoEndRasterCHROMIUM(void) C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\raster_decoder.cc:3099:30
    #22 0x7fff19622078 in gpu::raster::RasterDecoderImpl::HandleEndRasterCHROMIUM(unsigned int, void const volatile *) C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\raster_decoder_autogen.h:151:3
    #23 0x7fff1962c03d in gpu::raster::RasterDecoderImpl::DoCommandsImpl<0>(unsigned int, void const volatile *, int, int *) C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\raster_decoder.cc:1526:18
    #24 0x7fff035de36b in gpu::CommandBufferService::Flush(int, class gpu::AsyncAPIInterface *) C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\command_buffer_service.cc:267:35
    #25 0x7fff196e36e1 in gpu::CommandBufferStub::OnAsyncFlush(int, unsigned int, class std::__Cr::vector<struct gpu::SyncToken, class std::__Cr::allocator<struct gpu::SyncToken>> const &) C:\b\s\w\ir\cache\builder\src\gpu\ipc\service\command_buffer_stub.cc:504:22
    #26 0x7fff196e25f3 in gpu::CommandBufferStub::ExecuteDeferredRequest(class gpu::mojom::DeferredCommandBufferRequestParams &, class gpu::FenceSyncReleaseDelegate *) C:\b\s\w\ir\cache\builder\src\gpu\ipc\service\command_buffer_stub.cc:173:7
    #27 0x7fff196af4a1 in gpu::GpuChannel::ExecuteDeferredRequest(class mojo::StructPtr<class gpu::mojom::DeferredRequestParams>, class gpu::FenceSyncReleaseDelegate *) C:\b\s\w\ir\cache\builder\src\gpu\ipc\service\gpu_channel.cc:833:13
    #28 0x7fff196bf4cf in base::internal::DecayedFunctorTraits<void (gpu::GpuChannel::*)(mojo::StructPtr<gpu::mojom::DeferredRequestParams>, gpu::FenceSyncReleaseDelegate *),base::WeakPtr<gpu::GpuChannel> &&,mojo::StructPtr<gpu::mojom::DeferredRequestParams> &&>::Invoke C:\b\s\w\ir\cache\builder\src\base\functional\bind_internal.h:740
    #29 0x7fff196bf4cf in base::internal::InvokeHelper<1,base::internal::FunctorTraits<void (gpu::GpuChannel::*&&)(mojo::StructPtr<gpu::mojom::DeferredRequestParams>, gpu::FenceSyncReleaseDelegate *),base::WeakPtr<gpu::GpuChannel> &&,mojo::StructPtr<gpu::mojom::DeferredRequestParams> &&>,void,0,1>::MakeItSo C:\b\s\w\ir\cache\builder\src\base\functional\bind_internal.h:956
    #30 0x7fff196bf4cf in base::internal::Invoker<base::internal::FunctorTraits<void (gpu::GpuChannel::*&&)(mojo::StructPtr<gpu::mojom::DeferredRequestParams>, gpu::FenceSyncReleaseDelegate *),base::WeakPtr<gpu::GpuChannel> &&,mojo::StructPtr<gpu::mojom::DeferredRequestParams> &&>,base::internal::BindState<1,1,0,void (gpu::GpuChannel::*)(mojo::StructPtr<gpu::mojom::DeferredRequestParams>, gpu::FenceSyncReleaseDelegate *),base::WeakPtr<gpu::GpuChannel>,mojo::StructPtr<gpu::mojom::DeferredRequestParams> >,void (gpu::FenceSyncReleaseDelegate *)>::RunImpl C:\b\s\w\ir\cache\builder\src\base\functional\bind_internal.h:1069
    #31 0x7fff196bf4cf in base::internal::Invoker<struct base::internal::FunctorTraits<void (__cdecl gpu::GpuChannel::*&&)(class mojo::StructPtr<class gpu::mojom::DeferredRequestParams>, class gpu::FenceSyncReleaseDelegate *), class base::WeakPtr<class gpu::GpuChannel> &&, class mojo::StructPtr<class gpu::mojom::DeferredRequestParams> &&>, struct base::internal::BindState<1, 1, 0, void (__cdecl gpu::GpuChannel::*)(class mojo::StructPtr<class gpu::mojom::DeferredRequestParams>, class gpu::FenceSyncReleaseDelegate *), class base::WeakPtr<class gpu::GpuChannel>, class mojo::StructPtr<class gpu::mojom::DeferredRequestParams>>, (class gpu::FenceSyncReleaseDelegate *)>::RunOnce(class base::internal::BindStateBase *, class gpu::FenceSyncReleaseDelegate *) C:\b\s\w\ir\cache\builder\src\base\functional\bind_internal.h:982:12
    #32 0x7fff036204cb in base::OnceCallback<void (gpu::FenceSyncReleaseDelegate *)>::Run C:\b\s\w\ir\cache\builder\src\base\functional\callback.h:155
    #33 0x7fff036204cb in base::internal::DecayedFunctorTraits<base::OnceCallback<void (gpu::FenceSyncReleaseDelegate *)>,gpu::FenceSyncReleaseDelegate *>::Invoke C:\b\s\w\ir\cache\builder\src\base\functional\bind_internal.h:815
    #34 0x7fff036204cb in base::internal::InvokeHelper<0,base::internal::FunctorTraits<base::OnceCallback<void (gpu::FenceSyncReleaseDelegate *)> &&,gpu::FenceSyncReleaseDelegate *>,void,0>::MakeItSo C:\b\s\w\ir\cache\builder\src\base\functional\bind_internal.h:932
    #35 0x7fff036204cb in base::internal::Invoker<struct base::internal::FunctorTraits<class base::OnceCallback<(class gpu::FenceSyncReleaseDelegate *)> &&, class gpu::FenceSyncReleaseDelegate *>, struct base::internal::BindState<0, 1, 1, class base::OnceCallback<(class gpu::FenceSyncReleaseDelegate *)>, class base::internal::UnretainedWrapper<class gpu::FenceSyncReleaseDelegate, struct base::unretained_traits::MayNotDangle, 0>>, (void)>::RunImpl<class base::OnceCallback<(class gpu::FenceSyncReleaseDelegate *)>, class std::__Cr::tuple<class base::internal::UnretainedWrapper<class gpu::FenceSyncReleaseDelegate, struct base::unretained_traits::MayNotDangle, 0>>, 0>(class base::OnceCallback<(class gpu::FenceSyncReleaseDelegate *)> &&, class std::__Cr::tuple<class base::internal::UnretainedWrapper<class gpu::FenceSyncReleaseDelegate, struct base::unretained_traits::MayNotDangle, 0>> &&, struct std::__Cr::integer_sequence<unsigned __int64, 0>) C:\b\s\w\ir\cache\builder\src\base\functional\bind_internal.h:1069:14
    #36 0x7fff035f42f2 in base::OnceCallback<void ()>::Run C:\b\s\w\ir\cache\builder\src\base\functional\callback.h:155
    #37 0x7fff035f42f2 in gpu::Scheduler::ExecuteSequence(class base::IdType<class gpu::SyncPointOrderData, unsigned int, 0, 1>) C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\scheduler.cc:707:29

SUMMARY: AddressSanitizer: heap-buffer-overflow C:\b\s\w\ir\cache\builder\src\third_party\skia\src\gpu\BufferWriter.h:92 in skgpu::BufferWriter::write
Shadow bytes around the buggy address:
  0x11acaa5d1580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x11acaa5d1600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x11acaa5d1680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x11acaa5d1700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x11acaa5d1780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x11acaa5d1800: 00 00 00 00[fa]fa fa fa fa fa fa fa fa fa fa fa
  0x11acaa5d1880: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x11acaa5d1900: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x11acaa5d1980: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x11acaa5d1a00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x11acaa5d1a80: fa 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

==46964==ADDITIONAL INFO

==46964==Note: Please include this section with the ASan report.
Task trace:
    #0 0x7fff035f28a3 in gpu::Scheduler::RunNextTask(void) C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\scheduler.cc:647:27
    #1 0x7fff035f28a3 in gpu::Scheduler::RunNextTask(void) C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\scheduler.cc:647:27
    #2 0x7fff035f28a3 in gpu::Scheduler::RunNextTask(void) C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\scheduler.cc:647:27
    #3 0x7fff035f28a3 in gpu::Scheduler::RunNextTask(void) C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\scheduler.cc:647:27


Command line: `"C:\Users\symeon\Desktop\chromium-147.0.7691.0-win64-asan\chrome.exe" --type=gpu-process --disable-gpu-sandbox --enable-gpu-rasterization --disable-gpu-driver-bug-workarounds --use-angle=vulkan --user-data-dir="C:\Users\symeon\AppData\Local\Temp\chrome-test-profile" --no-pre-read-main-dll --start-stack-profiler --gpu-preferences=SAAAAAAAAADoAQAEAAAAAAAAAAAAAMAAAQAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAACAAAAAAAAAAIAAAAAAAAAA== --metrics-shmem-handle=2020,i,2711572133984203719,598222915878074520,262144 --field-trial-handle=2184,i,4859281458461868149,12462582824067425576,262144 --disable-features=SkiaGraphite --variations-seed-version --pseudonymization-salt-handle=2188,i,1596115968977333280,2659678181742721290,4 --trace-process-track-uuid=3190708988185955192 --mojo-platform-channel-handle=2180 /prefetch:2`


==46964==END OF ADDITIONAL INFO

==46964==ABORTING
[47764:48420:0217/095337.032:ERROR:content\browser\gpu\gpu_process_host.cc:999] GPU process exited unexpectedly: exit_code=1
[47764:48420:0217/095344.320:ERROR:components\device_event_log\device_event_log_impl.cc:202] [09:53:44.319] USB: usb_service_win.cc:108 SetupDiGetDeviceProperty({{A45C254E-DF1C-4EFD-8020-67D146A850E0}, 6}) failed: Element not found. (0x490)
[47764:47488:0217/095344.506:ERROR:google_apis\gcm\engine\connection_factory_impl.cc:434] Failed to connect to MCS endpoint with error -105
[47764:47488:0217/095344.508:ERROR:google_apis\gcm\engine\registration_request.cc:275] Registration URL fetching failed.

CREDIT INFORMATION Reporter credit: Symeon Paraschoudis

The original report as published on the Chromium issue tracker, by Symeon Paraschoudis. 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 path verb count is accumulated in a 32-bit integer with no overflow check, and the resulting wrapped value is used to size a vertex buffer while the write loop iterates the real, larger path data with bounds validation only enabled in debug builds.

Impact

An attacker could cause a heap-buffer-overflow write of attacker-controlled path vertex data in the GPU process; the report demonstrates this only as a crash under ASAN with GPU sandboxing disabled, and does not show code execution.

What the attacker needed

Victim opens a crafted web page; GPU rasterisation path in use; GPU sandbox disabled in the test setup

How it was found

  1. Open the supplied HTML proof-of-concept page in a Chrome build with the listed GPU flags enabled.
  2. The page draws canvas 2D fill paths whose combined verb count overflows the 32-bit accumulator.
  3. The atlas renderer allocates a vertex buffer sized from the wrapped count.
  4. The fan triangle write loop writes all real path vertices, running past the buffer and triggering the ASAN heap-buffer-overflow.

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.

When a web page draws shapes on a canvas, the browser's graphics library (Skia) adds up how many drawing instructions each shape has so it can reserve memory for them. That running total is stored in a fixed-size number that can wrap around to a small value if it gets too big, so the browser reserves far too little memory. It then writes all the shape data anyway, spilling past the end of the reserved block and corrupting nearby memory in the graphics process.

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 Symeon Paraschoudis

View all

1 more disclosed report, 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.