accel: ethosu: Fix element size accounting for cmd stream validation
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
accel: ethosu: Fix element size accounting for cmd stream validation
There are 2 issues with the element size handling in the command stream validation which result in too small of a size calculated when the element size is 16/32/64 bits.
For NHWC format, the element size is simply missing from the calculation.
The bitfield for the element size is different between IFM/IFM2 and OFM. IFM and IFM2 encode the precision in parameter bits 2:3, while OFM uses bits 1:2.
From the CVE record · Linux
The Linux kernel ethosu accelerator calculates command stream sizes too small for 16-, 32-, and 64-bit elements because its validation omits the element size for NHWC format and reads OFM precision from the wrong bits. This can cause command streams to be validated against an undersized calculation; the input does not specify an attacker outcome, access requirements, or user interaction.
Engineers running Linux kernels with the ethosu accelerator should check whether their kernel is affected; affected versions are not specified.