Integer overflow in GPU (CVE-2026-19167)
An unsigned 32-bit content counter in CompoundImageBacking can wrap to zero after a very large number of shared-image updates, colliding with the default value used for a lazily created GPU backing. A compromised renderer could then skip the synchronisation copy and read recycled, uninitialised GPU memory, potentially exposing graphics data from other origins.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 18 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: An integer wrap-around vulnerability exists in CompoundImageBacking where latest_content_id_ can overflow to 0 via repeated IPC updates. This wrapped value collides with the default sentinel of an uninitialized GPU backing, bypassing synchronization checks. Consequently, a compromised renderer can read recycled, uninitialized GPU memory, potentially leaking cross-origin graphics data.
Affected files:
gpu/command_buffer/service/shared_image/compound_image_backing.ccgpu/command_buffer/service/shared_image/compound_image_backing.h
Estimated timestamp from git blame: Unknown (Google3 checkout)
1. Summary of the Issue (Meant for Human Triage)
A potential integer wrap-around vulnerability exists in CompoundImageBacking within Chromium's GPU command buffer service. The class tracks the latest version of content across multiple underlying backings (such as Shared Memory and GPU) using latest_content_id_, a 32-bit unsigned integer. This ID is incremented with an unchecked bare ++ operator every time the shared image is updated. If a compromised renderer sends 2^32 - 1 updates to a single mailbox, the ID overflows and wraps back to 0.
This wrapped value of 0 perfectly collides with the default 0 content ID sentinel on never-synchronized elements, such as lazily allocated GPU backings. On the subsequent first GPU access, the collision (0 == 0) mistakenly satisfies the fast-path condition in NotifyBeginAccess. This causes the GPU process to skip the necessary synchronization copy (CopyImage) from the shared memory backing to the GPU texture. Since the GPU backing was already marked as cleared during creation (SetCleared()) on the assumption that a copy would occur on first access, all downstream validation gates (like IsCleared()) pass. Consequently, the renderer can perform an uninitialized GPU texture read. On platforms or drivers where the GPU allocator recycles graphics memory without zeroing (and where robust_resource_init is disabled on the shared context), this leaks recycled GPU graphics allocations, potentially exposing cross-origin graphic contexts from other tabs or processes.
2. Proof-of-Concept & Detailed Execution Flow
The following is a step-by-step theoretical sequence of events tracing the vulnerability from an attacker-controlled renderer to the uninitialized GPU memory read. Note that these are potential steps, as our tooling does not yet have the ability to run code to produce a live proof of concept.
Phase 1: Initialization and Setup
- Attacker Connection: A compromised renderer process establishes a Mojo connection to the GPU process via
gpu.mojom.GpuChannel. - Creation Request: The attacker sends a
DeferredSharedImageRequest::kCreateSharedImageWithBufferMojo message, specifying aSHARED_MEMORY_BUFFERand usage flagsGLES2_READ | CPU_WRITE_ONLY. - Factory Allocation: The GPU process routes the request to
SharedImageFactory::CreateSharedImage. Becausegmb_type == gfx::SHARED_MEMORY_BUFFERand it is not thread-shared, it callsCompoundImageBacking::Create(gpu/command_buffer/service/shared_image/compound_image_backing.cc:965). - Global Tracker Initialized: In the
CompoundImageBackingconstructor,latest_content_id_(auint32_t) is initialized to1by its default member initializer (compound_image_backing.h:463). - Shared Memory Element Setup: The constructor provisions
elements_[0]to hold the Shared Memory backing and synchronizes its version:shm_element.content_id_ = latest_content_id_;(setting it to1) (compound_image_backing.cc:1150). - Logical Clearing: Because a Shared Memory backing is present (
has_shm_backing_ = true), the entire compound backing is marked logically cleared viaSetClearedRectInternal(gfx::Rect(size))(compound_image_backing.cc:1157). - Lazy GPU Element Setup: A placeholder element,
elements_[1], is added for the eventual GPU backing. Its physical creation is deferred usingLazyCreateBacking(compound_image_backing.cc:1167). - Sentinel Left Untouched: Crucially,
gpu_element.content_id_is not explicitly set in the constructor. It retains its default initializer value of0(compound_image_backing.h:337).- State Checkpoint 1:
latest_content_id_ == 1,elements_[0].content_id_ == 1,elements_[1].content_id_ == 0.
- State Checkpoint 1:
Phase 2: Bypassing Watchdogs and Mojo Constraints
- Mojo Batching Strategy: The maximum size of a single Mojo message is 128 MB (
IPC::mojom::kChannelMaximumMessageSize). A singleFlushDeferredRequestsbatch can hold a maximum of ~986,894DeferredSharedImageRequests. - Watchdog Bypass: The attacker sends these 128 MB batches sequentially. When a batch reaches the GPU IO thread,
GpuChannelMessageFilter::FlushDeferredRequestsunpacks the items into individualScheduler::Taskelements without blocking Mojo queues. As the GPU Scheduler executes each task, theGpuWatchdogThread's hooks continuously togglearm_disarm_counter_, recognizing progress and preventing a timeout crash, permitting roughly 7 to 70 minutes of silent execution. - Service-Side Check Bypass: To prevent the GPU process from crashing when the client's flush ID wraps around, the attacker hardcodes
flushed_deferred_message_id = 1in all IPC messages. This cleanly satisfiesCHECK_GE(version, GetSharedVersion())inSharedMemoryVersionController::SetVersionindefinitely.
Phase 3: Triggering the Wrap-Around
- The IPC Loop: The attacker executes a loop sending batches of
mojom::DeferredSharedImageRequest::kUpdateSharedImageaimed at the single shared image mailbox. - Updating the Compound Image: The GPU process routes these updates to
CompoundImageBacking::Update()(compound_image_backing.cc:1415). - No-Op Child Update: Inside
Update(),element.backing->Update()resolves toSharedMemoryImageBacking::Update, which is aCHECK(!in_fence);no-op that takes virtually no GPU cycles (shared_memory_image_backing.cc:104). - Unchecked Increment:
Update()performs the unchecked increment:
element.content_id_ = ++latest_content_id_;
- The Overflow: At an estimated speed of tens of nanoseconds per increment, executing 4.3 billion tasks on the GPU main thread takes approximately 7 to 70 minutes. Upon executing the
4,294,967,295th update request,latest_content_id_wraps around to0due to 32-bit unsigned integer overflow. - Final State Update:
elements_[0].content_id_is updated to the newlatest_content_id_value (0).elements_[1]was never accessed, so itscontent_id_remains untouched at0.
- State Checkpoint 2:
latest_content_id_ == 0,elements_[0].content_id_ == 0,elements_[1].content_id_ == 0.
Phase 4: Lazy Allocation and Bypassing Synchronization
- Forcing GPU Allocation: The attacker issues a GL command buffer command,
CreateAndTexStorage2DSharedImageINTERNALImmediate, invokingProduceGLTexturePassthrough, which entersCompoundImageBacking::GetOrAllocateBacking(SharedImageAccessStream::kGL). - Physical Allocation:
elements_[1]matches thekGLaccess stream, firing its lazy callback toCreateBackingFromBackingFactorywhich allocates the physical backing texture (compound_image_backing.cc:2071). - Premature Clearing: The code notes
if (has_shm_backing_) { backing->SetCleared(); }. It explicitly marks the physical texture as cleared—despite the driver returning raw, uninitialized memory—under the firm assumption that a synchronization copy from the Shared Memory backing will initialize it upon first access. - Initiating Access: The attacker sends
BeginSharedImageAccessDirectCHROMIUMwith read access (GL_SHARED_IMAGE_ACCESS_MODE_READ_CHROMIUM). - Clear Checks Defeated:
BeginScopedAccessqueriesIsCleared(). Because of Step 20, this check passes seamlessly, bypassingEnsureClear(gles2_cmd_decoder_passthrough.cc:618). - The Collision:
CompoundImageBacking::NotifyBeginAccessevaluates the critical fast-path condition:
if (access_element && access_element->content_id_ == latest_content_id_) {
- The Bypass:
access_elementpoints toelements_[1], whosecontent_id_is0. Due to the wrap-around,latest_content_id_is also exactly0. The condition evaluates to0 == 0, which istrue. - Skipping the Copy: Because the fast path returns
trueimmediately (compound_image_backing.cc:1252), the system skips thecopy_manager_->CopyImageinvocation. The backing is now permanently bound without initialization.
Phase 5: Cross-Origin Data Leak
- Reading the Texture: The attacker executes
glReadPixelsor samples the texture via a fragment shader to an SSBO using standard GLES2 commands. - Uninitialized Memory: By default, the shared context state operates with
robust_resource_init = false(gles2_cmd_decoder_passthrough.cc:615). Thus, the underlying graphics driver (ANGLE-Vulkan or native GL) provides recycled, uninitialized GPU memory. - Impact: The attacker extracts the contents of the recycled GPU memory, leaking cross-origin graphics data from other origins, tabs, or background applications.
Proposed Fix
To prevent this vulnerability, latest_content_id_ should be protected against overflow. Given that uint32_t is used for content versions, base::CheckedNumeric<uint32_t> should be used to catch overflows and safely crash or handle the error, preventing wrap-around. Alternatively, use a 64-bit integer (uint64_t) for latest_content_id_ and content_id_, making an overflow impossible in a realistic timeframe.
3. Technical Verification Details (Automated Audit Logs - Reviewers may skip this section)
Determination: verified — §G0.6/GPU-INT → GPU-XO.
latest_content_id_(uint32_t,.h:461) is incremented with bare++at.cc:1201,1268,1379with noCheckedNumeric/overflow guard. After 2³²−1 A-RENDERERUpdateSharedImageIPCs it wraps to0, colliding with the defaultelements_[1].content_id_ = 0(.h:336, never assigned in ctor:1112-1123). The collision defeatsNotifyBeginAccess:1198(access_element->content_id_ == latest_content_id_→0==0→ fast-pathreturnat:1204), socopy_manager_->CopyImageat:1217is never invoked. The lazily-created GPU backing was alreadySetCleared()at:2031without physical init (per the code's own comment at:2023-2029), so bothEnsureClear(gles2_cmd_decoder_passthrough.cc:618) andBeginScopedAccess(shared_image_representation.cc:152)IsCleared()gates pass → uninitialized GPU-texture read viareadPixels.
Additional Verification Notes
- OOM / Watchdog Limits Verified: The prior Critic assessed whether 4.3 billion IPCs would crash the GPU process due to OOM or watchdog timeouts. It was confirmed that since Mojo requests are dispatched to the
Schedulerand executed sequentially viaRunNextTask(returning to the message loop),GpuWatchdogThread'sWillProcessTask/DidProcessTaskobserver hooks correctly arm and disarm the watchdog. By batching requests into 128 MB chunks (IPC::mojom::kChannelMaximumMessageSize), the Mojo queues do not pile up, completely avoiding OOMs. - SharedMemoryVersionController Bypass: Sending 4.3 billion requests causes
next_deferred_message_id_to wrap around. The attacker can bypass the GPU process crash (CHECK_GE(version, GetSharedVersion())inSharedMemoryVersionController::SetVersion,mojo/public/cpp/base/shared_memory_version.cc:92) by passing a staticflushed_deferred_message_id(e.g.,1) repeatedly, as this check merely evaluatesCHECK_GE(1, 1)unconditionally. - Execution Timing: The lightweight
SharedMemoryImageBacking::Updateperforms a negligibleCHECK(!in_fence)operation. The entire update step (CompoundImageBacking::Update()) takes tens of nanoseconds. The estimated processing time for $2^{32}$ tasks on the GPU thread is between 7 and 70 minutes. - Severity Alignment: The prior Critic classified this as Medium (S2) due to "extreme trigger complexity" (7-70 minutes). However, an automated, silent integer overflow triggered by a background tab loop does not require "unusual or unlikely user interaction," and under Chromium's threat model, automated background tasks scale effectively. Although the previous Critic assigned S2, the foundational cross-origin uninitialized-texture read (GPU-XO) boundary holds firm.
Evaluated with Chrome root at commit: b96d2ec58f4f5f92b540a723966b199d6e9951b4
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
Likely an unchecked increment of a 32-bit content ID that can wrap to the same zero value used as the sentinel for a never-synchronised backing, so the fast-path equality check in NotifyBeginAccess wrongly reports the backing as up to date.
Impact
A compromised renderer could read recycled, uninitialised GPU memory and potentially leak cross-origin graphics data, but only where the driver does not zero memory and robust resource initialisation is disabled, and the attack needs 7 to 70 minutes of silent execution.
What the attacker needed
Compromised renderer process; 7 to 70 minutes of GPU work; driver recycles uninitialised memory; robust_resource_init disabled
The fix
The counter should be protected against overflow, for example with a checked numeric type or a 64-bit integer.
How it was found
- A compromised renderer opens a Mojo channel to the GPU process and creates a shared image backed by shared memory with read and CPU-write usage.
- The renderer sends very large batches of deferred shared-image update messages for that one mailbox, keeping the watchdog fed and the version check satisfied.
- After roughly 2^32 updates the content counter wraps to zero, matching the untouched GPU element's default value.
- The renderer forces the lazy GPU backing to be allocated, which is marked cleared on the assumption a copy will follow.
- The renderer begins read access; the equality check passes, the copy is skipped, and the texture is read back with glReadPixels or a shader.
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.
A shared image is a chunk of graphics memory that the browser process and the GPU process both use. The code keeps a counter to know whether the GPU copy is up to date, and that counter can roll back to zero after enough updates, which looks the same as 'never set up yet'. The browser then wrongly believes the GPU copy is already filled in and lets the page read memory that was never cleared, which may still hold another site's pictures.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.