Linux: nfp: hold IPsec RX state under the XArray lock
What fixes it
- 8468d05aa08dc430b5675beadf6f6fb8943f170bLinuxCVE List
- 1a983a4e14c635c40354be110cd9a1a5c94e01e6LinuxCVE List
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
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.
Text from CVE List
Affected versions 12
- Linuxaffected: 57f273adbcd44172cbe0bd10b8b7408dd255699f before c1b1639fb138db52fcfbd1747e92f2454076c6d5CVE List
- Linuxaffected: 57f273adbcd44172cbe0bd10b8b7408dd255699f before dd765023bb54f9650f8b9137906fb2c4a554dd1dCVE List
- Linuxaffected: 57f273adbcd44172cbe0bd10b8b7408dd255699f before 8468d05aa08dc430b5675beadf6f6fb8943f170bCVE List
- Linuxaffected: 57f273adbcd44172cbe0bd10b8b7408dd255699f before fe6c8ea8bfd5d1253bb0de682b1fcc2c4bb92488CVE List
- Linuxaffected: 57f273adbcd44172cbe0bd10b8b7408dd255699f before 1a983a4e14c635c40354be110cd9a1a5c94e01e6CVE List
- Linuxaffected: 6.2CVE List
- Linuxunaffected: all versions before 6.2CVE List
- Linuxunaffected: 6.6.158 through 6.6.*CVE List
- Linuxunaffected: 6.12.112 through 6.12.*CVE List
- Linuxunaffected: 6.18.55 through 6.18.*CVE List
- Linuxunaffected: 7.2.9 through 7.2.*CVE List
- Linuxunaffected: 7.3CVE List
References 5
- git.kernel.org/stable/c/c1b1639fb138db52fcfbd1747e92f2454076c6d5Referencevia CVE List
- git.kernel.org/stable/c/dd765023bb54f9650f8b9137906fb2c4a554dd1dReferencevia CVE List
- git.kernel.org/stable/c/8468d05aa08dc430b5675beadf6f6fb8943f170bReferencevia CVE List
- git.kernel.org/stable/c/fe6c8ea8bfd5d1253bb0de682b1fcc2c4bb92488Referencevia CVE List
- git.kernel.org/stable/c/1a983a4e14c635c40354be110cd9a1a5c94e01e6Referencevia CVE List