Files
brave-core/test/data/webgpu/device-adapter-info.html
r0hit0303 c16b4ec7fe [fingerprinting] Handle device info leaks for WebGPU (#36817)
This change scrubs the device related info from GPUAdapterInfo namely vendor, architecture and device.

This change adds a patch to the upstream gpu_adapter.cc to intercept right before the moment we create the gpu adapter info, to scrub out these attributes. It was not possible to do it in gpu_adapter_info.cc as it lacked any context around ExecutionContext which was needed to get the farbling level.

Below are the final behaviour with different farbling levels after this change:

Farbling "off"
- No change in behaviour i.e no scrubbing will occur.
Farbling "balanced" with WebGLBalancedFingerprintingProtection enabled
- Scrub the device related info from GPUAdapterInfo.
Farbling "balanced" with WebGLBalancedFingerprintingProtection disabled
- No change in behaviour i.e no scrubbing will occur.
Farbling "maximum":
- Scrub the device related info from GPUAdapterInfo. Note that this is a new behaviour and not to tied to any feature flag. For maximum farbling it makes sense to have the maximum protection.

Resolves brave/brave-browser#55677
2026-05-29 17:56:20 +01:00

29 lines
716 B
HTML

<!DOCTYPE html>
<html>
<head>
<title>WebGPU device adapter info test</title>
<meta charset="utf-8">
</head>
<body>
<script>
window.gpuAdapterInfoPromise = (async () => {
if (!navigator.gpu) {
return 'no-gpu';
}
const adapter = await navigator.gpu.requestAdapter({
featureLevel: 'compatibility',
});
if (!adapter) {
return 'no-adapter';
}
const device = await adapter.requestDevice();
if (!device) {
return 'no-device';
}
const info = device.adapterInfo;
return info.vendor + ',' + info.architecture + ',' + info.device;
})();
</script>
</body>
</html>