CVE-2026-143206: net/mlx5e: Block E-Switch mode changes during IPsec state creation

Published Dec 3, 2026
·
Updated

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

net/mlx5e: Block E-Switch mode changes during IPsec state creation

mlx5exfrmaddstate() reads priv->ipsec before blocking eswitch mode changes. A concurrent profile change can free the saved IPsec context and cause use-after-free.

The temporary mode reservation was added in commit 22239eb258bc ("net/mlx5e: Prevent tunnel reformat when tunnel mode not allowed") after saving priv->ipsec but the race was actually enabled by the "Fixes" commit. Extend the reservation to cover obtaining the context as well.

Use mlx5eswitchblockmode(mdev, false) for the temporary reservation, as policy creation does, to check operation ownership under modelock without rejecting existing eswitch users. This allows reusing existing IPsec tables while TC rules exist on VF representors.

Check the context only after taking the mode reservation, so a concurrent mode change consistently returns -EBUSY and a missing context returns -EOPNOTSUPP, preserving software fallback for crypto offload. Keep the atomic acquire-placeholder path exempt, since it creates no hardware state and cannot take sleeping locks.

This was found by Sashiko, during review of the last patch in the series. No reproduction attempted, as it seems quite a tricky race to successfully trigger.

Affected Software

5 affected componentsFixes available
Linux Linux kernel
linux/kernel>=5.13.0<7.3.7
7.3.7
debian/linux*
debian/linux*
debian/linux*

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.7
  2. Compensating control

    In mlx5e_xfrm_add_state(), take the temporary mode reservation with mlx5_eswitch_block_mode(mdev, false) before obtaining or checking priv->ipsec, and hold the reservation through context acquisition.

Event History

Dec 3, 2026
CVE Published
via MITRE·09:20 AM
Data Sourced
via MITRE·09:20 AM
Description
Data Sourced
via OSV·09:20 AM
DescriptionAffected Software
Data Sourced
via NVD·10:17 AM
Description

Frequently Asked Questions

1

Which systems are exposed to this race?

Systems using the mlx5e driver for IPsec state creation are exposed when an E-Switch profile or mode change can occur concurrently. The race involves a saved IPsec context being freed during that concurrent change, leading to a use-after-free.

2

Does the atomic acquire-placeholder path require the same protection?

No. The atomic acquire-placeholder path is exempt because it creates no hardware state and cannot take sleeping locks.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203