Stack buffer overflow in GPU (CVE-2026-10898)
A pointer to a stack-local boolean was passed as userdata to an asynchronous buffer-mapping callback in the GPU process. If a device loss makes the synchronous wait return early, the callback stays pending and later fires during instance shutdown, writing one byte to a stack address that no longer exists.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 17 days
Project Fortify, an experimental security project, has identified the following potential security issue. If you're a feature owner CC-ed on this bug, please do your best to review these reports. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: A stack-local variable's address is leaked as userdata into a wgpu::Buffer::MapAsync callback in the GPU process. If a GPU device loss causes the subsequent synchronous wait to return early, the function returns while the callback remains pending. Upon Dawn instance shutdown, the callback is fired, resulting in a 1-byte write to the now-invalid stack address.
Affected files:
gpu/command_buffer/service/shared_image/dawn_copy_strategy.ccthird_party/dawn/src/dawn/native/EventManager.cppthird_party/dawn/src/dawn/native/Buffer.cpp
Estimated timestamp from git blame: 2025-09-17
A potential stack-use-after-return (SUAR) vulnerability exists in gpu/command_buffer/service/shared_image/dawn_copy_strategy.cc within the CopyFromTextureToBacking method.
When synchronizing data from a Dawn texture to a non-Dawn backing (e.g., during fallback interop on Android), the code utilizes staging buffers and maps them for reading using Dawn's MapAsync API. The implementation passes the address of a stack-local boolean variable success as the userdata for the callback:
// gpu/command_buffer/service/shared_image/dawn_copy_strategy.cc:337
bool success = false;
wgpu::FutureWaitInfo wait_info = {staging_buffer_entry.buffer.MapAsync(
wgpu::MapMode::Read, 0, wgpu::kWholeMapSize,
wgpu::CallbackMode::WaitAnyOnly,
[](wgpu::MapAsyncStatus status, wgpu::StringView, bool* success) {
*success = status == wgpu::MapAsyncStatus::Success;
},
&success)};
The function then blocks on a synchronous wait using device.GetAdapter().GetInstance().WaitAny (line 346). If this wait returns a non-success status (e.g., TimedOut or InstanceLost), which can be induced by a compromised renderer causing a GPU hang (TDR), the function returns early at line 349.
At this point, the stack unwinds and the success variable is destroyed. However, because the callback used wgpu::CallbackMode::WaitAnyOnly, it remains tracked by Dawn's EventManager until it is either completed or the EventManager itself is destroyed.
When the GPU channel or WebGPU connection is closed, the wgpu::Instance is destroyed, invoking the EventManager destructor (third_party/dawn/src/dawn/native/EventManager.cpp). The destructor iterates through all pending events and executes their callbacks with an EventCompletionType::Shutdown status (line 252). This triggers the dangling MapAsync callback, which performs a 1-byte write (0x00) to the now-invalid stack address.
Potential Attack Steps
- A compromised renderer process creates or identifies a
SharedImagethat requires theDawnCopyStrategyfallback path (e.g., a GLES-backed image on a Dawn Vulkan backend). - The renderer triggers an operation that invokes
DawnCopyStrategy::CopyFromTextureToBacking, such asEndAccesson aDawnFallbackImageRepresentation. - The renderer simultaneously induces a GPU device loss (e.g., via a long-running shader) to force the
WaitAnycall in the GPU process to return early. - The renderer closes its connection to the GPU process, triggering the
EventManagerdestruction and the resulting stack corruption.
On platforms like Android, where the GPU process may have limited sandboxing compared to the Renderer, this primitive represents a significant security risk.
Suggested Fix
Avoid passing pointers to stack-local variables to asynchronous callbacks. The synchronization should be refactored to ensure that the lifetime of the userdata is managed correctly (e.g., using a heap-allocated state object) or that the callback is explicitly cancelled/completed before the stack frame is destroyed.
Evaluated with Chrome root at commit: 1a8d40fc44df2088d5945c0bf53584038aa1614a
Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:
- If you are familiar with the severity guidelines, you may adjust the severity.
- If this is a false positive, and there's no work to be done, please close as WAI.
- If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.
Data from false positives will be used to improve accuracy over time. And please feel free to reach out to me directly if you have concerns or feedback on the project.
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
The code passed the address of a stack-local variable to an asynchronous callback that could outlive the stack frame, because the early return on a failed wait left the callback pending in Dawn's event manager.
Impact
A compromised renderer could corrupt GPU process stack memory with a single byte, which the report says is a significant risk on platforms such as Android where GPU process sandboxing may be weaker.
What the attacker needed
Compromised renderer process; ability to trigger a GPU device loss
The fix
The report suggests avoiding stack pointers in asynchronous callbacks by using a heap-allocated state object or cancelling the callback before the stack frame is destroyed.
How it was found
- A compromised renderer creates or finds a SharedImage that uses the DawnCopyStrategy fallback path.
- The renderer triggers CopyFromTextureToBacking, for example via EndAccess on a DawnFallbackImageRepresentation.
- The renderer also causes a GPU device loss so the synchronous wait returns early.
- The renderer closes its GPU process connection, destroying the EventManager and firing the stale callback.
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 program asks the graphics driver to copy data, it can hand over a small note saying 'tell me when it's done' and a place to write the answer. Here that place was a temporary variable on the function's short-lived working area (the stack), and the function gave up waiting and returned before the answer arrived. Much later the driver wrote the answer into that reused memory, corrupting whatever was there.
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.