Skip to contentSkip to conversation

CVE-2026-31493: RDMA/efa: Fix use of completion ctx after free

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Apr 22

lore
Share & tools
lore
#0 lore raw

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

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

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

RDMA/efa: Fix use of completion ctx after free

On admin queue completion handling, if the admin command completed with error we print data from the completion context. The issue is that we already freed the completion context in polling/interrupts handler which means we print data from context in an unknown state (it might be already used again).
Change the admin submission flow so alloc/dealloc of the context will be symmetric and dealloc will be called after any potential use of the context.

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

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

	Issue introduced in 5.12 with commit 68fb9f3e312a36e49fd05ec2d6b668daf2c4931a and fixed in 6.18.21 with commit 0dd98aea1c0c45987fa2dd92f988b0eb1a72c125
	Issue introduced in 5.12 with commit 68fb9f3e312a36e49fd05ec2d6b668daf2c4931a and fixed in 6.19.11 with commit 1cf95fe5dc5471efea947b4c6f8913da6bc7976e
	Issue introduced in 5.12 with commit 68fb9f3e312a36e49fd05ec2d6b668daf2c4931a and fixed in 7.0 with commit ef3b06742c8a201d0e83edc9a33a89a4fe3009f8

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

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/infiniband/hw/efa/efa_com.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/0dd98aea1c0c45987fa2dd92f988b0eb1a72c125
	https://git.kernel.org/stable/c/1cf95fe5dc5471efea947b4c6f8913da6bc7976e
	https://git.kernel.org/stable/c/ef3b06742c8a201d0e83edc9a33a89a4fe3009f8