CVE-2025-21751
HighIn 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.
CVSS 3.1 score
7.8
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness type
CWE-416CVE-2025-21751 is a Use After Free vulnerability
What is Use After Free?
The product references memory after it has been freed, which may cause it to crash, use unexpected values, or execute code. Learn more on MITRE CWE
Affected versions
Linux kernel versions
6.12
and later are affected. Fixed in
6.12.48,
6.13.3,
6.14
and their respective stable series.
References
The following references provide additional information about CVE-2025-21751 including vendor advisories, patch commits, exploit details, and third-party analysis. Links are sourced from the NIST NVD database.
-
PatchKernel patch commithttps://git.kernel.org/stable/c/1ce840c7a659aa53a31ef49f0271b4fd0dc10296
-
PatchKernel patch commithttps://git.kernel.org/stable/c/23a86c76a1a197e8fbbbd0ce3e826eb58c471624
-
PatchKernel patch commithttps://git.kernel.org/stable/c/5682aad0276ff9b9b0eff3188eb6a1f504d6b436
Frequently asked questions
-
What is CVE-2025-21751?
CVE-2025-21751 is a High severity Linux kernel vulnerability with a CVSS score of 7.8 out of 10 , classified as an Use After Free flaw (CWE-416) . It affects Linux kernel versions from 6.12 onward and has been patched in 6.12.48, 6.13.3 and 6.14. CVE-2025-21751 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.
-
What is the CVSS score for CVE-2025-21751?
CVE-2025-21751 has a CVSS score of 7.8 out of 10, rated High severity (CVSS 3.1). The vector string is
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. -
Is there a patch available for CVE-2025-21751?
Yes — CVE-2025-21751 has been patched. Fixed versions include 6.12.48, 6.13.3 and 6.14. If you are running Linux kernel 6.12 or later up to the fix versions, apply the relevant patch for your kernel branch.
-
Is CVE-2025-21751 actively exploited?
No — CVE-2025-21751 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.
-
What is Use After Free (CWE-416)?
The product references memory after it has been freed, which may cause it to crash, use unexpected values, or execute code. View CWE-416 on MITRE CWE →