# CVE-2025-38313: bus: fsl-mc: fix double-free on mc_dev

- Severity: High 7.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.19%, higher than 9% of CVEs (2026-12-01)
- Published: 2025-07-10T07:42:21.314Z
- Modified: 2026-06-17T09:16:36.130Z
- Weaknesses: CWE-415
- Assigned by: Linux

## 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);

(As written by CVE List.)

## Affected

- Linux Linux: from a042fbed02904493ae6df26ec836045f5a7d3ce2 before 12e4431e5078847791936820bd39df9e1ee26d2e; from a042fbed02904493ae6df26ec836045f5a7d3ce2 before 3135e03a92f6b5259d0a7f25f728e9e7866ede3f; from a042fbed02904493ae6df26ec836045f5a7d3ce2 before 7002b954c4a8b9965ba0f139812ee4a6f71beac8; from a042fbed02904493ae6df26ec836045f5a7d3ce2 before b2057374f326303c86d8423415ab58656eebc695; from a042fbed02904493ae6df26ec836045f5a7d3ce2 before 4b23c46eb2d88924b93aca647bde9a4b9cf62cf9; from a042fbed02904493ae6df26ec836045f5a7d3ce2 before 1d5baab39e5b09a76870b345cdee7933871b881f; from a042fbed02904493ae6df26ec836045f5a7d3ce2 before 873d47114fd5e5a1cad2018843671537cc71ac84; from a042fbed02904493ae6df26ec836045f5a7d3ce2 before d694bf8a9acdbd061596f3e7549bc8cb70750a60; 4.13 (not affected: before 4.13; from 5.4.295 up to 5.4.*; from 5.10.239 up to 5.10.*; from 5.15.186 up to 5.15.*; from 6.1.142 up to 6.1.*; from 6.6.94 up to 6.6.*; from 6.12.34 up to 6.12.*; from 6.15.3 up to 6.15.*; from 6.16 up to *)
- linux linux_kernel: from 4.13 before 5.4.295; from 5.5 before 5.10.239; from 5.11 before 5.15.186; from 5.16 before 6.1.142; from 6.2 before 6.6.94; from 6.7 before 6.12.34; from 6.13 before 6.15.3
- debian debian_linux: 11.0

## References

- <https://git.kernel.org/stable/c/12e4431e5078847791936820bd39df9e1ee26d2e> (patch)
- <https://git.kernel.org/stable/c/3135e03a92f6b5259d0a7f25f728e9e7866ede3f> (patch)
- <https://git.kernel.org/stable/c/7002b954c4a8b9965ba0f139812ee4a6f71beac8> (patch)
- <https://git.kernel.org/stable/c/b2057374f326303c86d8423415ab58656eebc695> (patch)
- <https://git.kernel.org/stable/c/4b23c46eb2d88924b93aca647bde9a4b9cf62cf9> (patch)
- <https://git.kernel.org/stable/c/1d5baab39e5b09a76870b345cdee7933871b881f> (patch)
- <https://git.kernel.org/stable/c/873d47114fd5e5a1cad2018843671537cc71ac84> (patch)
- <https://git.kernel.org/stable/c/d694bf8a9acdbd061596f3e7549bc8cb70750a60> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html> (third-party-advisory)
- <https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html> (third-party-advisory)

## Sources

- CVE List: [CVE-2025-38313](https://www.cve.org/CVERecord?id=CVE-2025-38313), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2025-38313](https://nvd.nist.gov/vuln/detail/CVE-2025-38313), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-38313 · Whole record: https://cve.day/CVE-2025-38313.json · Rebuilt by cve.day 2026-11-25T22:59:01.070Z
