AZL-118337: CVE-2026-143206 affecting package kernel 6.6.161.1-1
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
Event History
Frequently Asked Questions
Which systems are exposed to this race condition?
Systems using the mlx5e driver with IPsec state creation are relevant. The race requires a concurrent E-Switch profile or mode change while mlx5e_xfrm_add_state() is obtaining the IPsec context.
What conditions are needed to trigger the use-after-free?
IPsec state creation must overlap with an E-Switch mode change. The mode change can free the saved IPsec context after it has been read but before mode changes are blocked.
How does the resolved behavior handle conflicting operations?
A concurrent mode change is consistently rejected with -EBUSY once the temporary mode reservation is held. If no IPsec context is available after reservation, the operation returns -EOPNOTSUPP, preserving software fallback for crypto offload.
Does the atomic acquire-placeholder path require the same handling?
No. That path is exempt because it creates no hardware state and cannot take sleeping locks.