CVE-2026-143189: net/mlx5e: IPsec, don't match upper proto selectors in crypto offload TX
In the Linux kernel, the following vulnerability has been resolved:
net/mlx5e: IPsec, don't match upper proto selectors in crypto offload TX
The mentioned commit introduced support for upper protocol selectors (protocol & ports) to mlx5 IPsec offload. In crypto offload mode this causes offloaded TX SAs to stop matching traffic.
In txaddrule(), setupfteupperprotomatch() is called for all offload types and programs a match on the upper protocol (TCP/UDP) and ports. For crypto offload, setupfteesp() is then called and sets ipprotocol to ESP. The resulting rule requires both ESP as the IP protocol and TCP/UDP ports, which no packet can satisfy, so TX crypto offload silently stops working for such SAs.
In crypto offload mode the stack builds the ESP packet and the HW only encrypts it, so the SA rule should only match on the SPI. Move the setupfteupperprotomatch() call under the XFRMDEVOFFLOADPACKET case, where the rule matches the plaintext packet and upper protocol selectors apply.
The other three callers are unaffected: rxaddrulesaselector() is already only invoked for packet offload, and txaddpolicy() / rxaddpolicy() are only reachable in packet offload mode, since xfrm policy offload is exclusively of type XFRMDEVOFFLOADPACKET.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.120 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.66 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.7
Event History
Frequently Asked Questions
Which systems are affected in practice?
Systems using mlx5 IPsec crypto offload for transmit security associations with upper-protocol selectors, such as TCP/UDP protocol or port selectors, are affected. Packet offload mode is not affected by this specific issue.
What is the operational impact?
Affected transmit security associations silently stop matching traffic for hardware crypto offload. The programmed rule requires an impossible combination of ESP as the IP protocol together with TCP/UDP ports.
How can I determine whether I am affected?
Check whether mlx5 IPsec is configured in crypto offload mode and whether transmit security associations use upper-protocol selectors. The issue is limited to TX crypto offload; the described receive selector and policy-rule paths are packet-offload-only and unaffected.