Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DarthShader fuzzing on bare hardware #6561

Open
DemiMarie opened this issue Nov 16, 2024 · 0 comments
Open

DarthShader fuzzing on bare hardware #6561

DemiMarie opened this issue Nov 16, 2024 · 0 comments

Comments

@DemiMarie
Copy link

DemiMarie commented Nov 16, 2024

Is your feature request related to a problem? Please describe.
wgpu is a Web-exposed, privileged attack surface. Furthermore, it passes mostly-untrusted input to GPU shader compilers not designed for this. This is well-known to be a problem, but DarthShader (a GPU shader fuzzer) provides a potential solution.

Describe the solution you'd like
wgpu should use DarthShader to fuzz both wgpu itself and all supported backends, including:

  • Linux
    • Mesa (lavapipe, Intel, AMD, Nouveau, Asahi, Freedreno)
    • Nvidia proprietary
  • Metal (both Apple silicon and pre-Apple silicon)
  • Direct3D 12 (Intel, AMD, Nvidia, Qualcomm)

Furthermore, DarthShader should be extended to run the resulting shaders and compare results, to ensure that the drivers are not miscompiling shaders in a potentially security-critical way.

Describe alternatives you've considered
I am not aware of other alternatives that do not leave users vulnerable to attacks. This does not mean that such alternatives do not exist.

On Linux, it may be possible to use the virtio-GPU native context infrastructure to run Mesa in a per-site process that is extremely tightly sandboxed (with no access to the filesystem, network, or windowing system), or even to compile it to WebAssembly.

Additional context
GPU userspace drivers are not security boundaries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant