Skip to contentSkip to conversation

CVE-2026-98145: accel/amdxdna: reject a command chain that carries no commands

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 25

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

accel/amdxdna: reject a command chain that carries no commands

A chain whose command_count is zero passes the payload length check, because struct_size(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 AIE2_NPU_COMMAND that ends at the opcode check, since op is still ERT_INVALID_CMD and aie2_get_chain_msg_op() answers MSG_OP_MAX_OPCODE. aie2_get_npu_chain_msg_op() answers MSG_OP_CHAIN_EXEC_NPU whatever it is given, so there the submission continues to drm_clflush_virt_range(cmd_buf, 0), which reads the byte before the buffer and faults on the vmap guard page. EXEC_CMD is reachable by any process that can open the render node.

Reject the request instead.

The Linux kernel CVE team has assigned CVE-2026-98145 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 7.1 with commit 8ed8b02396172b137ca8c78c3cb999ddf4fb0bbf and fixed in 7.2.7 with commit ed74e8d603df457bfcf16ed4f8f1660a1525759e
	Issue introduced in 7.1 with commit 8ed8b02396172b137ca8c78c3cb999ddf4fb0bbf and fixed in 7.3-rc2 with commit ef6d27af71e1dc43181ec797a6aaa77c27c36786

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-98145

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/accel/amdxdna/aie2_message.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/ed74e8d603df457bfcf16ed4f8f1660a1525759e
	https://git.kernel.org/stable/c/ef6d27af71e1dc43181ec797a6aaa77c27c36786