CVE-2025-38313
Analyzed Analyzed - Analysis Complete
BaseFortify

Publication date: 2025-07-10

Last updated on: 2025-12-19

Assigner: kernel.org

Description
In the Linux kernel, the following vulnerability has been resolved: bus: fsl-mc: fix double-free on mc_dev The blamed commit tried to simplify how the deallocations are done but, in the process, introduced a double-free on the mc_dev variable. In case the MC device is a DPRC, a new mc_bus is allocated and the mc_dev variable is just a reference to one of its fields. In this circumstance, on the error path only the mc_bus should be freed. This commit introduces back the following checkpatch warning which is a false-positive. WARNING: kfree(NULL) is safe and this check is probably not required + if (mc_bus) + kfree(mc_bus);
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-07-10
Last Modified
2025-12-19
Generated
2026-05-27
AI Q&A
2025-07-10
EPSS Evaluated
2026-05-26
NVD
Affected Vendors & Products
Showing 8 associated CPEs
Vendor Product Version / Range
linux linux_kernel From 4.13 (inc) to 5.4.295 (exc)
linux linux_kernel From 5.5 (inc) to 5.10.239 (exc)
linux linux_kernel From 5.11 (inc) to 5.15.186 (exc)
linux linux_kernel From 5.16 (inc) to 6.1.142 (exc)
linux linux_kernel From 6.2 (inc) to 6.6.94 (exc)
linux linux_kernel From 6.7 (inc) to 6.12.34 (exc)
linux linux_kernel From 6.13 (inc) to 6.15.3 (exc)
debian debian_linux 11.0
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-415 The product calls free() twice on the same memory address.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability is a double-free issue in the Linux kernel's fsl-mc bus driver related to the mc_dev variable. A double-free occurs when the same memory is freed more than once, which can lead to undefined behavior or security issues. The problem arose because a commit intended to simplify memory deallocation mistakenly freed mc_dev twice. Specifically, when the MC device is a DPRC, mc_dev is a reference to a field within a newly allocated mc_bus structure, and only mc_bus should be freed on error paths, not mc_dev separately. The fix reintroduced a check to ensure only mc_bus is freed, preventing the double-free.


How can this vulnerability impact me? :

This double-free vulnerability can lead to memory corruption, which may cause system instability, crashes, or potentially allow an attacker to execute arbitrary code or escalate privileges on the affected system. Since it involves kernel memory management, exploitation could compromise the security and reliability of the Linux system running the vulnerable driver.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart