net/mlx5e: Fix eswitch mode block underflow on IPsec acquire SA
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
6.18
|
In the Linux kernel, the following vulnerability has been resolved:
net/mlx5e: Fix eswitch mode block underflow on IPsec acquire SA
mlx5e_xfrm_add_state() handles acquire-flow temporary SAs by allocating software state and skipping hardware offload setup.
That path jumps to the common success label before taking the eswitch mode block. After tunnel-mode validation was moved earlier, the common success label unconditionally calls mlx5_eswitch_unblock_mode(). For acquire SAs, this decrements esw->offloads.num_block_mode without a matching increment.
Return directly after installing the acquire SA offload handle, so only the paths that successfully called mlx5_eswitch_block_mode() call the matching unblock.
From the CVE record · Linux
The Linux kernel’s net/mlx5e IPsec acquire-SA path can decrement the eswitch mode-block counter without a matching increment. This occurs when an acquire-flow temporary SA takes the common success path; the input does not specify attacker capabilities, authentication requirements, or user interaction.
Engineers running Linux kernels with net/mlx5e should check their versions against the vendor advisory; affected versions were not provided.