# CVE-2026-23440: net/mlx5e: Fix race condition during IPSec ESN update

- Severity: High 7.5 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.30%, higher than 24% of CVEs (2026-12-01)
- Published: 2026-04-03T15:15:24.596Z
- Modified: 2026-10-19T19:17:48.243Z
- Weaknesses: CWE-362
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: Linux

## Description

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

net/mlx5e: Fix race condition during IPSec ESN update

In IPSec full offload mode, the device reports an ESN (Extended
Sequence Number) wrap event to the driver. The driver validates this
event by querying the IPSec ASO and checking that the esn_event_arm
field is 0x0, which indicates an event has occurred. After handling
the event, the driver must re-arm the context by setting esn_event_arm
back to 0x1.

A race condition exists in this handling path. After validating the
event, the driver calls mlx5_accel_esp_modify_xfrm() to update the
kernel's xfrm state. This function temporarily releases and
re-acquires the xfrm state lock.

So, need to acknowledge the event first by setting esn_event_arm to
0x1. This prevents the driver from reprocessing the same ESN update if
the hardware sends events for other reason. Since the next ESN update
only occurs after nearly 2^31 packets are received, there's no risk of
missing an update, as it will happen long after this handling has
finished.

Processing the event twice causes the ESN high-order bits (esn_msb) to
be incremented incorrectly. The driver then programs the hardware with
this invalid ESN state, which leads to anti-replay failures and a
complete halt of IPSec traffic.

Fix this by re-arming the ESN event immediately after it is validated,
before calling mlx5_accel_esp_modify_xfrm(). This ensures that any
spurious, duplicate events are correctly ignored, closing the race
window.

(As written by CVE List.)

## Affected

- Linux Linux: from fef06678931ff67b158d337b581e5cf5ca40a3a3 before 3dffc083292e6872787bd7e34b957627622f9af4; from fef06678931ff67b158d337b581e5cf5ca40a3a3 before 2051c709dce92da3550040aa7949cd5a9c89b14e; from fef06678931ff67b158d337b581e5cf5ca40a3a3 before 96c9c25b74686ac2de15921c9ad30c5ef13af8cd; from fef06678931ff67b158d337b581e5cf5ca40a3a3 before 8d625c15471fb8780125eaef682983a96af77bdc; from fef06678931ff67b158d337b581e5cf5ca40a3a3 before beb6e2e5976a128b0cccf10d158124422210c5ef; 6.4 (not affected: before 6.4; from 6.6.130 up to 6.6.*; from 6.12.78 up to 6.12.*; from 6.18.20 up to 6.18.*; from 6.19.10 up to 6.19.*; from 7.0 up to *)
- linux linux_kernel: from 6.4.1 before 6.6.130; from 6.7 before 6.12.78; from 6.13 before 6.18.20; from 6.19 before 6.19.10; 6.4; 7.0

## Every score

- Linux: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 4.7 Medium `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/3dffc083292e6872787bd7e34b957627622f9af4> (patch)
- <https://git.kernel.org/stable/c/2051c709dce92da3550040aa7949cd5a9c89b14e> (patch)
- <https://git.kernel.org/stable/c/96c9c25b74686ac2de15921c9ad30c5ef13af8cd> (patch)
- <https://git.kernel.org/stable/c/8d625c15471fb8780125eaef682983a96af77bdc> (patch)
- <https://git.kernel.org/stable/c/beb6e2e5976a128b0cccf10d158124422210c5ef> (patch)

## Sources

- CVE List: [CVE-2026-23440](https://www.cve.org/CVERecord?id=CVE-2026-23440), CVE Terms of Use, modified 2026-10-19
- NVD: [CVE-2026-23440](https://nvd.nist.gov/vuln/detail/CVE-2026-23440), Public domain, modified 2026-10-19

---

Page: https://cve.day/CVE-2026-23440 · Whole record: https://cve.day/CVE-2026-23440.json · Rebuilt by cve.day 2026-11-25T22:59:17.876Z
