{"id":"CVE-2026-53173","state":"PUBLISHED","title":"accel/ethosu: fix OOB write in ethosu_gem_cmdstream_copy_and_validate()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\naccel/ethosu: fix OOB write in ethosu_gem_cmdstream_copy_and_validate()\n\nThe command stream parsing loop increments the index variable a second\ntime when a 64-bit command word is encountered (bit 14 set), but does\nnot re-check the loop bound before writing the second word:\n\n    for (i = 0; i < size / 4; i++) {\n        bocmds[i] = cmds[0];\n        if (cmd & 0x4000) {\n            i++;\n            bocmds[i] = cmds[1];   /* unchecked */\n        }\n    }\n\nThe buffer bocmds is backed by a DMA allocation of exactly size bytes\nfrom drm_gem_dma_create(ddev, size), giving valid indices [0, size/4-1].\n\nWhen i == size/4 - 1 on entry to an iteration and bit 14 of cmds[0] is\nset, bocmds[size/4-1] is written in bounds, i is then incremented to\nsize/4, and bocmds[size/4] writes four bytes past the end of the\nallocation.\n\nUserspace controls both the buffer contents and the size argument via\nthe ioctl, making this a userspace-triggerable heap out-of-bounds write.\n\nFix by checking the incremented index against the buffer bound before\nthe second write and returning -EINVAL if the buffer is too small to\ncontain the extended command.","publishedAt":"2026-06-25T08:38:50.709Z","updatedAt":"2026-08-05T12:33:42.554Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"5a5e9c0228e613f0ef2a58b9782d7c0ea8f1e58b","status":"affected","lessThan":"db6cb3e35cebf487f9a78ebd4cfa4b83708ff40d","versionType":"git"},{"version":"5a5e9c0228e613f0ef2a58b9782d7c0ea8f1e58b","status":"affected","lessThan":"c0837b9cf6eabbad8b8cbddaff1a46a6d0a2e29d","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/accel/ethosu/ethosu_gem.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.19","versionType":"semver"},{"version":"7.0.13","status":"unaffected","lessThanOrEqual":"7.0.*","versionType":"semver"},{"version":"7.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/accel/ethosu/ethosu_gem.c"]}],"references":["https://git.kernel.org/stable/c/db6cb3e35cebf487f9a78ebd4cfa4b83708ff40d","https://git.kernel.org/stable/c/c0837b9cf6eabbad8b8cbddaff1a46a6d0a2e29d"],"weaknesses":[],"ingestedAt":"2026-10-29T20:12:16.098Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/53xxx/CVE-2026-53173.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-53173","state":"PUBLISHED","datePublished":"2026-06-25T08:38:50.709Z","dateUpdated":"2026-08-05T12:33:42.554Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-06-09T07:44:35.389Z"},"containers":{"cna":{"title":"accel/ethosu: fix OOB write in ethosu_gem_cmdstream_copy_and_validate()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\naccel/ethosu: fix OOB write in ethosu_gem_cmdstream_copy_and_validate()\n\nThe command stream parsing loop increments the index variable a second\ntime when a 64-bit command word is encountered (bit 14 set), but does\nnot re-check the loop bound before writing the second word:\n\n    for (i = 0; i < size / 4; i++) {\n        bocmds[i] = cmds[0];\n        if (cmd & 0x4000) {\n            i++;\n            bocmds[i] = cmds[1];   /* unchecked */\n        }\n    }\n\nThe buffer bocmds is backed by a DMA allocation of exactly size bytes\nfrom drm_gem_dma_create(ddev, size), giving valid indices [0, size/4-1].\n\nWhen i == size/4 - 1 on entry to an iteration and bit 14 of cmds[0] is\nset, bocmds[size/4-1] is written in bounds, i is then incremented to\nsize/4, and bocmds[size/4] writes four bytes past the end of the\nallocation.\n\nUserspace controls both the buffer contents and the size argument via\nthe ioctl, making this a userspace-triggerable heap out-of-bounds write.\n\nFix by checking the incremented index against the buffer bound before\nthe second write and returning -EINVAL if the buffer is too small to\ncontain the extended command."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"5a5e9c0228e613f0ef2a58b9782d7c0ea8f1e58b","status":"affected","lessThan":"db6cb3e35cebf487f9a78ebd4cfa4b83708ff40d","versionType":"git"},{"version":"5a5e9c0228e613f0ef2a58b9782d7c0ea8f1e58b","status":"affected","lessThan":"c0837b9cf6eabbad8b8cbddaff1a46a6d0a2e29d","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/accel/ethosu/ethosu_gem.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.19","versionType":"semver"},{"version":"7.0.13","status":"unaffected","lessThanOrEqual":"7.0.*","versionType":"semver"},{"version":"7.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/accel/ethosu/ethosu_gem.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/db6cb3e35cebf487f9a78ebd4cfa4b83708ff40d"},{"url":"https://git.kernel.org/stable/c/c0837b9cf6eabbad8b8cbddaff1a46a6d0a2e29d"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable code is reached through the local DRM accel ioctl `DRM_IOCTL_ETHOSU_CMDSTREAM_BO_CREATE` on `/dev/accel/accel*`, not through network, adjacent, or physical input.\nAC:L - Userspace controls both the command stream contents and size, and can deterministically place a 64-bit command marker at the final word to trigger the unchecked second write. No race or external state is required.\nPR:L - The driver ioctl has no capability, root, master, or authentication check, but the attacker must be a local user/process able to open the accelerator device node.\nUI:N - No victim action is needed after the attacker has local device access; a single ioctl with attacker-controlled arguments reaches the vulnerable function.\nS:U - This is kernel memory corruption within the same host security authority and does not cross a VM, IOMMU, or other distinct security boundary.\nC:H - The bug is a userspace-triggered kernel heap/DMA allocation out-of-bounds write, which is defensibly exploitable as memory corruption and can lead to kernel compromise and disclosure of arbitrary kernel data.\nI:H - An out-of-bounds write of attacker-controlled command data past a kernel DMA-backed GEM allocation can corrupt adjacent memory and is treated as high-integrity-impact kernel memory corruption.\nA:H - Even without full exploitation, corrupting memory past the allocation can crash or destabilize the kernel, giving high availability impact."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:33:42.554Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.19","versionEndExcluding":"7.0.13"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.19","versionEndExcluding":"7.1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}