You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Considerations for timing attacks using timestamp queries #2218
The spec for performance.now() says in its "Privacy and Security" section:
To ensure that the new API does not significantly improve the accuracy or speed of such attacks, the minimum resolution of the DOMHighResTimeStamp type should be inaccurate enough to prevent attacks.
Where necessary, the user agent should set higher resolution values to time resolution in coarsen time's processing model, to address privacy and security concerns due to architecture or software constraints, or other considerations.
In order to mitigate such attacks user agents may deploy any technique they deem necessary. Deployment of those techniques may vary based on the browser's architecture, the user's device, the content and its ability to maliciously read cross-origin data, or other practical considerations.
We should have similar text in our own Privacy and Security section.
WebGPU also specifies the "timestamp-query" feature, which provides high precision timing of GPU operations. The feature is optional, and a WebGPU implementation may limit its exposure only to those scenarios that are trusted. Alternatively, the timing query results could be processed by a compute shader and aligned to a lower precision.
Activity
kvark commentedon Nov 26, 2021
Here is what we have now
Kangz commentedon Dec 14, 2021
@litherum is that text sufficient? If it isn't, can you make a PR?
Kangz commentedon Jan 11, 2022
Ping @litherum? I think this issue can just be closed.
Kangz commentedon Jan 12, 2022
Please reopen if needed..
theb1rd commentedon Nov 3, 2023
Is it possible to use timestamp queries today? Via browser flags maybe? I've tried on intel and nvidia without success, but need them badly.
gyagp commentedon Nov 4, 2023
@theb1rd Chrome supports it with flag "--enable-dawn-features=allow_unsafe_apis". We just enabled it in ONNX Runtime and you may refer the PR (https://github.com/microsoft/onnxruntime/pull/18108) for details.
theb1rd commentedon Nov 4, 2023
That worked, thanks gyagp!
(I thought I had been running with that flag, but in fact it was "--disable-dawn-features=disallow_unsafe_apis", what the f)
gyagp commentedon Nov 4, 2023
The flag was changed a while ago :) Glad to know it works!