CVE-2026-98561: nfp: hold IPsec RX state under the XArray lock
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
nfp: hold IPsec RX state under the XArray lock
nfp_net_ipsec_rx() drops the XArray lock before taking a reference to the xfrm_state it found. The delete path can erase the entry and drop the last state reference in that interval. RX can then try to increment a zero refcount after the state has been queued for destruction.
The driver queues firmware invalidation asynchronously; the delete path does not wait for the command to complete or drain pending RX processing.
The XFRM garbage collector waits for an RCU grace period before freeing the state. That delays reclamation but does not make acquiring a reference from zero valid.
Take the xfrm_state reference before releasing the XArray lock so xa_erase() cannot run between lookup and reference acquisition.
The Linux kernel CVE team has assigned CVE-2026-98561 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.2 with commit 57f273adbcd44172cbe0bd10b8b7408dd255699f and fixed in 6.6.158 with commit c1b1639fb138db52fcfbd1747e92f2454076c6d5 Issue introduced in 6.2 with commit 57f273adbcd44172cbe0bd10b8b7408dd255699f and fixed in 6.12.112 with commit dd765023bb54f9650f8b9137906fb2c4a554dd1d Issue introduced in 6.2 with commit 57f273adbcd44172cbe0bd10b8b7408dd255699f and fixed in 6.18.55 with commit 8468d05aa08dc430b5675beadf6f6fb8943f170b Issue introduced in 6.2 with commit 57f273adbcd44172cbe0bd10b8b7408dd255699f and fixed in 7.2.9 with commit fe6c8ea8bfd5d1253bb0de682b1fcc2c4bb92488 Issue introduced in 6.2 with commit 57f273adbcd44172cbe0bd10b8b7408dd255699f and fixed in 7.3-rc5 with commit 1a983a4e14c635c40354be110cd9a1a5c94e01e6
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-98561
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/net/ethernet/netronome/nfp/crypto/ipsec.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/c1b1639fb138db52fcfbd1747e92f2454076c6d5 https://git.kernel.org/stable/c/dd765023bb54f9650f8b9137906fb2c4a554dd1d https://git.kernel.org/stable/c/8468d05aa08dc430b5675beadf6f6fb8943f170b https://git.kernel.org/stable/c/fe6c8ea8bfd5d1253bb0de682b1fcc2c4bb92488 https://git.kernel.org/stable/c/1a983a4e14c635c40354be110cd9a1a5c94e01e6