net/mlx5: HWS, fix matcher leak on resize target setup failure
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 |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net/mlx5: HWS, fix matcher leak on resize target setup failure
hws_bwc_matcher_move() allocates a replacement matcher before setting it as the resize target. If mlx5hws_matcher_resize_set_target() fails, the replacement matcher is not attached anywhere and is leaked.
Fix the leak by destroying the replacement matcher before returning from the resize-target failure path.
The bug was first flagged by an experimental analysis tool we are developing for kernel memory-management bugs while analyzing v6.13-rc1. The tool is still under development and is not yet publicly available. Manual inspection confirms that the bug is still present in v7.1.1.
An x86_64 allyesconfig build showed no new warnings. As we do not have a mlx5 HWS-capable device to test with, no runtime testing was able to be performed.
From the CVE record · Linux
The Linux kernel's net/mlx5 HWS code leaks a replacement matcher if setting it as a resize target fails. The input does not establish whether an attacker can trigger the failure or specify network or local access, authentication, or user-interaction requirements.
Engineers running the Linux kernel with mlx5 HWS should check their versions; the bug was observed in v6.13-rc1 and confirmed present in v7.1.1.