Incorrect authorization in GPU (CVE-2026-87452)
The macOS GLES2 passthrough command decoder did not block the internal-only GL_TEXTURE_RECTANGLE_ANGLE capability in its Enable handler, so a compromised renderer could re-enable it. That would let WebGL shaders use restricted rectangle textures, bypassing a defence-in-depth isolation measure.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 4 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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: The GLES2 passthrough command decoder on macOS fails to block the GL_TEXTURE_RECTANGLE_ANGLE capability in its Enable command handler. A compromised renderer can potentially re-enable this internal-only capability to use restricted rectangle textures in WebGL shaders, bypassing a defense-in-depth measure.
Affected files:
gpu/command_buffer/service/gles2_cmd_decoder_passthrough.ccgpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc
Estimated timestamp from git blame: 2020-01-30
Description
On macOS, Chromium uses the GL_TEXTURE_RECTANGLE_ANGLE capability internally to support IOSurface-backed textures. To prevent WebGL user shaders from accessing these textures, Chromium implements a hardening measure by explicitly disabling this capability for WebGL contexts during initialization. This isolation is enforced by the ANGLE shader translator, which blocks the ARB_texture_rectangle extension if the capability is disabled.
However, the passthrough command decoder's DoEnable handler does not sufficiently filter this capability. The handler relies on IsIgnoredCap to block restricted enums, but IsIgnoredCap lacks an entry for GL_TEXTURE_RECTANGLE_ANGLE. Since ANGLE allows this capability to be toggled for WebGL contexts, a compromised renderer can re-enable it via a standard glEnable command.
Technical Details
In gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc, the capability is disabled at initialization for WebGL contexts:
#if BUILDFLAG(IS_MAC)
if (feature_info_->IsWebGLContext())
api()->glDisableFn(GL_TEXTURE_RECTANGLE_ANGLE);
#endif
The DoEnable implementation in gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc validates capabilities using IsIgnoredCap:
error::Error GLES2DecoderPassthroughImpl::DoEnable(GLenum cap) {
if (IsIgnoredCap(cap)) {
InsertError(GL_INVALID_ENUM, "Invalid cap.");
return error::kNoError;
}
api()->glEnableFn(cap);
return error::kNoError;
}
The IsIgnoredCap function in gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc fails to include GL_TEXTURE_RECTANGLE_ANGLE (0x84F5), allowing it to fall through to the default return false case. This allows the glEnable call to reach ANGLE.
Impact
By re-enabling GL_TEXTURE_RECTANGLE_ANGLE, the ANGLE shader translator will no longer set the disableARBTextureRectangle compiler option. This allows a compromised renderer to compile and execute shaders that use #extension GL_ARB_texture_rectangle : enable and sampler2DRect types. This represents a bypass of a hardening layer designed to isolate WebGL from internal macOS texture types.
Potential Steps to Reproduce
These steps are based on code analysis and represent a potential attack vector:
- From a compromised renderer process on macOS (using the ANGLE OpenGL backend), send a
gles2::cmds::Enablecommand withcap = 0x84F5(GL_TEXTURE_RECTANGLE_ANGLE). - Send a
ShaderSourcecommand containing GLSL code that attempts to use theGL_ARB_texture_rectangleextension. - Send a
CompileShadercommand and observe that the shader compiles successfully. - In a debug build, subsequent internal usage of
ScopedEnableTextureRectangleInShaderCompilermay trigger aDCHECKinui/gl/gl_utils.ccbecause the capability is unexpectedly already enabled.
Suggested Fix
Modify GLES2DecoderPassthroughImpl::IsIgnoredCap in gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc to include GL_TEXTURE_RECTANGLE_ANGLE, ensuring it returns true (or at least feature_info_->IsWebGLContext()) to block the renderer from toggling this state.
Evaluated with Chrome root at commit: b3153093eb3c78c3e88ccf562bcbc20437a04b0e
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 the IsIgnoredCap filter in the passthrough decoder was never updated to include GL_TEXTURE_RECTANGLE_ANGLE, so the capability fell through to the default allow path.
Impact
A compromised renderer could compile and run shaders using internal macOS texture types, bypassing a hardening layer; the text does not claim this alone leads to further compromise.
What the attacker needed
MacOS; renderer already compromised; ANGLE OpenGL backend
The fix
The IsIgnoredCap function should be changed to include GL_TEXTURE_RECTANGLE_ANGLE so the renderer cannot toggle it.
How it was found
- From a compromised renderer on macOS, send an Enable command for the rectangle texture capability.
- Send a ShaderSource command with GLSL that uses the ARB texture rectangle extension.
- Send a CompileShader command and see that it compiles.
- In a debug build, later internal use of the capability may trip a DCHECK.
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.
Chromium keeps some graphics features for its own internal use and tries to stop web pages from turning them on. Here a check that should have refused one of those features was missing an entry, so a page that had already broken out of its sandbox could switch it back on. The result is only a weakened extra layer of protection, not a direct way to take over the browser.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.