CVE-2025-71308: accel/amdxdna: Fix potential NULL pointer dereference in context cleanup
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
accel/amdxdna: Fix potential NULL pointer dereference in context cleanup
aie_destroy_context() is invoked during error handling in aie2_create_context(). However, aie_destroy_context() assumes that the context's mailbox channel pointer is non-NULL. If mailbox channel creation fails, the pointer remains NULL and calling aie_destroy_context() can lead to a NULL pointer dereference.
In aie2_create_context(), replace aie_destroy_context() with a function which request firmware to remove the context created previously.
The Linux kernel CVE team has assigned CVE-2025-71308 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.14 with commit be462c97b7dfd24999babe39cce3de224ebe1f80 and fixed in 6.19.4 with commit 2611c9616cb52d3ed54a6095d72d18e645a6955a Issue introduced in 6.14 with commit be462c97b7dfd24999babe39cce3de224ebe1f80 and fixed in 7.0 with commit 97f27573837ef96b4ba42af463cc800cab615c0e
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-2025-71308
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/2611c9616cb52d3ed54a6095d72d18e645a6955a https://git.kernel.org/stable/c/97f27573837ef96b4ba42af463cc800cab615c0e