Description
In the Linux kernel, the following vulnerability has been resolved: drm/vc4: Zero the tile state data array before each BIN job The binner BO is a single 16MB buffer split into 512KB slots that are handed out to jobs at submission time and recycled as jobs complete, without ever being cleared. Each slot holds the job's Tile State Data Array (TSDA) at its start, followed by the tile allocation pool. While the tile allocation pool is only walked by the render thread through branches the binner generated during the current job, the TSDA is the PTB's own per-tile bookkeeping and is consumed by the hardware itself. Although the kernel sets the "Auto-initialise Tile State Data Array" flag in the tile binning mode configuration, the PTB demonstrably still acts on stale tile state left by the slot's previous user: the binner ends up creating invalid command streams with invalid primitive streams and branches, which can cause GPU hangs as observed in [1][2]. Zero the TSDA when the job's binning slot is configured. This clears 48 bytes per tile (~24KB for a 1080p frame) in the submission path, and guarantees the PTB never sees another job's tile state. The tile count is only checked for being non-zero today, so the 8-bit fields it comes from can describe a tile state array almost six times larger than the slot it has to live in. Bound it before the slot is handed out, since such size decides how much of the slot is left for the tile alloc pool.
Affected products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
Linux Linux
Default version status: unaffected
553c942f8b2cbc7394b4d4fa2f848b23a8f07451 to < c5d8e8e1a8e3b4e464683c5a8a869c16a6382feaaffected553c942f8b2cbc7394b4d4fa2f848b23a8f07451 to < d3677372e0275e139f0efd2872c5a524b5d12868affected553c942f8b2cbc7394b4d4fa2f848b23a8f07451 to < c8dea7e7c6098e383e44f21a64d0431da5480e3faffected553c942f8b2cbc7394b4d4fa2f848b23a8f07451 to < f5802be65535f8818af7191159cf8c11f48ab2a2affected553c942f8b2cbc7394b4d4fa2f848b23a8f07451 to < 0e858422df2334165293ea742da9fbb2e51f2739affected553c942f8b2cbc7394b4d4fa2f848b23a8f07451 to < 57667eb7548faaac396c6e39f3b4444dab5b097caffected553c942f8b2cbc7394b4d4fa2f848b23a8f07451 to < a75c8f365e209aa9bb927b0942a7840152d44892affected553c942f8b2cbc7394b4d4fa2f848b23a8f07451 to < 48a570c964d8e37d353381e4195106277e17f5cbaffected
Linux Linux
Default version status: affected
4.13affected0 to < 4.13unaffected5.10.265 to ≤ 5.10.*unaffected5.15.216 to ≤ 5.15.*unaffected6.1.183 to ≤ 6.1.*unaffected6.6.151 to ≤ 6.6.*unaffected6.12.103 to ≤ 6.12.*unaffected6.18.44 to ≤ 6.18.*unaffected7.1.8 to ≤ 7.1.*unaffected7.2 to ≤ *unaffected
References
- https://git.kernel.org/stable/c/c5d8e8e1a8e3b4e464683c5a8a869c16a6382fea ↗
- https://git.kernel.org/stable/c/d3677372e0275e139f0efd2872c5a524b5d12868 ↗
- https://git.kernel.org/stable/c/c8dea7e7c6098e383e44f21a64d0431da5480e3f ↗
- https://git.kernel.org/stable/c/f5802be65535f8818af7191159cf8c11f48ab2a2 ↗
- https://git.kernel.org/stable/c/0e858422df2334165293ea742da9fbb2e51f2739 ↗
- https://git.kernel.org/stable/c/57667eb7548faaac396c6e39f3b4444dab5b097c ↗
- https://git.kernel.org/stable/c/a75c8f365e209aa9bb927b0942a7840152d44892 ↗
- https://git.kernel.org/stable/c/48a570c964d8e37d353381e4195106277e17f5cb ↗