CVE-2025-21751: net/mlx5: HWS, change error flow on matcher disconnect
In the Linux kernel, the following vulnerability has been resolved:
net/mlx5: HWS, change error flow on matcher disconnect
Currently, when firmware failure occurs during matcher disconnect flow, the error flow of the function reconnects the matcher back and returns an error, which continues running the calling function and eventually frees the matcher that is being disconnected. This leads to a case where we have a freed matcher on the matchers list, which in turn leads to use-after-free and eventual crash.
This patch fixes that by not trying to reconnect the matcher back when some FW command fails during disconnect.
Note that we're dealing here with FW error. We can't overcome this problem. This might lead to bad steering state (e.g. wrong connection between matchers), and will also lead to resource leakage, as it is the case with any other error handling during resource destruction.
However, the goal here is to allow the driver to continue and not crash the machine with use-after-free error.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.113-1Fixed in 7.2.12-1Fixed in 7.2.13-1
Event History
Frequently Asked Questions
What is the severity of CVE-2025-21751?
The severity of CVE-2025-21751 has not been explicitly rated yet, but it involves a vulnerability in the Linux kernel that affects the matcher disconnect procedure.
How do I fix CVE-2025-21751?
To fix CVE-2025-21751, users should update their Linux kernel to the latest version where this vulnerability has been addressed.
What systems are affected by CVE-2025-21751?
CVE-2025-21751 affects systems running the Linux kernel, particularly those utilizing the mlx5 network driver.
What are the potential impacts of CVE-2025-21751?
Exploitation of CVE-2025-21751 could potentially result in unexpected behavior during matcher disconnect, potentially leading to service disruptions.
Who should be concerned about CVE-2025-21751?
System administrators and users of affected Linux kernel versions should be concerned about CVE-2025-21751 and take steps to mitigate the risk.