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
Raising this issue for awareness and discussion. Google believes that there is a potential security issue relying on inserted bounds checks in generated code (SPIR-V, HLSL, DXIL, MSL) when a program contains one or more data races. Most implementations consider a data race to be undefined behaviour and compilers will assume data races do not occur which might lead to incorrect code generation at a lower level. That incorrect code generation could lead to bounds checks being optimized away allowing a malicious shader to read memory outside its purview. We are investigating possible mitigations of such a problem, but do not have a full solution yet.
Whether this is a problem for other implementations likely depends on the architecture of your implementation and, potentially, the underlying implementations you use.
We discussed this internally with some of our security colleagues and no longer expect this to be particularly problematic. They acknowledged that it is probably possible to leak data via a race, but that it is unlikely to have enough throughput to be a practical attack vector and would depend on specific implementation knowledge. It is more likely that attackers would focus on different exploits.
AB: We discussed this internally. We took it to our security teams. They said “you have way bigger problems than this. So don’t sweat this.” We’re not planning to do anything extra special here any more
AB: Using data races is not the most reliable way to attack the GPU.
JB: We want to know what kind of attacks we want to protect against
BC: They were trying to say that exploitation of GPU code is significantly rarer than CPU-side attacks. The first set of things that people look for are vulns in CPU code. The number of successful breaking-out of the sandbox by using the GPUs is rare. We should be focusing on the API and compiler stack
AB: Their feedback is “this is not a practical way to [missed]”
JG: Please say some stuff in the issue about all this, and close it.
Activity
alan-baker commentedon Aug 4, 2021
We discussed this internally with some of our security colleagues and no longer expect this to be particularly problematic. They acknowledged that it is probably possible to leak data via a race, but that it is unlikely to have enough throughput to be a practical attack vector and would depend on specific implementation knowledge. It is more likely that attackers would focus on different exploits.
kdashg commentedon Aug 9, 2021
WGSL meeting minutes 2021-08-03
Use let declarations for literal input in shader,execution,expression…
Revert "Use let declarations for literal input in shader,execution,ex…