Skip to content
DoS Advisory Advanced CVE-2024-5834

Inappropriate implementation in Dawn (CVE-2024-5834)

A crafted WGSL shader causes the Tint compiler to generate duplicate non-aggregate type declarations in SPIR-V output, leading to a crash. An attacker could potentially exploit this to cause a denial of service in applications that compile untrusted shaders.

gelatin dessert Follow

Originally disclosed on Chrome VRP

Bounty$5,000 High View original
  • Fix shipped in 17 days

REPRODUCE

  1. gn gen out/libfuzzer --args="use_libfuzzer=true tint_build_cmds=true"
  2. ninja -C out/libfuzzer tint_wgsl_fuzzer
  3. out/libfuzzer/tint_wgsl_fuzzer poc.wgsl

CRASH LOG

For the full content, refer to log.txt. This is just a summary.

spirv:1:1 error: Duplicate non-aggregate type declarations are not allowed. Opcode: TypeImage id: 26
  %26 = OpTypeImage %uint 1D 0 0 0 2 R32ui

Note

From this issue, it can be seen that this is the new SPIR-V writer currently being used for Android: https://issues.chromium.org/issues/340992052#comment15

CRASH INFO AND CREDIT

Type of crash: gpu

Reporter credit: gelatin dessert

The original report as published on the Chromium issue tracker, by gelatin dessert. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the SPIR-V writer in Tint fails to deduplicate non-aggregate type declarations, resulting in invalid SPIR-V that triggers a crash.

Impact

A crafted shader could cause a crash (denial of service) in applications that compile untrusted WGSL shaders, such as web browsers or Android components using the new SPIR-V writer.

What the attacker needed

Ability to supply a crafted WGSL shader

How it was found

  1. Generate build files for the fuzzer using gn.
  2. Build the tint_wgsl_fuzzer target with ninja.
  3. Run the fuzzer with the provided proof-of-concept WGSL file.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

This report describes a bug in a shader compiler called Tint, which turns a language called WGSL into another language called SPIR-V. When given a specially crafted shader file, the compiler produces invalid output that contains duplicate type definitions, causing it to crash. This could let an attacker crash software that processes shaders from untrusted sources.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by gelatin dessert

View all

3 more disclosed reports, best first.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.