Skip to content

fix: per-context WebGL overrides when launch parameters are set - #608

Open
PopcornDev1 wants to merge 2 commits into
daijro:mainfrom
VulpineOS:fix/per-context-webgl-spoofing
Open

fix: per-context WebGL overrides when launch parameters are set#608
PopcornDev1 wants to merge 2 commits into
daijro:mainfrom
VulpineOS:fix/per-context-webgl-spoofing

Conversation

@PopcornDev1

@PopcornDev1 PopcornDev1 commented May 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes a WebGL spoofing precedence issue where launch-level webGl:parameters
entries for UNMASKED_VENDOR_WEBGL and UNMASKED_RENDERER_WEBGL could override
per-context WebGL vendor/renderer values.

The affected WebGL constants are:

  • 37445 / UNMASKED_VENDOR_WEBGL
  • 37446 / UNMASKED_RENDERER_WEBGL

Previously, ClientWebGLContext::GetParameter() checked the generic
MaskConfig::GLParam() path before the existing per-context
WebGLParamsManager path. If the launch fingerprint included
webGl:parameters["37445"] or webGl:parameters["37446"], those global values
won even when a context had its own WebGL vendor/renderer configured.

This change skips the generic parameter lookup for those two debug-renderer
constants so the existing order is preserved:

  1. Require WEBGL_debug_renderer_info to be enabled.
  2. Use per-context WebGL vendor/renderer when present.
  3. Fall back to global webGl:vendor / webGl:renderer.

Testing

  • Separate contexts can report separate WebGL vendor/renderer values.
  • Per-context WebGL overrides launch-level webGl:vendor / webGl:renderer.
  • Per-context WebGL overrides launch-level webGl:parameters["37445"] /
    ["37446"].
  • NewContext presets apply WebGL vendor/renderer values.

Verified locally against a rebuilt Camoufox binary:

tests/patches/live-webgl-
context.py::test_context_webgl_vendor_renderer_are_isolated_and_reusable PASSED
tests/patches/live-webgl-
context.py::test_context_webgl_overrides_launch_config_webgl PASSED
tests/patches/live-webgl-
context.py::test_context_webgl_overrides_launch_parameter_webgl PASSED
tests/patches/live-webgl-
context.py::test_new_context_applies_preset_webgl_vendor_renderer PASSED

4 passed

Also verified manually with CreepJS:

  • CreepJS saw the context-specific WebGL vendor/renderer.
  • CreepJS did not show the conflicting parent/global launch values.
  • Two separate contexts reported separate WebGL GPU identities.
  • Validated with VulpineOS against a rebuilt local Camoufox binary to cover the browser-agent runtime case: multiple isolated contexts in one launched browser process, each with its own WebGL vendor/renderer. CreepJS observed the context-specific GPU values and did not show the conflicting launch-level webGl:parameters["37445"] / ["37446"] values.

@PopcornDev1 PopcornDev1 changed the title Fix per-context WebGL overrides when launch parameters are set fix: per-context WebGL overrides when launch parameters are set May 5, 2026
@PopcornDev1

Copy link
Copy Markdown
Contributor Author

@icepaq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant