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

Use of released resource in GPU (CVE-2026-121256)

A flaw in minigbm's error handling allows a compromised renderer to cause a shared GEM handle to be closed while still in use, leading to handle confusion. An attacker could then alias a victim buffer and leak cross-origin visual information via hardware scanout.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 6 months

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 without the Chrome Security team. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: A flaw in minigbm's error handling may allow a compromised renderer to trigger GEM handle confusion in the GPU process. By inducing a partial import failure using a multi-plane format and an invalid FD, an attacker can cause a shared GEM handle to be closed while still in use. This can potentially lead to cross-origin visual information leaks via hardware scanout.

Affected files:

  • third_party/minigbm/src/drv_helpers.c
  • third_party/minigbm/src/i915.c

Estimated timestamp from git blame: 2022-10-22

Description

A potential vulnerability in the error handling logic of minigbm allows a compromised renderer process to trigger a Graphics Execution Manager (GEM) handle confusion state in the GPU process.

This occurs because the error path in drv_prime_bo_import (and related backend wrappers like i915_bo_import) calls drv_gem_bo_destroy directly upon failure. This function issues a DRM_IOCTL_GEM_CLOSE ioctl for all successfully imported planes without checking the driver-wide buffer_table reference count. Because GEM handles are not reference-counted by the Linux kernel, the handle is immediately destroyed for that DRM file description.

An attacker can cause a legitimate, shared GEM handle to be closed while it is still actively used by another gbm_bo. When the kernel subsequently reassigns that GEM handle ID to a new buffer (e.g., from a different origin or the browser UI), the attacker's original gbm_bo will alias the victim's buffer.

Root Cause Analysis

In third_party/minigbm/src/drv_helpers.c, drv_prime_bo_import iterates through planes to import FDs into GEM handles:

C
int drv_prime_bo_import(struct bo *bo, struct drv_import_fd_data *data)
{
    // ...
    for (plane = 0; plane < bo->meta.num_planes; plane++) {
        // ...
        ret = drmIoctl(bo->drv->fd, DRM_IOCTL_PRIME_FD_TO_HANDLE, &prime_handle);
        if (ret) {
            // ...
            bo->meta.num_planes = plane;
            drv_gem_bo_destroy(bo);     // Bypasses minigbm buffer_table refcount
            return -errno;
        }
        bo->handles[plane].u32 = prime_handle.handle;
    }
    // ...
}

The intended protection mechanism in minigbm is the buffer_table reference count managed by drv_bo_acquire and drv_bo_release in third_party/minigbm/src/drv.c. However, drv_prime_bo_import is called before drv_bo_acquire is invoked (which only happens on success). On failure, it calls drv_gem_bo_destroy, which unconditionally closes the handles via ioctl. Because the kernel does not refcount GEM handles, the handle is immediately removed from the file description's IDR table.

Potential Attack Vector

A compromised renderer could potentially exploit this by following these suggested steps (note: this is a theoretical sequence based on code analysis; a working PoC has not yet been developed):

  1. Obtain dma-buf: The attacker requests a valid dma-buf FD (FD_A) from the GPU process.
  2. Create Valid SharedImage: The attacker sends an IPC to create a valid SharedImage (S1) using FD_A. minigbm assigns it GEM handle H and sets its buffer_table refcount to 1.
  3. Construct Malicious IPC: The attacker crafts a CreateSharedImageWithBuffer IPC specifying a multi-planar format (e.g., NV12) and a NativePixmapHandle with two planes: planes[0].fd = FD_A and planes[1].fd = FD_B (where FD_B is a valid, non-dmabuf file descriptor like an eventfd).
  4. Bypass Validation: The GPU process validates the IPC via dup(), which succeeds because both FDs are valid file descriptors. gbm_bo_import checks num_fds <= num_planes (2 <= 2), which also passes.
  5. Partial Import Failure: drv_prime_bo_import processes the malicious handle. plane = 0 succeeds, and the kernel returns the existing handle H. plane = 1 fails because FD_B is not a dma-buf.
  6. Handle Closure: The error path executes drv_gem_bo_destroy, which issues DRM_IOCTL_GEM_CLOSE on handle H. The kernel immediately destroys the handle.
  7. Dangling State: The import returns NULL, bypassing drv_bo_acquire. S1 still exists, and minigbm's buffer_table incorrectly thinks H is still valid.
  8. Aliasing & Leak: The GPU process allocates a new victim buffer. The kernel reuses handle ID H. S1 now aliases the victim buffer. The attacker submits S1 for hardware scanout (e.g., via a promoted iframe overlay), causing the display controller to scan out the victim's memory, leaking cross-origin visual information.

Suggested Fix

The cleanup path during a failed import must be aware of handles that are shared with existing, valid gbm_bo objects.

  • One approach is to modify drv_gem_bo_destroy to check the driver's buffer_table before calling DRM_IOCTL_GEM_CLOSE. If the handle exists in the table (meaning it's used by another BO), the close should be skipped.
  • Alternatively, drv_prime_bo_import should track whether a handle was newly created or simply resolved from an existing import. Only newly created handles should be closed on failure.

Evaluated with Chrome root at commit: eca8648a4e1cdfdda68c495a6003059fed641955


Results so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; 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.

Raised in root component due to access or custom field issues on 964076

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

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

How it worked

Root cause

Likely the error path in drv_prime_bo_import calls drv_gem_bo_destroy without checking the buffer_table reference count, closing a GEM handle that is still in use.

Impact

A compromised renderer could potentially leak cross-origin visual information via hardware scanout, though a working proof of concept has not yet been developed.

What the attacker needed

Compromised renderer process; ability to send crafted IPC to GPU process

The fix

The cleanup path should check the buffer_table reference count before closing a handle, or track whether a handle was newly created and only close those on failure.

How it was found

  1. Obtain a valid dma-buf file descriptor from the GPU process.
  2. Create a valid SharedImage using that file descriptor, which gets a GEM handle.
  3. Craft an IPC with a multi-plane format and a second invalid file descriptor.
  4. The GPU process validates the file descriptors and plane count, which pass.
  5. The first plane import succeeds, but the second fails, triggering the error path.
  6. The error path closes the shared GEM handle, leaving a dangling reference.

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 renderer process (the part of the browser that draws web pages) is not supposed to access memory belonging to other pages. This report describes a bug where a malicious renderer can trick the GPU process into freeing a shared graphics memory handle too early. Later, that handle gets reused for a different buffer, so the attacker's buffer ends up pointing at someone else's screen content, potentially leaking it.

What is Memory corruption?

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

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

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