CVE-2026-98145: accel/amdxdna: reject a command chain that carries no commands
In the Linux kernel, the following vulnerability has been resolved:
accel/amdxdna: reject a command chain that carries no commands
A chain whose commandcount is zero passes the payload length check, because structsize(payload, data, 0) is just the header. The fill loop then does not run, so offset stays zero and the request is submitted with a zero-length buffer.
On firmware without AIE2NPUCOMMAND that ends at the opcode check, since op is still ERTINVALIDCMD and aie2getchainmsgop() answers MSGOPMAXOPCODE. aie2getnpuchainmsgop() answers MSGOPCHAINEXECNPU whatever it is given, so there the submission continues to drmclflushvirtrange(cmdbuf, 0), which reads the byte before the buffer and faults on the vmap guard page. EXECCMD is reachable by any process that can open the render node.
Reject the request instead.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Reject command-chain requests that carry no commands (command_count equal to zero) before processing or submitting the chain.
Event History
Frequently Asked Questions
Who can trigger this issue?
Any process that can open the AMD XDNA render node can reach the affected EXEC_CMD path. The issue does not require elevated privileges beyond access to that device node.
What input is needed to trigger the failure?
An attacker must submit a command chain with command_count set to zero. This passes the payload-length validation and results in submission of a zero-length command buffer.
Are all firmware configurations affected in the same way?
The described fault occurs on firmware without AIE2_NPU_COMMAND, where the request can continue to drm_clflush_virt_range(cmd_buf, 0) and read before the buffer into the vmap guard page. The data does not establish equivalent behavior for other firmware configurations.
What is the remediation?
Apply a kernel version containing the fix that rejects command chains with zero commands. The referenced stable commits are ed74e8d603df457bfcf16ed4f8f1660a1525759e and ef6d27af71e1dc43181ec797a6aaa77c27c36786.