In the Linux kernel, the following vulnerability has been resolved:
accel: ethosu: Don't read the U65 rounding mode as a storage mode
Bits 15:14 of NPU_SET_{IFM,OFM}_PRECISION select the activation storage
mode on U85 only. On U65 the same field holds the rounding mode, and the
command stream parser has read it as a storage mode since the driver was
added.
That went unnoticed while unknown values fell through the switch, but
now that they are rejected, every U65 command stream that asks for
natural rounding (2) fails CMDSTREAM_BO_CREATE with -EINVAL. Mesa emits
it for average pooling, concatenation, split, unpack, strided slice, LUT
and argmax, which is 72 failures of the Teflon test suite on an i.MX93.
Truncating rounding (1) is misread as well: it picks the two-tile
address path and computes a bogus feature map size from tile bases the
command stream never set.
Read the field as a storage mode only on the hardware where it is one.
CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 7.8
AV:L - The malformed data is an NPU command stream a local process passes through DRM_IOCTL_ETHOSU_CMDSTREAM_BO_CREATE on /dev/accel/accelN, which is validated by ethosu_gem_cmdstream_copy_and_validate() -> calc_sizes() -> feat_matrix_length(), then run via DRM_IOCTL_ETHOSU_SUBMIT. No network or radio transport carries it.
AC:L - The attacker writes the whole command stream: rounding bits 15:14 = 1 in NPU_SET_OFM_PRECISION, x past WIDTH0_M1, and an arbitrary NPU_SET_OFM_BASE1. The validator then checks only base[0] while the U65 hardware uses base[1]. The result is deterministic and needs no race.
PR:L - The ethosu ioctls CMDSTREAM_BO_CREATE and SUBMIT are registered with flags 0, with no DRM_ROOT_ONLY or capability check. Only permission to open the accel node is needed, which an ordinary user in the render/video group on a U65 board (e.g. i.MX93) holds.
UI:N - The attacker's own process builds and submits the command stream. No other user has to do anything.
S:U - The broken check is the kernel's own command-stream validator, and the NPU DMA it lets through corrupts the host kernel's own memory. That is the same security authority, i.e. a normal local privilege escalation, not a guest or sandbox escape.
C:H - With rounding mode 1 on U65, feat_matrix_length() uses the storage-1 tile path and never bounds IFM/IFM2 base[1]/base[3]. The NPU can therefore DMA-read memory past the region BO at an offset the attacker chooses, and the result comes back through the attacker's mmapped OFM BO.
I:H - The same mismatch on NPU_SET_OFM_PRECISION leaves OFM base[1]/base[3] unchecked, so region_size[] understates what the hardware writes. The ethosu_job.c region_size > gem->size check passes while the NPU writes attacker-computed output outside the BO, into kernel memory.
A:H - Uncontrolled NPU DMA writes outside the BO can corrupt kernel data and panic the system. On unaffected command streams, the misread also makes every Mesa U65 job with natural rounding fail with -EINVAL.
| Attack Vector |
Local |
Scope |
Unchanged |
| Attack Complexity |
Low |
Confidentiality Impact |
High |
| Privileges Required |
Low |
Integrity Impact |
High |
| User Interaction |
None |
Availability Impact |
High |
AV:L - The malformed data is an NPU command stream a local process passes through DRM_IOCTL_ETHOSU_CMDSTREAM_BO_CREATE on /dev/accel/accelN, which is validated by ethosu_gem_cmdstream_copy_and_validate() -> calc_sizes() -> feat_matrix_length(), then run via DRM_IOCTL_ETHOSU_SUBMIT. No network or radio transport carries it.
AC:L - The attacker writes the whole command stream: rounding bits 15:14 = 1 in NPU_SET_OFM_PRECISION, x past WIDTH0_M1, and an arbitrary NPU_SET_OFM_BASE1. The validator then checks only base[0] while the U65 hardware uses base[1]. The result is deterministic and needs no race.
PR:L - The ethosu ioctls CMDSTREAM_BO_CREATE and SUBMIT are registered with flags 0, with no DRM_ROOT_ONLY or capability check. Only permission to open the accel node is needed, which an ordinary user in the render/video group on a U65 board (e.g. i.MX93) holds.
UI:N - The attacker's own process builds and submits the command stream. No other user has to do anything.
S:U - The broken check is the kernel's own command-stream validator, and the NPU DMA it lets through corrupts the host kernel's own memory. That is the same security authority, i.e. a normal local privilege escalation, not a guest or sandbox escape.
C:H - With rounding mode 1 on U65, feat_matrix_length() uses the storage-1 tile path and never bounds IFM/IFM2 base[1]/base[3]. The NPU can therefore DMA-read memory past the region BO at an offset the attacker chooses, and the result comes back through the attacker's mmapped OFM BO.
I:H - The same mismatch on NPU_SET_OFM_PRECISION leaves OFM base[1]/base[3] unchecked, so region_size[] understates what the hardware writes. The ethosu_job.c region_size > gem->size check passes while the NPU writes attacker-computed output outside the BO, into kernel memory.
A:H - Uncontrolled NPU DMA writes outside the BO can corrupt kernel data and panic the system. On unaffected command streams, the misread also makes every Mesa U65 job with natural rounding fail with -EINVAL.
CVSS 3.1