AZL-118340: CVE-2026-143207 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 policy creation
Eswitch mode changes can tear down the IPsec context while policy creation is accessing it. The mode-blocking reference acquired when creating a flow table comes too late: the table lookup already accesses the IPsec context before taking that reference.
Take a temporary mode-blocking reference before checking the IPsec context and validating the policy. This gets dropped after successful setup, when the flow table holds its own reference.
The temporary reservation must allow reuse of existing IPsec tables. For example: 1. An offloaded inbound IPsec policy is added on the uplink. 2. A TC flower rule is added on a VF representor. 3. Another uplink policy is added using the same RX tables.
The third policy reuses the first policy's tables, so it must not be rejected merely because esw->usercount is nonzero. Add a checkusers argument to mlx5eswitchblockmode(). Pass false for temporary policy reservations and true when creating the first table (rxget()/txget()).
Temporary reservations take modelock and check operation ownership without requiring eswitch usercount to be zero.
mlx5exfrmaddstate() needs the same early mode reservation and is handled in the next patch.
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
What conditions are required for this issue to be reachable?
The described race involves IPsec policy creation together with E-Switch mode changes in the mlx5e networking driver. The examples also involve offloaded inbound IPsec policies, TC flower rules, and VF representors.
What is the likely effect of the race condition?
An E-Switch mode change can tear down an IPsec context while IPsec policy creation is accessing it. This occurs because the mode-blocking reference was previously acquired only after a flow-table lookup had already accessed the IPsec context.
How does the resolved change mitigate the issue?
The fix takes a temporary mode-blocking reference before checking the IPsec context and validating the policy, then drops it after setup succeeds and the flow table has its own reference. It also permits temporary reservations to reuse existing IPsec tables rather than rejecting them solely because the E-Switch user count is nonzero.