# CVE-2026-53173: accel/ethosu: fix OOB write in ethosu_gem_cmdstream_copy_and_validate()

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.17%, higher than 3% of CVEs (2026-11-30)
- Published: 2026-06-25T08:38:50.709Z
- Modified: 2026-08-05T12:33:42.554Z
- Weaknesses: CWE-787
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

accel/ethosu: fix OOB write in ethosu_gem_cmdstream_copy_and_validate()

The command stream parsing loop increments the index variable a second
time when a 64-bit command word is encountered (bit 14 set), but does
not re-check the loop bound before writing the second word:

    for (i = 0; i < size / 4; i++) {
        bocmds[i] = cmds[0];
        if (cmd & 0x4000) {
            i++;
            bocmds[i] = cmds[1];   /* unchecked */
        }
    }

The buffer bocmds is backed by a DMA allocation of exactly size bytes
from drm_gem_dma_create(ddev, size), giving valid indices [0, size/4-1].

When i == size/4 - 1 on entry to an iteration and bit 14 of cmds[0] is
set, bocmds[size/4-1] is written in bounds, i is then incremented to
size/4, and bocmds[size/4] writes four bytes past the end of the
allocation.

Userspace controls both the buffer contents and the size argument via
the ioctl, making this a userspace-triggerable heap out-of-bounds write.

Fix by checking the incremented index against the buffer bound before
the second write and returning -EINVAL if the buffer is too small to
contain the extended command.

(As written by CVE List.)

## Affected

- Linux Linux: from 5a5e9c0228e613f0ef2a58b9782d7c0ea8f1e58b before db6cb3e35cebf487f9a78ebd4cfa4b83708ff40d; from 5a5e9c0228e613f0ef2a58b9782d7c0ea8f1e58b before c0837b9cf6eabbad8b8cbddaff1a46a6d0a2e29d; 6.19 (not affected: before 6.19; from 7.0.13 up to 7.0.*; from 7.1 up to *)
- linux linux_kernel: from 6.19 before 7.0.13; 7.1

## References

- <https://git.kernel.org/stable/c/db6cb3e35cebf487f9a78ebd4cfa4b83708ff40d> (patch)
- <https://git.kernel.org/stable/c/c0837b9cf6eabbad8b8cbddaff1a46a6d0a2e29d> (patch)

## Sources

- CVE List: [CVE-2026-53173](https://www.cve.org/CVERecord?id=CVE-2026-53173), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2026-53173](https://nvd.nist.gov/vuln/detail/CVE-2026-53173), Public domain, modified 2026-07-06

---

Page: https://cve.day/CVE-2026-53173 · Whole record: https://cve.day/CVE-2026-53173.json · Rebuilt by cve.day 2026-11-25T22:59:25.864Z
