Skip to contentSkip to conversation

CVE-2026-98144: accel/amdxdna: put the chained BO when its mapping fails

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: put the chained BO when its mapping fails

amdxdna_cmd_set_error() looks up the first BO of a command chain, which takes a reference, and drops it at the end of the function. The mapping of that BO is established in between, and the failure path returns without the put, so the reference is leaked.

Ordinary use does not reach it. The chain has been submitted before any of this runs, so aie2_cmdlist_fill_slot() has already called amdxdna_cmd_get_op() on that BO and amdxdna_gem_vmap() has cached its address. What makes it reachable is that the BO is resolved again by handle here, and the handle is userspace's to recycle: closing it after submission and importing a dma-buf whose exporter implements no vmap onto the same id leaves amdxdna_gem_get_obj() returning an object this cannot map, since prime_import() types every import AMDXDNA_BO_SHARE.

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

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

	Issue introduced in 7.1 with commit d76856beb4a4a6c42244054cd780c00f2d33de4e and fixed in 7.2.7 with commit eb90cb257e0792ac11f0347254bad3fc72417db6
	Issue introduced in 7.1 with commit d76856beb4a4a6c42244054cd780c00f2d33de4e and fixed in 7.3-rc2 with commit 7e33ba3a1d48c2d20ed270dec9d2d08332585c8e

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-98144

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/amdxdna_ctx.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/eb90cb257e0792ac11f0347254bad3fc72417db6
	https://git.kernel.org/stable/c/7e33ba3a1d48c2d20ed270dec9d2d08332585c8e