CVE-2026-139225: net/mlx5: HWS, fix modify header pool match for copy actions
In the Linux kernel, the following vulnerability has been resolved:
net/mlx5: HWS, fix modify header pool match for copy actions
mlx5fshwsmhpoolmatch() compares a single dword of each action since rules pass their values as arguments. Copy and addfield actions keep their destination in the second dword and HWS reads them from the pattern alone. Two modify headers whose copies differ only in destination then share a pool and the second rule writes to the wrong field.
Use the HWS core comparison that checks these actions in full.
Found while checking a Sashiko AI review report and confirmed against the HWS pattern code. Not reproduced. No in-kernel user puts such actions on the FDB but RDMA flow actions can. Tested for regressions on ConnectX-7 with firmware 28.48.1000 on a little-endian host.
Affected Software
Event History
Frequently Asked Questions
Who is realistically exposed to this issue?
Systems using mlx5 HWS with RDMA flow actions that create copy or add_field modify-header actions are the relevant exposure case. The report states that no in-kernel user places these actions on the FDB.
What conditions are needed for incorrect behavior?
Two modify-header copy actions must differ only in their destination field. The incomplete pool comparison can then cause them to share a pool, allowing the second rule to write to the wrong field.
Has this issue been reproduced in practice?
It was not reproduced. The issue was identified during review of the HWS pattern code and confirmed by code analysis.
What does the fix change?
The fix replaces a comparison that examined only one dword per action with the HWS core comparison that fully checks copy and add_field actions, including their destination information.