drm/v3d: Skip CSD when it has zeroed workgroups
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ d223f98f02099b002903b9b22b56febae16ef80d · < 11e6432836394e00d39e468cd514f9ddb66f1e49| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/v3d: Skip CSD when it has zeroed workgroups
A compute shader dispatch encodes its workgroup counts in the CFG0..CFG2 registers. Kicking off a dispatch with a zero count in any of the three dimensions is invalid. First, the hardware will process 0 as 65536, while the user-space driver exposes a maximum of 65535. Over that, a submission with a zeroed workgroup dimension should be a no-op.
These zeroed counts can reach the dispatch path through an indirect CSD job, whose workgroup counts are only known once the indirect buffer is read and may legitimately be zero, but such scenario should only result in a no-op.
Overwrite the indirect CSD job workgroup counts with the indirect BO ones, even if they are zeroed, and don't submit the job to the hardware when any of the workgroup counts is zero, so the job completes immediately instead of running the shader.
From the CVE record · Linux
The Linux kernel’s drm/v3d driver can submit an indirect compute shader job with a zero workgroup count when it should be a no-op. A local user-space submission with this condition can cause the hardware to run the shader instead; the input does not specify an authentication requirement or additional user interaction.
Engineers running Linux kernels with the drm/v3d driver should check their installations; affected versions are not specified.