Heap buffer overflow in Dawn (CVE-2026-17758)
Dawn's blob cache loads a value in two separate calls: the first asks for the size, the second fills a buffer allocated to that size. If the same cache key is replaced with a larger value between the two calls, Chromium's cache read copies the larger entry into the smaller heap buffer, causing a heap buffer overflow.
Originally disclosed on Chrome VRP
- Fix shipped in 3 months
VULNERABILITY DETAILS
Summary
Dawn's BlobCache::LoadInternal() uses a two-call cache loading API: the first callback call queries the value size, then Dawn allocates a buffer of exactly that size, and the second callback call fills the buffer. The code only checks whether the second returned size changed after the second callback has already written into the buffer.
In Chromium's WebGPU cache backend, DawnCachingInterface::LoadData() forwards the requested buffer size into MemoryCacheEntry::ReadData(), but ReadData() only enforces equal sizes with DCHECK. In release builds it copies the complete stored value into the caller's pointer even if the caller provided a smaller value_size.
If the same cache key is replaced with a larger value between Dawn's first and second cache load calls, the second load can copy the larger Chromium cache entry into Dawn's smaller heap allocation.
Root cause analysis
// src/third_party/dawn/src/dawn/native/BlobCache.cpp
BlobCache::BlobCache(const dawn::native::DawnCacheDeviceDescriptor& desc, bool enableHashValidation)
: mHashValidation(enableHashValidation),
mLoadFunction(desc.loadDataFunction),
mStoreFunction(desc.storeDataFunction),
mFunctionUserdata(desc.functionUserdata) {}
ResultOrError<Blob> BlobCache::Load(const CacheKey& key) {
return LoadInternal(key);
}
void BlobCache::Store(const CacheKey& key, size_t valueSize, const void* value) {
StoreInternal(key, valueSize, value);
}
void BlobCache::Store(const CacheKey& key, const Blob& value) {
Store(key, value.Size(), value.Data());
}
Blob BlobCache::GenerateActualStoredBlobForTesting(size_t valueSize, const void* value) {
if (!mHashValidation) {
Blob blob = CreateBlob(valueSize);
memcpy(blob.Data(), value, valueSize);
return blob;
}
return details::GenerateHashPrefixedPayload(valueSize, value);
}
void BlobCache::StoreInternal(const CacheKey& key, size_t valueSize, const void* value) {
DAWN_ASSERT(ValidateCacheKey(key));
DAWN_ASSERT(value != nullptr);
DAWN_ASSERT(valueSize > 0);
if (mStoreFunction == nullptr) {
return;
}
// Call the actual store function for actual stored bytes.
if (!mHashValidation) {
mStoreFunction(key.data(), key.size(), value, valueSize, mFunctionUserdata);
} else {
Blob actualStoredBlob = details::GenerateHashPrefixedPayload(valueSize, value);
mStoreFunction(key.data(), key.size(), actualStoredBlob.Data(), actualStoredBlob.Size(),
mFunctionUserdata);
}
}
ResultOrError<Blob> BlobCache::LoadInternal(const CacheKey& key) {
DAWN_ASSERT(ValidateCacheKey(key));
if (mLoadFunction == nullptr) {
return Blob();
}
const size_t expectedSize =
mLoadFunction(key.data(), key.size(), nullptr, 0, mFunctionUserdata);
// Non-zero size indicates cache hit
if (expectedSize > 0) {
// Load bytes from cache.
uint8_t* buffer = new uint8_t[expectedSize];
const size_t actualSize =
mLoadFunction(key.data(), key.size(), buffer, expectedSize, mFunctionUserdata);
// TODO(crbug.com/469351711): If `mLoadFunction` returns a different size on the second call
// (due to external cache eviction, I/O errors, or timeouts), treat it as a cache miss. The
// blob cache API should be updated to a single `mLoadFunction` call in the future.
if (expectedSize != actualSize) {
delete[] buffer;
return Blob();
}
if (!mHashValidation) {
return Blob::UnsafeCreateWithDeleter(buffer, actualSize, [=]() { delete[] buffer; });
}
return details::CheckAndUnpackHashPrefixedPayload(buffer, expectedSize);
}
return Blob();
}
The first bug is the non-atomic size-query/load pattern. expectedSize comes from a first callback invocation, but the actual bytes are fetched by a second callback invocation with no cache entry pinning or Dawn-side lock. If the backing cache returns a different, larger value during the second call, Dawn has already allocated only expectedSize bytes. The mismatch check at expectedSize != actualSize is conceptually correct for detecting stale cache data, but it is placed after the write to buffer, so it cannot prevent an oversized callee from corrupting the heap.
// src/gpu/command_buffer/service/dawn_caching_interface.cc
size_t DawnCachingInterface::LoadData(const void* key,
size_t key_size,
void* value_out,
size_t value_size) {
if (memory_cache() == nullptr) {
return 0u;
}
std::string_view key_str(static_cast<const char*>(key), key_size);
auto entry = memory_cache()->Find(key_str);
if (!entry) {
return 0u;
}
return entry->ReadData(value_out, value_size);
}
void DawnCachingInterface::StoreData(const void* key,
size_t key_size,
const void* value,
size_t value_size) {
if (memory_cache() == nullptr || value == nullptr || value_size <= 0) {
return;
}
std::string key_str(static_cast<const char*>(key), key_size);
memory_cache()->Store(
key_str, UNSAFE_BUFFERS(
base::span(static_cast<const uint8_t*>(value), value_size)));
// Send the cache entry to be stored on the host-side if applicable.
if (cache_blob_callback_) {
std::string value_str(static_cast<const char*>(value), value_size);
cache_blob_callback_.Run(key_str, value_str);
}
}
This is the Chromium WebGPU cache adapter used by Dawn. It does not preserve the MemoryCacheEntry from Dawn's first size query across Dawn's second load call. Each LoadData() call performs a fresh memory_cache()->Find(key_str). Therefore a concurrent or interleaved StoreData() for the same key can cause the first Dawn load to observe entry A and the second Dawn load to observe larger entry B. StoreData() also replaces existing keys through MemoryCache::Store().
// src/gpu/command_buffer/service/memory_cache.cc
size_t MemoryCacheEntry::DataSize() const {
return data_.size();
}
size_t MemoryCacheEntry::ReadData(void* value_out, size_t value_size) const {
// First handle "peek" case where use is trying to get the size of the entry.
if (value_out == nullptr && value_size == 0) {
return DataSize();
}
// Otherwise, verify that the size that is being copied out is identical.
DCHECK(value_size == DataSize());
std::copy(data_.begin(), data_.end(), static_cast<uint8_t*>(value_out));
return value_size;
}
base::span<const uint8_t> MemoryCacheEntry::Data() const {
return data_;
}
This is the sink. ReadData() treats (nullptr, 0) as a size query, but for the actual read it only uses DCHECK(value_size == DataSize()). In release builds, the DCHECK is removed and std::copy(data_.begin(), data_.end(), value_out) copies the whole cached value. If Dawn passes a buffer of size expectedSize but the fresh cache entry has DataSize() > expectedSize, this function writes past Dawn's allocation.
// src/gpu/command_buffer/service/memory_cache.cc
scoped_refptr<MemoryCacheEntry> MemoryCache::Find(std::string_view key) {
// Because we are tracking LRU, even loads modify internal state so mutex is
// required.
base::AutoLock lock(mutex_);
auto it = entries_.find(key);
if (it == entries_.end()) {
return nullptr;
}
if (!cache_hit_trace_event_.empty()) {
TRACE_EVENT0("gpu", cache_hit_trace_event_.c_str());
}
// Even if this was just a "peek" operation to get size, the entry was
// accessed so move it to the back of the eviction queue.
scoped_refptr<MemoryCacheEntry>& entry = *it;
entry->RemoveFromList();
lru_.Append(entry.get());
return entry;
}
scoped_refptr<MemoryCacheEntry> MemoryCache::Store(
std::string_view key,
base::span<const uint8_t> data) {
base::AutoLock lock(mutex_);
EvictEntry(key);
if (!CanFitMemoryCacheEntry(key.size() + data.size())) {
return nullptr;
}
auto entry = base::MakeRefCounted<MemoryCacheEntry>(key, data);
InsertEntry(entry);
return entry;
}
scoped_refptr<MemoryCacheEntry> MemoryCache::Store(
std::string_view key,
base::HeapArray<uint8_t> data) {
base::AutoLock lock(mutex_);
EvictEntry(key);
if (!CanFitMemoryCacheEntry(key.size() + data.size())) {
return nullptr;
}
auto entry = base::MakeRefCounted<MemoryCacheEntry>(key, std::move(data));
InsertEntry(entry);
return entry;
}
MemoryCache has a mutex for individual map operations, but the mutex does not cover Dawn's whole two-call load sequence. The first Find() can return the old entry size, then Store() can evict that key and insert a larger entry, and then the second Find() can return the new entry. The developer mistake is treating two independent cache operations as if they formed one stable transaction and relying on a debug-only size assertion at the sink.
// src/gpu/config/gpu_finch_features.cc
// Enable WebGPU on gpu service side only. This is used with origin trial and
// enabled by default on supported platforms.
#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || \
BUILDFLAG(IS_ANDROID) || BUILDFLAG(USE_WEBGPU_ON_VULKAN_VIA_GL_INTEROP)
#define WEBGPU_ENABLED base::FEATURE_ENABLED_BY_DEFAULT
#else
#define WEBGPU_ENABLED base::FEATURE_DISABLED_BY_DEFAULT
#endif
BASE_FEATURE(kWebGPUService, WEBGPU_ENABLED);
BASE_FEATURE(kWebGPUBlobCache, WEBGPU_ENABLED);
#undef WEBGPU_ENABLED
WebGPU blob cache is enabled by default on supported platforms. A normal web page can reach WebGPU device and pipeline creation APIs when WebGPU is available. This makes the cache path browser-exposed, although the exact same-key size growth condition still needs a reliable page-controlled trigger.
// src/gpu/command_buffer/service/webgpu_decoder_impl.cc
dawn_platform_(new DawnPlatform(
base::FeatureList::IsEnabled(features::kWebGPUBlobCache)
? std::move(dawn_caching_interface)
: nullptr,
/*progress_reporter=*/nullptr,
/*uma_prefix=*/"GPU.WebGPU.",
/*record_cache_count_uma=*/false)),
// src/gpu/command_buffer/service/webgpu_decoder_impl.cc
// Dawn caching isolation key information needs to be passed per device. If an
// isolation key is empty, we do not pass this extra descriptor, and disable
// the blob cache via toggles above.
wgpu::DawnCacheDeviceDescriptor dawn_cache;
if (!isolation_key_->empty()) {
dawn_cache.isolationKey = isolation_key_->c_str();
ChainStruct(desc, &dawn_cache);
}
Chrome's WebGPU decoder passes Chromium's Dawn cache implementation into DawnPlatform and enables per-device Dawn caching when the isolation key is present. The source-to-sink path is therefore: page WebGPU operation -> Dawn cache lookup -> DawnCachingInterface::LoadData() -> MemoryCacheEntry::ReadData() -> OOB write into Dawn's heap buffer if the same key grew between the two load calls.
// src/third_party/dawn/src/dawn/native/PipelineCache.cpp
MaybeError PipelineCacheBase::Flush() {
// Try to write the data out to the persistent cache.
Blob blob;
DAWN_TRY(SerializeToBlobImpl(&blob));
if (blob.Size() > 0) {
// Using a simple heuristic to decide whether to write out the blob right now. May need
// smarter tracking when we are dealing with monolithic caches.
mCache->Store(mKey, blob);
}
return {};
}
MaybeError PipelineCacheBase::DidCompilePipeline() {
DAWN_ASSERT(mInitialized);
if (mStoreOnIdle) {
// Assume pipeline cache was modified by compiling a pipeline. It will be stored in
// BlobCache at some later point in StoreOnIdle() if necessary.
mNeedsStore.store(true, std::memory_order_relaxed);
} else {
// TODO(dawn:549): Flush is currently synchronously happening on the same thread as pipeline
// compilation, but it's perhaps deferrable.
if (!CacheHit()) {
return Flush();
}
}
return {};
}
Dawn stores compiled shader and pipeline data in BlobCache. For a same-key size race, the important requirement is that the same cache key can be stored again with a larger value. The HTML PoC triggers same-key cache growth and reaches the vulnerable DawnCachingInterface::LoadData() to MemoryCacheEntry::ReadData() copy path when Chrome runs with a Vulkan-backed WebGPU/Dawn backend.
VERSION
Chromium revision: 2756f8ee1f15554eacec5d4ed336abd87101a446
Dawn revision: 254f203ab3198c692e78162947e5e1abbedbc92b
Dawn commit that introduced the vulnerable two-call load pattern according to blame:
86578e2fc03 - BlobCache::LoadInternal() lines 139-151.
Related Dawn commit that added the late mismatch check but still checks after the write:
fbfb4497e03 - BlobCache::LoadInternal() lines 152-158.
Chromium commit related to the sink according to blame:
d9d773bff86705 - MemoryCacheEntry::ReadData() copies data_.begin() to value_out after debug-only size validation.
Chromium commit related to the WebGPU cache adapter according to blame:
94d888ff461204 - DawnCachingInterface::LoadData() calls memory_cache()->Find() and entry->ReadData(value_out, value_size).
REPRODUCTION CASE
Host/reproduction environment:
OS: Ubuntu 24.04.3 LTS
GPU render node: /dev/dri/renderD128
GPU card node: /dev/dri/card1
Local build configuration:
is_asan = true
is_debug = false
dcheck_always_on = false
symbol_level = 2
Apply poc.patch for easier reproduction:
diff --git a/gpu/command_buffer/service/dawn_caching_interface.cc b/gpu/command_buffer/service/dawn_caching_interface.cc
index 2d470a9312d87..ff5c2ece7e26f 100644
--- a/gpu/command_buffer/service/dawn_caching_interface.cc
+++ b/gpu/command_buffer/service/dawn_caching_interface.cc
@@ -13,6 +13,8 @@
#include "base/memory/ptr_util.h"
#include "base/strings/stringprintf.h"
#include "base/task/single_thread_task_runner.h"
+#include "base/threading/platform_thread.h"
+#include "base/time/time.h"
#include "base/trace_event/memory_dump_manager.h"
#include "base/trace_event/memory_dump_request_args.h"
#include "base/trace_event/trace_event.h"
@@ -21,6 +23,12 @@
namespace gpu::webgpu {
+namespace {
+
+constexpr base::TimeDelta kBlobCacheOobPeekDelay = base::Milliseconds(2);
+
+} // namespace
+
DawnCachingInterface::DawnCachingInterface(scoped_refptr<MemoryCache> backend,
CacheBlobCallback callback)
: memory_cache_backend_(std::move(backend)),
@@ -41,7 +49,11 @@ size_t DawnCachingInterface::LoadData(const void* key,
if (!entry) {
return 0u;
}
- return entry->ReadData(value_out, value_size);
+ const size_t returned_size = entry->ReadData(value_out, value_size);
+ if (value_out == nullptr && value_size == 0) {
+ base::PlatformThread::Sleep(kBlobCacheOobPeekDelay);
+ }
+ return returned_size;
}
void DawnCachingInterface::StoreData(const void* key,
Build:
autoninja -C out/asan chrome
Serve the HTML PoC:
python3 -m http.server 8765 --bind 127.0.0.1
Use a GPU-backed display. Because my local display session was not using DRI3 with the render node, I created a separate GPU-backed display for reproduction:
Xvnc :2 -ac -hw3d -drinode /dev/dri/renderD128 -geometry 1280x720 -depth 24 -noWebsocket -rfbport 5992 -localhost -SecurityTypes None
The display was verified to use the Intel Mesa renderer:
DISPLAY=:2 glxinfo -B
Execute:
DISPLAY=:2 \
/home/slave/chromium-bug-bounty/chromium/src/out/asan/chrome \
--no-sandbox \
--enable-features=Vulkan \
'http://127.0.0.1:8765/chrome-webgpu-blob-cache-race-poc.html?mode=samekey&workers=4&workerIterations=1&complexity=64&hitDelayMs=100' > ./asan.log 2>&1
Result:
...
Warning: maxDynamicStorageBuffersPerPipelineLayout artificially reduced from 500000 to 16 to fit dynamic offset allocation limit.
Warning: maxDynamicUniformBuffersPerPipelineLayout artificially reduced from 500000 to 16 to fit dynamic offset allocation limit.
Warning: maxDynamicStorageBuffersPerPipelineLayout artificially reduced from 500000 to 16 to fit dynamic offset allocation limit.
=================================================================
==250513==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x77a1b624e54c at pc 0x584ad9997908 bp 0x758150fc9d70 sp 0x758150fc9530
WRITE of size 11900 at 0x77a1b624e54c thread T58 (ThreadPoolForeg)
#0 0x584ad9997907 in __asan_memmove (/home/slave/chromium-bug-bounty/chromium/src/out/asan/chrome+0x10fd1907) (BuildId: 8515f221df06fcdf)
#1 0x584afb87a5ca in gpu::MemoryCacheEntry::ReadData(void*, unsigned long) const gen/third_party/libc++/src/include/__string/constexpr_c_functions.h:227:5
#2 0x584afbb00245 in gpu::webgpu::DawnCachingInterface::LoadData(void const*, unsigned long, void*, unsigned long) gpu/command_buffer/service/dawn_caching_interface.cc:52:39
#3 0x584adb9521e7 in dawn::native::BlobCache::LoadInternal(dawn::native::CacheKey const&) third_party/dawn/src/dawn/native/BlobCache.cpp:151:13
#4 0x584adbae09b7 in dawn::native::PipelineCacheBase::Initialize() third_party/dawn/src/dawn/native/PipelineCache.cpp:40:31
#5 0x584adbdff6d8 in dawn::native::vulkan::PipelineCache::Initialize() third_party/dawn/src/dawn/native/vulkan/PipelineCacheVk.cpp:115:36
#6 0x584adbdff58b in dawn::native::vulkan::PipelineCache::Create(dawn::native::vulkan::Device*, dawn::native::CacheKey const&) third_party/dawn/src/dawn/native/vulkan/PipelineCacheVk.cpp:45:12
#7 0x584adbdb62d5 in dawn::native::vulkan::Device::GetOrCreatePipelineCacheImpl(dawn::native::CacheKey const&) third_party/dawn/src/dawn/native/vulkan/DeviceVk.cpp:282:12
#8 0x584adb9eb018 in dawn::native::DeviceBase::GetOrCreatePipelineCache(dawn::native::CacheKey const&) third_party/dawn/src/dawn/native/Device.cpp:1175:12
#9 0x584adbd9fa76 in dawn::native::vulkan::ComputePipeline::InitializeSpecialization(dawn::native::vulkan::CommonPipelineSpecialization const&, bool) third_party/dawn/src/dawn/native/vulkan/ComputePipelineVk.cpp:190:55
#10 0x584adbd9eb67 in dawn::native::vulkan::ComputePipeline::InitializeImpl() third_party/dawn/src/dawn/native/vulkan/ComputePipelineVk.cpp:70:24
#11 0x584adb9ca83c in dawn::native::ComputePipelineBase::InitializeWithShaders() third_party/dawn/src/dawn/native/ComputePipeline.cpp:76:37
#12 0x584adbad6677 in dawn::native::PipelineBase::Initialize(std::__Cr::optional<dawn::native::PerStage<dawn::native::APIRef<dawn::native::ShaderModuleBase>>>) third_party/dawn/src/dawn/native/Pipeline.cpp:445:22
#13 0x584adb9d6abe in dawn::native::CreatePipelineAsyncEvent<dawn::native::ComputePipelineBase, WGPUCreateComputePipelineAsyncCallbackInfo>::InitializeImpl(bool) third_party/dawn/src/dawn/native/CreatePipelineAsyncEvent.cpp:152:33
#14 0x584adb8ec75b in dawn::native::AsyncTask::Run() gen/third_party/libc++/src/include/__functional/function.h:502:12
#15 0x584adb8ed7e6 in dawn::native::AsyncTaskManager::RunTask(void*) third_party/dawn/src/dawn/native/AsyncTask.cpp:169:16
#16 0x584afb27ec33 in gpu::webgpu::(anonymous namespace)::AsyncWorkerTaskPool::RunWorkerTask(void (*)(void*), void*, gl::ProgressReporter*, scoped_refptr<gpu::webgpu::(anonymous namespace)::AsyncWaitableEventImpl>) gpu/command_buffer/service/dawn_platform.cc:123:5
#17 0x584afb27f51a in base::internal::Invoker<base::internal::FunctorTraits<void (*&&)(void (*)(void*), void*, gl::ProgressReporter*, scoped_refptr<gpu::webgpu::(anonymous namespace)::AsyncWaitableEventImpl>), void (*&&)(void*), void*&&, base::raw_ptr<gl::ProgressReporter, (partition_alloc::internal::RawPtrTraits)0>&&, scoped_refptr<gpu::webgpu::(anonymous namespace)::AsyncWaitableEventImpl>&&>, base::internal::BindState<false, true, false, void (*)(void (*)(void*), void*, gl::ProgressReporter*, scoped_refptr<gpu::webgpu::(anonymous namespace)::AsyncWaitableEventImpl>), base::internal::UnretainedWrapper<void (void*), base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0>, base::internal::UnretainedWrapper<void, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0>, base::internal::UnretainedWrapper<gl::ProgressReporter, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0>, scoped_refptr<gpu::webgpu::(anonymous namespace)::AsyncWaitableEventImpl>>, void ()>::RunOnce(base::internal::BindStateBase*) base/functional/bind_internal.h:673:12
#18 0x584af1cee9c3 in base::TaskAnnotator::RunTaskImpl(base::PendingTask&) base/functional/callback.h:155:12
#19 0x584af1d878c2 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
#20 0x584af1d87b0c 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
#21 0x584af1d860f9 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
#22 0x584af1d85382 in base::internal::TaskTracker::RunAndPopNextTask(base::internal::RegisteredTaskSource) base/task/thread_pool/task_tracker.cc:393:5
#23 0x584af1dca2b3 in base::internal::WorkerThread::RunWorker() base/task/thread_pool/worker_thread.cc:473:36
#24 0x584af1dc93f4 in base::internal::WorkerThread::RunPooledWorker() base/task/thread_pool/worker_thread.cc:359:3
#25 0x584af1dc8e5b in base::internal::WorkerThread::ThreadMain() base/task/thread_pool/worker_thread.cc:339:7
#26 0x584af1e5263e in base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:102:13
#27 0x584ad9996f16 in asan_thread_start(void*) asan_interceptors.cpp
0x77a1b624e54c is located 0 bytes after 5196-byte region [0x77a1b624d100,0x77a1b624e54c)
allocated by thread T58 (ThreadPoolForeg) here:
#0 0x584ad99d26ad in operator new[](unsigned long) (/home/slave/chromium-bug-bounty/chromium/src/out/asan/chrome+0x1100c6ad) (BuildId: 8515f221df06fcdf)
#1 0x584adb95217c in dawn::native::BlobCache::LoadInternal(dawn::native::CacheKey const&) third_party/dawn/src/dawn/native/BlobCache.cpp:149:27
#2 0x584adbae09b7 in dawn::native::PipelineCacheBase::Initialize() third_party/dawn/src/dawn/native/PipelineCache.cpp:40:31
#3 0x584adbdff6d8 in dawn::native::vulkan::PipelineCache::Initialize() third_party/dawn/src/dawn/native/vulkan/PipelineCacheVk.cpp:115:36
#4 0x584adbdff58b in dawn::native::vulkan::PipelineCache::Create(dawn::native::vulkan::Device*, dawn::native::CacheKey const&) third_party/dawn/src/dawn/native/vulkan/PipelineCacheVk.cpp:45:12
#5 0x584adbdb62d5 in dawn::native::vulkan::Device::GetOrCreatePipelineCacheImpl(dawn::native::CacheKey const&) third_party/dawn/src/dawn/native/vulkan/DeviceVk.cpp:282:12
#6 0x584adb9eb018 in dawn::native::DeviceBase::GetOrCreatePipelineCache(dawn::native::CacheKey const&) third_party/dawn/src/dawn/native/Device.cpp:1175:12
#7 0x584adbd9fa76 in dawn::native::vulkan::ComputePipeline::InitializeSpecialization(dawn::native::vulkan::CommonPipelineSpecialization const&, bool) third_party/dawn/src/dawn/native/vulkan/ComputePipelineVk.cpp:190:55
#8 0x584adbd9eb67 in dawn::native::vulkan::ComputePipeline::InitializeImpl() third_party/dawn/src/dawn/native/vulkan/ComputePipelineVk.cpp:70:24
#9 0x584adb9ca83c in dawn::native::ComputePipelineBase::InitializeWithShaders() third_party/dawn/src/dawn/native/ComputePipeline.cpp:76:37
#10 0x584adbad6677 in dawn::native::PipelineBase::Initialize(std::__Cr::optional<dawn::native::PerStage<dawn::native::APIRef<dawn::native::ShaderModuleBase>>>) third_party/dawn/src/dawn/native/Pipeline.cpp:445:22
#11 0x584adb9d6abe in dawn::native::CreatePipelineAsyncEvent<dawn::native::ComputePipelineBase, WGPUCreateComputePipelineAsyncCallbackInfo>::InitializeImpl(bool) third_party/dawn/src/dawn/native/CreatePipelineAsyncEvent.cpp:152:33
#12 0x584adb8ec75b in dawn::native::AsyncTask::Run() gen/third_party/libc++/src/include/__functional/function.h:502:12
#13 0x584adb8ed7e6 in dawn::native::AsyncTaskManager::RunTask(void*) third_party/dawn/src/dawn/native/AsyncTask.cpp:169:16
#14 0x584afb27ec33 in gpu::webgpu::(anonymous namespace)::AsyncWorkerTaskPool::RunWorkerTask(void (*)(void*), void*, gl::ProgressReporter*, scoped_refptr<gpu::webgpu::(anonymous namespace)::AsyncWaitableEventImpl>) gpu/command_buffer/service/dawn_platform.cc:123:5
#15 0x584afb27f51a in base::internal::Invoker<base::internal::FunctorTraits<void (*&&)(void (*)(void*), void*, gl::ProgressReporter*, scoped_refptr<gpu::webgpu::(anonymous namespace)::AsyncWaitableEventImpl>), void (*&&)(void*), void*&&, base::raw_ptr<gl::ProgressReporter, (partition_alloc::internal::RawPtrTraits)0>&&, scoped_refptr<gpu::webgpu::(anonymous namespace)::AsyncWaitableEventImpl>&&>, base::internal::BindState<false, true, false, void (*)(void (*)(void*), void*, gl::ProgressReporter*, scoped_refptr<gpu::webgpu::(anonymous namespace)::AsyncWaitableEventImpl>), base::internal::UnretainedWrapper<void (void*), base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0>, base::internal::UnretainedWrapper<void, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0>, base::internal::UnretainedWrapper<gl::ProgressReporter, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0>, scoped_refptr<gpu::webgpu::(anonymous namespace)::AsyncWaitableEventImpl>>, void ()>::RunOnce(base::internal::BindStateBase*) base/functional/bind_internal.h:673:12
#16 0x584af1cee9c3 in base::TaskAnnotator::RunTaskImpl(base::PendingTask&) base/functional/callback.h:155:12
#17 0x584af1d878c2 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
#18 0x584af1d87b0c 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
#19 0x584af1d860f9 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
#20 0x584af1d85382 in base::internal::TaskTracker::RunAndPopNextTask(base::internal::RegisteredTaskSource) base/task/thread_pool/task_tracker.cc:393:5
#21 0x584af1dca2b3 in base::internal::WorkerThread::RunWorker() base/task/thread_pool/worker_thread.cc:473:36
#22 0x584af1dc93f4 in base::internal::WorkerThread::RunPooledWorker() base/task/thread_pool/worker_thread.cc:359:3
#23 0x584af1dc8e5b in base::internal::WorkerThread::ThreadMain() base/task/thread_pool/worker_thread.cc:339:7
#24 0x584af1e5263e in base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:102:13
#25 0x584ad9996f16 in asan_thread_start(void*) asan_interceptors.cpp
Thread T58 (ThreadPoolForeg) created by T45 (ThreadPoolForeg) here:
#0 0x584ad997cd91 in pthread_create (/home/slave/chromium-bug-bounty/chromium/src/out/asan/chrome+0x10fb6d91) (BuildId: 8515f221df06fcdf)
#1 0x584af1e51c92 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 0x584af1dc7ba4 in base::internal::WorkerThread::Start(scoped_refptr<base::SingleThreadTaskRunner>, base::WorkerThreadObserver*) base/task/thread_pool/worker_thread.cc:185:3
#3 0x584af1dbf165 in base::internal::ThreadGroup::BaseScopedCommandsExecutor::Flush() base/task/thread_pool/thread_group.cc:65:13
#4 0x584af1dbee20 in base::internal::ThreadGroup::BaseScopedCommandsExecutor::~BaseScopedCommandsExecutor() base/task/thread_pool/thread_group.cc:56:3
#5 0x584af1db6d51 in base::internal::ThreadGroupImpl::WorkerDelegate::GetWork(base::internal::WorkerThread*) base/task/thread_pool/thread_group_impl.cc:71:3
#6 0x584af1dca0d3 in base::internal::WorkerThread::RunWorker() base/task/thread_pool/worker_thread.cc:460:52
#7 0x584af1dc93f4 in base::internal::WorkerThread::RunPooledWorker() base/task/thread_pool/worker_thread.cc:359:3
#8 0x584af1dc8e5b in base::internal::WorkerThread::ThreadMain() base/task/thread_pool/worker_thread.cc:339:7
#9 0x584af1e5263e in base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:102:13
#10 0x584ad9996f16 in asan_thread_start(void*) asan_interceptors.cpp
Thread T45 (ThreadPoolForeg) created by T35 (ThreadPoolForeg) here:
#0 0x584ad997cd91 in pthread_create (/home/slave/chromium-bug-bounty/chromium/src/out/asan/chrome+0x10fb6d91) (BuildId: 8515f221df06fcdf)
#1 0x584af1e51c92 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 0x584af1dc7ba4 in base::internal::WorkerThread::Start(scoped_refptr<base::SingleThreadTaskRunner>, base::WorkerThreadObserver*) base/task/thread_pool/worker_thread.cc:185:3
#3 0x584af1dbf165 in base::internal::ThreadGroup::BaseScopedCommandsExecutor::Flush() base/task/thread_pool/thread_group.cc:65:13
#4 0x584af1dbee20 in base::internal::ThreadGroup::BaseScopedCommandsExecutor::~BaseScopedCommandsExecutor() base/task/thread_pool/thread_group.cc:56:3
#5 0x584af1db6d51 in base::internal::ThreadGroupImpl::WorkerDelegate::GetWork(base::internal::WorkerThread*) base/task/thread_pool/thread_group_impl.cc:71:3
#6 0x584af1dca0d3 in base::internal::WorkerThread::RunWorker() base/task/thread_pool/worker_thread.cc:460:52
#7 0x584af1dc93f4 in base::internal::WorkerThread::RunPooledWorker() base/task/thread_pool/worker_thread.cc:359:3
#8 0x584af1dc8e5b in base::internal::WorkerThread::ThreadMain() base/task/thread_pool/worker_thread.cc:339:7
#9 0x584af1e5263e in base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:102:13
#10 0x584ad9996f16 in asan_thread_start(void*) asan_interceptors.cpp
Thread T35 (ThreadPoolForeg) created by T0 (chrome) here:
#0 0x584ad997cd91 in pthread_create (/home/slave/chromium-bug-bounty/chromium/src/out/asan/chrome+0x10fb6d91) (BuildId: 8515f221df06fcdf)
#1 0x584af1e51c92 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 0x584af1dc7ba4 in base::internal::WorkerThread::Start(scoped_refptr<base::SingleThreadTaskRunner>, base::WorkerThreadObserver*) base/task/thread_pool/worker_thread.cc:185:3
#3 0x584af1dbf165 in base::internal::ThreadGroup::BaseScopedCommandsExecutor::Flush() base/task/thread_pool/thread_group.cc:65:13
#4 0x584af1dbee20 in base::internal::ThreadGroup::BaseScopedCommandsExecutor::~BaseScopedCommandsExecutor() base/task/thread_pool/thread_group.cc:56:3
#5 0x584af1db47f4 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 0x584af1d8d5e7 in base::internal::ThreadPoolImpl::Start(base::ThreadPoolInstance::InitParams const&, base::WorkerThreadObserver*) base/task/thread_pool/thread_pool_impl.cc:241:35
#7 0x584af1dc693c in base::ThreadPoolInstance::StartWithDefaultParams() base/task/thread_pool/thread_pool_instance.cc:95:3
#8 0x584afe0e6642 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:114:20
#9 0x584afd6299fd in content::GpuMain(content::MainFunctionParams) content/gpu/gpu_main.cc:426:16
#10 0x584aedd8600f in content::RunZygote(content::ContentMainDelegate*) content/app/content_main_runner_impl.cc:665:14
#11 0x584aedd87347 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
#12 0x584aedd8a2b8 in content::ContentMainRunnerImpl::Run() content/app/content_main_runner_impl.cc:1164:10
#13 0x584aedd83a11 in content::RunContentProcess(content::ContentMainParams, content::ContentMainRunner*) content/app/content_main.cc:356:36
#14 0x584aedd8400c in content::ContentMain(content::ContentMainParams) content/app/content_main.cc:369:10
#15 0x584ad99d42a9 in ChromeMain chrome/app/chrome_main.cc:194:12
#16 0x7981b7a2a1c9 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#17 0x7981b7a2a28a in __libc_start_main csu/../csu/libc-start.c:360:3
#18 0x584ad98f9029 in _start (/home/slave/chromium-bug-bounty/chromium/src/out/asan/chrome+0x10f33029) (BuildId: 8515f221df06fcdf)
SUMMARY: AddressSanitizer: heap-buffer-overflow (/home/slave/chromium-bug-bounty/chromium/src/out/asan/chrome+0x10fd1907) (BuildId: 8515f221df06fcdf) in __asan_memmove
Shadow bytes around the buggy address:
0x77a1b624e280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x77a1b624e300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x77a1b624e380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x77a1b624e400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x77a1b624e480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x77a1b624e500: 00 00 00 00 00 00 00 00 00[04]fa fa fa fa fa fa
0x77a1b624e580: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x77a1b624e600: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x77a1b624e680: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x77a1b624e700: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x77a1b624e780: 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
==250513==ADDITIONAL INFO
==250513==Note: Please include this section with the ASan report.
Task trace:
#0 0x584afb27e24d in gpu::webgpu::(anonymous namespace)::AsyncWorkerTaskPool::PostWorkerTask(void (*)(void*), void*) gpu/command_buffer/service/dawn_platform.cc:99:9
#1 0x584ae4c3cdc2 in gpu::Scheduler::RunNextTask() gpu/command_buffer/service/scheduler.cc:649:27
#2 0x584ae4c3cdc2 in gpu::Scheduler::RunNextTask() gpu/command_buffer/service/scheduler.cc:649:27
#3 0x584ae4c3cdc2 in gpu::Scheduler::RunNextTask() gpu/command_buffer/service/scheduler.cc:649:27
Command line: `/proc/self/exe --type=gpu-process --no-sandbox --ozone-platform=x11 --crashpad-handler-pid=250455 --enable-crash-reporter=, --change-stack-guard-on-fork=enable --gpu-preferences=UAAAAAAAAAAgAQAEAAAAAAAAAAAAAMAAAgAAAAIAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAYAAAAAAAAABgAAAAAAAAAAQAAAAAAAAAIAAAAAAAAAAgAAAAAAAAA --shared-files --metrics-shmem-handle=4,i,7209806234512302793,10646766739262038649,262144 --field-trial-handle=3,i,930760376122516794,15094128488077092875,262144 --enable-features=Vulkan --variations-seed-version --pseudonymization-salt-handle=7,i,17392357467876290775,17762540892605258158,4 --trace-process-track-uuid=3190708988185955192`
==250513==END OF ADDITIONAL INFO
==250513==ABORTING
[251437:271836:0418/153449.465174:ERROR:gpu/ipc/client/command_buffer_proxy_impl.cc:285] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
[251437:271831:0418/153449.465177:ERROR:gpu/ipc/client/command_buffer_proxy_impl.cc:285] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
[251437:271835:0418/153449.465184:ERROR:gpu/ipc/client/command_buffer_proxy_impl.cc:285] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
[251437:271830:0418/153449.465184:ERROR:gpu/ipc/client/command_buffer_proxy_impl.cc:285] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
...
Type of crash: GPU-process AddressSanitizer heap-buffer-overflow
CREDIT INFORMATION
Reporter credit: Hyeonjun Ahn (@_deayzl)
Context
Dawn is the WebGPU implementation that Chromium ships, and it keeps a blob cache for compiled shader and pipeline data so that work does not have to be repeated across runs. The cache is a two-call API: Dawn first asks the backend how large a value is, allocates a buffer of exactly that size, then asks the backend to fill the buffer. Chromium plugs its own MemoryCache in behind that API through DawnCachingInterface, and the WebGPU blob cache is enabled by default on supported platforms.
The bug reported here is a heap buffer overflow in that hand-off. If the cache entry for a key grows between Dawn's size query and Dawn's fill call, Chromium copies the larger value into Dawn's smaller allocation. The report was filed against Google Chrome through the Chrome VRP by Hyeonjun Ahn (@_deayzl), rated medium severity, with a 5000.00 USD bounty, and disclosed on 2026-07-29 as CVE-2026-17758.
Setup
The researcher reproduced on a local Chromium build with AddressSanitizer enabled and DCHECKs off, which is the configuration where the sink's debug-only size check disappears:
is_asan = true
is_debug = false
dcheck_always_on = false
symbol_level = 2
The build was made with:
autoninja -C out/asan chrome
The host environment was:
OS: Ubuntu 24.04.3 LTS
GPU render node: /dev/dri/renderD128
GPU card node: /dev/dri/card1
The versions recorded in the report are:
| Component | Revision |
|---|---|
| Chromium | [redacted] |
| Dawn | [redacted] |
Blame pointed at four commits: 86578e2fc03 introduced the two-call load pattern in BlobCache::LoadInternal() (lines 139-151), fbfb4497e03 added the late mismatch check that still runs after the write (lines 152-158), d9d773bff86705 is the sink in MemoryCacheEntry::ReadData(), and 94d888ff461204 is the WebGPU cache adapter in DawnCachingInterface::LoadData().
Because the local display session was not using DRI3 with the render node, the researcher created a separate GPU-backed display:
Xvnc :2 -ac -hw3d -drinode /dev/dri/renderD128 -geometry 1280x720 -depth 24 -noWebsocket -rfbport 5992 -localhost -SecurityTypes None
and verified the renderer with:
DISPLAY=:2 glxinfo -B
Finding it
The researcher read BlobCache::LoadInternal() and saw that the size query and the data load are two independent callback invocations with nothing pinning the cache entry between them:
// src/third_party/dawn/src/dawn/native/BlobCache.cpp
ResultOrError<Blob> BlobCache::LoadInternal(const CacheKey& key) {
DAWN_ASSERT(ValidateCacheKey(key));
if (mLoadFunction == nullptr) {
return Blob();
}
const size_t expectedSize =
mLoadFunction(key.data(), key.size(), nullptr, 0, mFunctionUserdata);
// Non-zero size indicates cache hit
if (expectedSize > 0) {
// Load bytes from cache.
uint8_t* buffer = new uint8_t[expectedSize];
const size_t actualSize =
mLoadFunction(key.data(), key.size(), buffer, expectedSize, mFunctionUserdata);
// TODO(crbug.com/469351711): If `mLoadFunction` returns a different size on the second call
// (due to external cache eviction, I/O errors, or timeouts), treat it as a cache miss. The
// blob cache API should be updated to a single `mLoadFunction` call in the future.
if (expectedSize != actualSize) {
delete[] buffer;
return Blob();
}
if (!mHashValidation) {
return Blob::UnsafeCreateWithDeleter(buffer, actualSize, [=]() { delete[] buffer; });
}
return details::CheckAndUnpackHashPrefixedPayload(buffer, expectedSize);
}
return Blob();
}
The mismatch check expectedSize != actualSize is conceptually right for detecting stale cache data, but it runs after the second callback has already written into buffer. If the callee writes more than expectedSize bytes, the check is too late to protect the heap.
On the Chromium side, DawnCachingInterface::LoadData() looks up the entry fresh on every call and forwards the caller's buffer size to ReadData():
// src/gpu/command_buffer/service/dawn_caching_interface.cc
size_t DawnCachingInterface::LoadData(const void* key,
size_t key_size,
void* value_out,
size_t value_size) {
if (memory_cache() == nullptr) {
return 0u;
}
std::string_view key_str(static_cast<const char*>(key), key_size);
auto entry = memory_cache()->Find(key_str);
if (!entry) {
return 0u;
}
return entry->ReadData(value_out, value_size);
}
ReadData() is the sink. It treats (nullptr, 0) as a size query, but for the real read it only enforces equal sizes with a DCHECK:
// src/gpu/command_buffer/service/memory_cache.cc
size_t MemoryCacheEntry::ReadData(void* value_out, size_t value_size) const {
// First handle "peek" case where use is trying to get the size of the entry.
if (value_out == nullptr && value_size == 0) {
return DataSize();
}
// Otherwise, verify that the size that is being copied out is identical.
DCHECK(value_size == DataSize());
std::copy(data_.begin(), data_.end(), static_cast<uint8_t*>(value_out));
return value_size;
}
In release builds the DCHECK is compiled out, so std::copy writes the whole cached value regardless of the size the caller offered. The researcher also noted that MemoryCache::Store() replaces existing keys through EvictEntry(key), so a same-key store with a larger value is enough to change what the second Find() returns. The mutex in MemoryCache covers individual map operations, not Dawn's whole two-call sequence.
Exploitation
Step 1: make the race easy to hit
The researcher applied a patch that adds a short sleep after the size-query call, widening the window between the two loads:
diff --git a/gpu/command_buffer/service/dawn_caching_interface.cc b/gpu/command_buffer/service/dawn_caching_interface.cc
index 2d470a9312d87..ff5c2ece7e26 100644
--- a/gpu/command_buffer/service/dawn_caching_interface.cc
+++ b/gpu/command_buffer/service/dawn_caching_interface.cc
@@ -13,6 +13,8 @@
#include "base/memory/ptr_util.h"
#include "base/strings/stringprintf.h"
#include "base/task/single_thread_task_runner.h"
+#include "base/threading/platform_thread.h"
+#include "base/time/time.h"
#include "base/trace_event/memory_dump_manager.h"
#include "base/trace_event/memory_dump_request_args.h"
#include "base/trace_event/trace_event.h"
@@ -21,6 +23,12 @@
namespace gpu::webgpu {
+namespace {
+
+constexpr base::TimeDelta kBlobCacheOobPeekDelay = base::Milliseconds(2);
+
+} // namespace
+
DawnCachingInterface::DawnCachingInterface(scoped_refptr<MemoryCache> backend,
CacheBlobCallback callback)
: memory_cache_backend_(std::move(backend)),
@@ -41,7 +49,11 @@ size_t DawnCachingInterface::LoadData(const void* key,
if (!entry) {
return 0u;
}
- return entry->ReadData(value_out, value_size);
+ const size_t returned_size = entry->ReadData(value_out, value_size);
+ if (value_out == nullptr && value_size == 0) {
+ base::PlatformThread::Sleep(kBlobCacheOobPeekDelay);
+ }
+ return returned_size;
}
void DawnCachingInterface::StoreData(const void* key,
The added sleep only fires on the peek call, so the size query returns the old entry and the subsequent fill call sees whatever the cache holds two milliseconds later.
Step 2: serve the HTML PoC
The PoC page was served locally:
python3 -m http.server 8765 --bind [redacted]
Step 3: launch Chrome against the PoC
DISPLAY=:2 \
/home/slave/chromium-bug-bounty/chromium/src/out/asan/chrome \
--no-sandbox \
--enable-features=Vulkan \
'http://[redacted]:8765/chrome-webgpu-blob-cache-race-poc.html?mode=samekey&workers=4&workerIterations=1&complexity=64&hitDelayMs=100' > ./asan.log 2>&1
The report says the HTML PoC triggers same-key cache growth and reaches the vulnerable copy path when Chrome runs with a Vulkan-backed WebGPU/Dawn backend. The --enable-features=Vulkan flag puts Chrome on the Vulkan-backed WebGPU/Dawn path, which the report identifies as the path that reaches the vulnerable copy.
Step 4: observe the crash
AddressSanitizer reported a heap buffer overflow in the GPU process:
==250513==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x77a1b624e54c at pc 0x584ad9997908 bp 0x758150fc9d70 sp 0x758150fc9530
WRITE of size 11900 at 0x77a1b624e54c thread T58 (ThreadPoolForeg)
#0 0x584ad9997907 in __asan_memmove (/home/slave/chromium-bug-bounty/chromium/src/out/asan/chrome+0x10fd1907) (BuildId: 8515f221df06fcdf)
#1 0x584afb87a5ca in gpu::MemoryCacheEntry::ReadData(void*, unsigned long) const gen/third_party/libc++/src/include/__string/constexpr_c_functions.h:227:5
#2 0x584afbb00245 in gpu::webgpu::DawnCachingInterface::LoadData(void const*, unsigned long, void*, unsigned long) gpu/command_buffer/service/dawn_caching_interface.cc:52:39
#3 0x584adb9521e7 in dawn::native::BlobCache::LoadInternal(dawn::native::CacheKey const&) third_party/dawn/src/dawn/native/BlobCache.cpp:151:13
The allocation that was overrun came from Dawn's new uint8_t[expectedSize]:
0x77a1b624e54c is located 0 bytes after 5196-byte region [0x77a1b624d100,0x77a1b624e54c)
allocated by thread T58 (ThreadPoolForeg) here:
#0 0x584ad99d26ad in operator new[](unsigned long) (/home/slave/chromium-bug-bounty/chromium/src/out/asan/chrome+0x1100c6ad) (BuildId: 8515f221df06fcdf)
#1 0x584adb95217c in dawn::native::BlobCache::LoadInternal(dawn::native::CacheKey const&) third_party/dawn/src/dawn/native/BlobCache.cpp:149:27
So the size query returned 5196 bytes, Dawn allocated exactly that, and the fill call wrote 11900 bytes. The stack shows the load happening during PipelineCacheBase::Initialize() from vulkan::PipelineCache::Initialize(), reached through asynchronous compute pipeline creation on a thread pool worker.
Root cause
The design mistake is treating two independent cache operations as one stable transaction. BlobCache::LoadInternal() queries the size, allocates, then loads, with no cache entry pinning and no Dawn-side lock. DawnCachingInterface::LoadData() performs a fresh memory_cache()->Find(key_str) on each call, and MemoryCache::Store() evicts and replaces an existing key. A concurrent or interleaved store for the same key can therefore make the first load observe entry A and the second load observe larger entry B.
The only size defence at the sink is DCHECK(value_size == DataSize()), which is removed in release builds. The mismatch check in Dawn is placed after the write, so it cannot prevent an oversized callee from corrupting the heap. MemoryCache's mutex serialises individual map operations but does not span Dawn's two calls.
Impact
A normal web page can reach WebGPU device and pipeline creation APIs when WebGPU is available, and the blob cache is enabled by default on supported platforms, so the cache path is browser-exposed. The report is explicit that the exact same-key size growth condition still needs a reliable page-controlled trigger, and the reproduction relies on the added sleep to widen the window. The demonstrated effect is a heap buffer overflow in the GPU process, which the report classifies as a GPU-process AddressSanitizer heap-buffer-overflow.
Fix
The report does not describe a fix. It points at the existing TODO (crbug.com/469351711), which proposes treating a size change on the second call as a cache miss and moving the blob cache API to a single mLoadFunction call. A robust fix would also make the sink enforce the caller's buffer size in release builds rather than only under DCHECK.
Variants to test
- Other two-call cache APIs in browser code: look for a size query followed by a separate fill call with no entry pinning. A positive result is a size returned by the first call that is smaller than what the second call writes.
- Debug-only size assertions at copy sinks: search for
DCHECKorassertguardingstd::copy,memcpyormemmoveinto caller-provided buffers. A positive result is a release build where the copy length comes from the stored value rather than the caller's size. - Same-key replacement in other caches: check whether a store path evicts and replaces an existing key while a reader holds a size from an earlier lookup. A positive result is a reader observing a larger value on its second lookup.
- Cache adapters that re-look-up on every call: any adapter that calls
Find()per invocation without holding a reference across the sequence is a candidate. A positive result is an interleaved store changing the entry between two calls from the same reader. - WebGPU and GPU-process cache paths on other platforms: the report ties the reachable path to the Vulkan-backed backend. A positive result is the same overflow reported by ASan on a different backend or platform where the blob cache is enabled.
What happened, in plain words
Chrome can run graphics code on your graphics card. To do that, it uses a component called Dawn, which is Chrome's implementation of WebGPU. WebGPU is a browser feature that lets a web page talk to the graphics card to draw things or run calculations very fast. Dawn is the part of Chrome that translates what the page asks for into instructions the graphics card understands.
Compiling those instructions takes time, so Dawn keeps a cache: a store of results it has already produced, so it does not have to do the same work twice. Think of it like keeping leftovers in the fridge instead of cooking the same meal from scratch every evening. This cache is called the blob cache (a "blob" is just a chunk of raw bytes).
The bug is in how Dawn reads from that cache. Dawn asks the cache two questions in a row: first "how big is the stored value?", then "now copy the value into this box I prepared". Between those two questions, the stored value can be replaced with a bigger one. Dawn prepared a box sized for the old, smaller value, but the cache then copies the new, bigger value into it. Writing more data than a box can hold is called a buffer overflow, and when the box lives in a region of memory called the heap, it is a heap buffer overflow. That is the vulnerability class here.
The report was filed against Google Chrome through the Chrome VRP (Vulnerability Reward Program, Chrome's bug bounty scheme) by Hyeonjun Ahn (@_deayzl). It was rated medium severity, paid a 5000.00 USD bounty, and disclosed on 2026-07-29 as CVE-2026-17758. A CVE is a public catalogue number given to a known security flaw so people can track it.
Context
Let us unpack the pieces before looking at the code.
- API: an API is a defined way for one piece of software to ask another piece of software to do something. Think of a restaurant menu: you do not walk into the kitchen, you order from a fixed list and the kitchen handles the rest. Here, Dawn orders from the cache using a fixed set of functions.
- Two-call API: some APIs need two separate calls to get one job done. Here, the first call asks "how big is the value?", and the second call says "here is a buffer of that size, please fill it". This is the pattern at the heart of the bug.
- Buffer: a reserved area of memory used to hold data. Picture a row of numbered lockers; a buffer is a fixed number of lockers you have booked.
- Heap: the general-purpose pool of memory a program uses for things it creates while running. If you write past the end of a buffer on the heap, you can damage other data stored nearby.
- Cache key: a label used to look up a stored value, like a name on a fridge container. If two different values are stored under the same label, the newer one replaces the older one.
- DCHECK: a check that only runs in special debug builds of the software. In normal, released builds it is removed entirely, so it protects nothing for real users.
- Release build: the version of software shipped to the public, built for speed rather than for catching mistakes.
- AddressSanitizer (ASan): a tool built into a special test version of a program that watches memory and shouts loudly the moment a program writes outside a buffer.
- GPU process: Chrome splits itself into several processes for safety. The GPU process is the one that talks to the graphics card. A crash there is serious but is separated from the rest of the browser.
- Vulkan: a modern interface for talking to graphics cards. Chrome can use it as the backend for WebGPU.
Dawn keeps a blob cache for compiled shader and pipeline data so that work does not have to be repeated across runs. A shader is a small program that runs on the graphics card; a pipeline is the full set-up of how a drawing or calculation is carried out. The cache is a two-call API: Dawn first asks the backend how large a value is, allocates a buffer of exactly that size, then asks the backend to fill the buffer. Chromium plugs its own MemoryCache in behind that API through DawnCachingInterface, and the WebGPU blob cache is enabled by default on supported platforms.
The bug reported here is a heap buffer overflow in that hand-off. If the cache entry for a key grows between Dawn's size query and Dawn's fill call, Chromium copies the larger value into Dawn's smaller allocation.
Setup
The researcher reproduced the bug on a local Chromium build. Building Chrome yourself means compiling it from its source code on your own machine. The build settings were chosen deliberately:
is_asan = true
is_debug = false
dcheck_always_on = false
symbol_level = 2
Line by line:
is_asan = trueturns on AddressSanitizer, the memory watchdog described above.is_debug = falsebuilds a release-style binary.dcheck_always_on = falsemeans the debug-only checks are switched off. This matters because the dangerous size check in the code is aDCHECK.symbol_level = 2keeps full debugging information in the binary.
The build was made with:
autoninja -C out/asan chrome
The host environment was:
OS: Ubuntu 24.04.3 LTS
GPU render node: /dev/dri/renderD128
GPU card node: /dev/dri/card1
This records the operating system and the two device files Linux uses to talk to the graphics card.
The versions recorded in the report are:
| Component | Revision |
|---|---|
| Chromium | [redacted] |
| Dawn | [redacted] |
A revision is a unique identifier for one exact snapshot of the source code, so anyone can check out precisely the same code.
Blame is a feature of version-control software that shows which change introduced each line of code. It pointed at four commits (a commit is one recorded change): 86578e2fc03 introduced the two-call load pattern in BlobCache::LoadInternal() (lines 139-151), fbfb4497e03 added the late mismatch check that still runs after the write (lines 152-158), d9d773bff86705 is the sink in MemoryCacheEntry::ReadData(), and 94d888ff461204 is the WebGPU cache adapter in DawnCachingInterface::LoadData(). The sink is the place where the dangerous write finally happens.
Because the local display session was not using DRI3 with the render node, the researcher created a separate GPU-backed display:
Xvnc :2 -ac -hw3d -drinode /dev/dri/renderD128 -geometry 1280x720 -depth 24 -noWebsocket -rfbport 5992 -localhost -SecurityTypes None
Xvnc starts a display on display number :2. -hw3d asks for hardware 3D acceleration, and -drinode /dev/dri/renderD128 points it at the graphics card's render node. The reason for this step was that the researcher's local display session was not using DRI3 with the render node.
The renderer was then verified with:
DISPLAY=:2 glxinfo -B
DISPLAY=:2 tells the command to use the virtual screen just created, and glxinfo -B prints a short summary of the graphics renderer in use; the report says the display was verified to use the Intel Mesa renderer.
Finding it
The researcher read BlobCache::LoadInternal() and saw that the size query and the data load are two independent callback invocations with nothing pinning the cache entry between them. A callback is a function you hand to another piece of code so it can call you back later; here, Dawn hands the cache a function and the cache calls it to fetch data.
// src/third_party/dawn/src/dawn/native/BlobCache.cpp
ResultOrError<Blob> BlobCache::LoadInternal(const CacheKey& key) {
DAWN_ASSERT(ValidateCacheKey(key));
if (mLoadFunction == nullptr) {
return Blob();
}
const size_t expectedSize =
mLoadFunction(key.data(), key.size(), nullptr, 0, mFunctionUserdata);
// Non-zero size indicates cache hit
if (expectedSize > 0) {
// Load bytes from cache.
uint8_t* buffer = new uint8_t[expectedSize];
const size_t actualSize =
mLoadFunction(key.data(), key.size(), buffer, expectedSize, mFunctionUserdata);
// TODO(crbug.com/469351711): If `mLoadFunction` returns a different size on the second call
// (due to external cache eviction, I/O errors, or timeouts), treat it as a cache miss. The
// blob cache API should be updated to a single `mLoadFunction` call in the future.
if (expectedSize != actualSize) {
delete[] buffer;
return Blob();
}
if (!mHashValidation) {
return Blob::UnsafeCreateWithDeleter(buffer, actualSize, [=]() { delete[] buffer; });
}
return details::CheckAndUnpackHashPrefixedPayload(buffer, expectedSize);
}
return Blob();
}
Line by line:
ResultOrError<Blob> BlobCache::LoadInternal(const CacheKey& key)declares a function that takes a cache key and returns either a blob or an error.DAWN_ASSERT(ValidateCacheKey(key));is a sanity check on the key.if (mLoadFunction == nullptr) { return Blob(); }handles the case where no cache function was supplied: return an empty blob.const size_t expectedSize = mLoadFunction(key.data(), key.size(), nullptr, 0, mFunctionUserdata);is the first call. Passingnullptrand0for the output buffer and its size means "I am not giving you anywhere to write; just tell me the size". The returned number is stored asexpectedSize.if (expectedSize > 0)means a non-zero size indicates a cache hit, so there is something to load.uint8_t* buffer = new uint8_t[expectedSize];allocates a buffer of exactly the size just reported. This is the box that will later be overrun.const size_t actualSize = mLoadFunction(key.data(), key.size(), buffer, expectedSize, mFunctionUserdata);is the second call. This time it passes the real buffer and its size, asking the cache to fill it.- The
TODOcomment acknowledges the risk: if the second call returns a different size (because the entry was evicted, or an I/O error or timeout occurred), it should be treated as a cache miss, and the API should eventually be changed to a single call. if (expectedSize != actualSize) { delete[] buffer; return Blob(); }compares the two sizes and throws the buffer away if they differ. The comparison is conceptually right for detecting stale cache data, but it runs after the second callback has already written intobuffer. If the callee writes more thanexpectedSizebytes, the check is too late to protect the heap.- The final block either wraps the buffer in a
Blob(when hash validation is off) or checks and unpacks a hash-prefixed payload.
On the Chromium side, DawnCachingInterface::LoadData() looks up the entry fresh on every call and forwards the caller's buffer size to ReadData():
// src/gpu/command_buffer/service/dawn_caching_interface.cc
size_t DawnCachingInterface::LoadData(const void* key,
size_t key_size,
void* value_out,
size_t value_size) {
if (memory_cache() == nullptr) {
return 0u;
}
std::string_view key_str(static_cast<const char*>(key), key_size);
auto entry = memory_cache()->Find(key_str);
if (!entry) {
return 0u;
}
return entry->ReadData(value_out, value_size);
}
Line by line:
- The function receives a key, its length, an output pointer
value_out, and the size of the caller's buffervalue_size. if (memory_cache() == nullptr) { return 0u; }returns zero if there is no cache at all.std::string_view key_str(...)turns the raw key bytes into a string view, a lightweight way to refer to text without copying it.auto entry = memory_cache()->Find(key_str);looks the entry up fresh on every call. Nothing is remembered from the previous call.if (!entry) { return 0u; }returns zero if the key is not in the cache.return entry->ReadData(value_out, value_size);hands the caller's buffer and its size to the entry's read function.
ReadData() is the sink. It treats (nullptr, 0) as a size query, but for the real read it only enforces equal sizes with a DCHECK:
// src/gpu/command_buffer/service/memory_cache.cc
size_t MemoryCacheEntry::ReadData(void* value_out, size_t value_size) const {
// First handle "peek" case where use is trying to get the size of the entry.
if (value_out == nullptr && value_size == 0) {
return DataSize();
}
// Otherwise, verify that the size that is being copied out is identical.
DCHECK(value_size == DataSize());
std::copy(data_.begin(), data_.end(), static_cast<uint8_t*>(value_out));
return value_size;
}
Line by line:
if (value_out == nullptr && value_size == 0) { return DataSize(); }is the "peek" case: no buffer was offered, so just report how big the stored value is. This is what Dawn's first call triggers.DCHECK(value_size == DataSize());is meant to verify that the caller's buffer is exactly the same size as the stored value. But it is a debug-only check.std::copy(data_.begin(), data_.end(), static_cast<uint8_t*>(value_out));copies the whole stored value into the caller's pointer.
In release builds the DCHECK is compiled out, so std::copy writes the whole cached value regardless of the size the caller offered. The researcher also noted that MemoryCache::Store() replaces existing keys through EvictEntry(key), so a same-key store with a larger value is enough to change what the second Find() returns. The mutex in MemoryCache covers individual map operations, not Dawn's whole two-call sequence. A mutex is a lock that lets only one thread touch a data structure at a time; it protects each individual lookup, but not the gap between Dawn's two separate calls.
Exploitation
Step 1: make the race easy to hit
A race condition is a bug that only appears when two things happen in a particular order or at a particular moment, like two people reaching for the same door handle at once. Races are hard to trigger reliably, so the researcher applied a patch that adds a short sleep after the size-query call, widening the window between the two loads:
diff --git a/gpu/command_buffer/service/dawn_caching_interface.cc b/gpu/command_buffer/service/dawn_caching_interface.cc
index 2d470a9312d87..ff5c2ece7e26 100644
--- a/gpu/command_buffer/service/dawn_caching_interface.cc
+++ b/gpu/command_buffer/service/dawn_caching_interface.cc
@@ -13,6 +13,8 @@
#include "base/memory/ptr_util.h"
#include "base/strings/stringprintf.h"
#include "base/task/single_thread_task_runner.h"
+#include "base/threading/platform_thread.h"
+#include "base/time/time.h"
#include "base/trace_event/memory_dump_manager.h"
#include "base/trace_event/memory_dump_request_args.h"
#include "base/trace_event/trace_event.h"
@@ -21,6 +23,12 @@
namespace gpu::webgpu {
+namespace {
+
+constexpr base::TimeDelta kBlobCacheOobPeekDelay = base::Milliseconds(2);
+
+} // namespace
+
DawnCachingInterface::DawnCachingInterface(scoped_refptr<MemoryCache> backend,
CacheBlobCallback callback)
: memory_cache_backend_(std::move(backend)),
@@ -41,7 +49,11 @@ size_t DawnCachingInterface::LoadData(const void* key,
if (!entry) {
return 0u;
}
- return entry->ReadData(value_out, value_size);
+ const size_t returned_size = entry->ReadData(value_out, value_size);
+ if (value_out == nullptr && value_size == 0) {
+ base::PlatformThread::Sleep(kBlobCacheOobPeekDelay);
+ }
+ return returned_size;
}
void DawnCachingInterface::StoreData(const void* key,
What the patch does, piece by piece:
- The two added
#includelines bring in the headers needed for sleeping and for time durations. constexpr base::TimeDelta kBlobCacheOobPeekDelay = base::Milliseconds(2);defines a constant delay of two milliseconds. The name says it is a delay for the out-of-bounds peek.- The original line
return entry->ReadData(value_out, value_size);is replaced by three lines: store the result inreturned_size, then, only if this was the peek call (value_out == nullptr && value_size == 0), sleep for the delay, then return the stored result.
The added sleep only fires on the peek call, so the size query returns the old entry and the subsequent fill call sees whatever the cache holds two milliseconds later. The report presents the patch as a way to make reproduction easier.
Step 2: serve the HTML PoC
The PoC page was served locally:
python3 -m http.server 8765 --bind [redacted]
A PoC (proof of concept) is a small demonstration that shows a bug is real.
Step 3: launch Chrome against the PoC
DISPLAY=:2 \
/home/slave/chromium-bug-bounty/chromium/src/out/asan/chrome \
--no-sandbox \
--enable-features=Vulkan \
'http://[redacted]:8765/chrome-webgpu-blob-cache-race-poc.html?mode=samekey&workers=4&workerIterations=1&complexity=64&hitDelayMs=100' > ./asan.log 2>&1
Line by line:
DISPLAY=:2runs Chrome on the virtual GPU-backed screen created earlier.- The long path is the freshly built Chrome binary in the
out/asanfolder. --no-sandboxdisables Chrome's process sandbox, a security boundary that limits what a process can do.--enable-features=Vulkanenables Vulkan; the report says the PoC reaches the vulnerable copy path when Chrome runs with a Vulkan-backed WebGPU/Dawn backend.- The URL points at the PoC page with several settings in the query string. The report says the HTML PoC triggers same-key cache growth and reaches the vulnerable copy path when Chrome runs with a Vulkan-backed WebGPU/Dawn backend.
Step 4: observe the crash
AddressSanitizer reported a heap buffer overflow in the GPU process:
==250513==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x77a1b624e54c at pc 0x584ad9997908 bp 0x758150fc9d70 sp 0x758150fc9530
WRITE of size 11900 at 0x77a1b624e54c thread T58 (ThreadPoolForeg)
#0 0x584ad9997907 in __asan_memmove (/home/slave/chromium-bug-bounty/chromium/src/out/asan/chrome+0x10fd1907) (BuildId: 8515f221df06fcdf)
#1 0x584afb87a5ca in gpu::MemoryCacheEntry::ReadData(void*, unsigned long) const gen/third_party/libc++/src/include/__string/constexpr_c_functions.h:227:5
#2 0x584afbb00245 in gpu::webgpu::DawnCachingInterface::LoadData(void const*, unsigned long, void*, unsigned long) gpu/command_buffer/service/dawn_caching_interface.cc:52:39
#3 0x584adb9521e7 in dawn::native::BlobCache::LoadInternal(dawn::native::CacheKey const&) third_party/dawn/src/dawn/native/BlobCache.cpp:151:13
How to read this:
ERROR: AddressSanitizer: heap-buffer-overflowis the watchdog saying a write went past the end of a heap buffer.WRITE of size 11900says 11900 bytes were written in one go.thread T58 (ThreadPoolForeg)says this happened on a thread pool worker thread.- The numbered
#0,#1,#2,#3lines are the stack trace: the chain of function calls that led to the crash, most recent first. The stack shows__asan_memmovecalled fromMemoryCacheEntry::ReadData, called fromDawnCachingInterface::LoadData, called fromBlobCache::LoadInternal.
The allocation that was overrun came from Dawn's new uint8_t[expectedSize]:
0x77a1b624e54c is located 0 bytes after 5196-byte region [0x77a1b624d100,0x77a1b624e54c)
allocated by thread T58 (ThreadPoolForeg) here:
#0 0x584ad99d26ad in operator new[](unsigned long) (/home/slave/chromium-bug-bounty/chromium/src/out/asan/chrome+0x1100c6ad) (BuildId: 8515f221df06fcdf)
#1 0x584adb95217c in dawn::native::BlobCache::LoadInternal(dawn::native::CacheKey const&) third_party/dawn/src/dawn/native/BlobCache.cpp:149:27
This second block tells the other half of the story: the buffer was 5196 bytes, and the reported address is 0 bytes after its end. The allocation came from operator new[] inside BlobCache::LoadInternal, which is the new uint8_t[expectedSize] line.
So the size query returned 5196 bytes, Dawn allocated exactly that, and the fill call wrote 11900 bytes. The stack shows the load happening during PipelineCacheBase::Initialize() from vulkan::PipelineCache::Initialize(), reached through asynchronous compute pipeline creation on a thread pool worker. In plain terms: a web page asked for a compute pipeline, Dawn went to the cache to load saved pipeline data, and the copy ran past the end of the buffer.
Root cause
The design mistake is treating two independent cache operations as one stable transaction. A transaction is a group of steps that should all happen as one indivisible unit, like a bank transfer that either completes fully or not at all. Here, the two calls are not grouped.
BlobCache::LoadInternal() queries the size, allocates, then loads, with no cache entry pinning and no Dawn-side lock. Pinning would mean holding on to the exact entry that was measured, so it cannot be swapped out underneath you. DawnCachingInterface::LoadData() performs a fresh memory_cache()->Find(key_str) on each call, and MemoryCache::Store() evicts and replaces an existing key. A concurrent or interleaved store for the same key can therefore make the first load observe entry A and the second load observe larger entry B.
The only size defence at the sink is DCHECK(value_size == DataSize()), which is removed in release builds. The mismatch check in Dawn is placed after the write, so it cannot prevent an oversized callee from corrupting the heap. MemoryCache's mutex serialises individual map operations but does not span Dawn's two calls.
Impact
A normal web page can reach WebGPU device and pipeline creation APIs when WebGPU is available, and the blob cache is enabled by default on supported platforms, so the cache path is browser-exposed. The report is explicit that the exact same-key size growth condition still needs a reliable page-controlled trigger, and the reproduction relies on the added sleep to widen the window. The demonstrated effect is a heap buffer overflow in the GPU process, which the report classifies as a GPU-process AddressSanitizer heap-buffer-overflow.
Fix
The report does not describe a fix. It points at the existing TODO (crbug.com/469351711), which proposes treating a size change on the second call as a cache miss and moving the blob cache API to a single mLoadFunction call. A robust fix would also make the sink enforce the caller's buffer size in release builds rather than only under DCHECK.
Variants to test
These are directions for finding similar bugs elsewhere, useful if you want to practise the same kind of thinking:
- Other two-call cache APIs in browser code: look for a size query followed by a separate fill call with no entry pinning. A positive result is a size returned by the first call that is smaller than what the second call writes.
- Debug-only size assertions at copy sinks: search for
DCHECKorassertguardingstd::copy,memcpyormemmoveinto caller-provided buffers. A positive result is a release build where the copy length comes from the stored value rather than the caller's size. - Same-key replacement in other caches: check whether a store path evicts and replaces an existing key while a reader holds a size from an earlier lookup. A positive result is a reader observing a larger value on its second lookup.
- Cache adapters that re-look-up on every call: any adapter that calls
Find()per invocation without holding a reference across the sequence is a candidate. A positive result is an interleaved store changing the entry between two calls from the same reader. - WebGPU and GPU-process cache paths on other platforms: the report ties the reachable path to the Vulkan-backed backend. A positive result is the same overflow reported by ASan on a different backend or platform where the blob cache is enabled.
Glossary
- API: a defined way for one piece of software to ask another to do something, like ordering from a menu.
- AddressSanitizer (ASan): a tool in special test builds that detects and reports out-of-bounds memory writes.
- Blame: a version-control feature showing which change introduced each line of code.
- Blob: a chunk of raw bytes stored or passed around as one unit.
- Blob cache: Dawn's store of compiled shader and pipeline data, so work is not repeated.
- Buffer: a reserved area of memory holding data, like a row of booked lockers.
- Buffer overflow: writing more data into a buffer than it can hold.
- Callback: a function handed to other code so it can be called back later.
- Cache key: a label used to look up a stored value; storing again under the same label replaces the old value.
- Chrome VRP: Chrome's Vulnerability Reward Program, the bug bounty scheme that paid for this report.
- Commit: one recorded change in version-control software.
- CVE: a public catalogue number for a known security flaw.
- DCHECK: a check that only runs in debug builds and is removed from release builds.
- Dawn: Chromium's implementation of WebGPU, the component that talks to the graphics card.
- DRI3: a Linux mechanism for sharing graphics buffers with the display server.
- GPU process: the Chrome process that communicates with the graphics card.
- Heap: the general-purpose pool of memory a program uses for things created while running.
- Heap buffer overflow: a buffer overflow in memory taken from the heap, which can corrupt nearby data.
- Mutex: a lock allowing only one thread at a time to touch a data structure.
- Pinning: holding on to a specific cache entry so it cannot be swapped out while in use.
- Pipeline: the full set-up of how a drawing or calculation is carried out on the graphics card.
- PoC: proof of concept, a small demonstration that a bug is real.
- Race condition: a bug that appears only when events happen in a particular order or timing.
- Revision: a unique identifier for one exact snapshot of source code.
- Shader: a small program that runs on the graphics card.
- Sink: the place in code where the dangerous operation finally happens.
- Stack trace: the chain of function calls leading to a crash, most recent first.
- Transaction: a group of steps that should happen as one indivisible unit.
- Two-call API: an API that needs two separate calls to complete one job, such as asking a size and then fetching the data.
- Vulkan: a modern interface for talking to graphics cards, usable as a WebGPU backend.
- WebGPU: a browser feature letting web pages use the graphics card for drawing and computation.
- Worker: a background thread or script that runs work in parallel with the main page.