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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.32% (percentile 17, 2026-11-26)
- **CWE:** CWE-415
- **Published:** 2025-07-10T07:42:21.314Z
- **Modified:** 2026-06-17T09:16:36.130Z

## Who should check

- Anyone running Linux \>= a042fbed02904493ae6df26ec836045f5a7d3ce2, \< 12e4431e5078847791936820bd39df9e1ee26d2e; \>= a042fbed02904493ae6df26ec836045f5a7d3ce2, \< 3135e03a92f6b5259d0a7f25f728e9e7866ede3f; \>= a042fbed02904493ae6df26ec836045f5a7d3ce2, \< 7002b954c4a8b9965ba0f139812ee4a6f71beac8; \>= a042fbed02904493ae6df26ec836045f5a7d3ce2, \< b2057374f326303c86d8423415ab58656eebc695; \>= a042fbed02904493ae6df26ec836045f5a7d3ce2, \< 4b23c46eb2d88924b93aca647bde9a4b9cf62cf9; \>= a042fbed02904493ae6df26ec836045f5a7d3ce2, \< 1d5baab39e5b09a76870b345cdee7933871b881f; \>= a042fbed02904493ae6df26ec836045f5a7d3ce2, \< 873d47114fd5e5a1cad2018843671537cc71ac84; \>= a042fbed02904493ae6df26ec836045f5a7d3ce2, \< d694bf8a9acdbd061596f3e7549bc8cb70750a60
- Anyone running Linux 4.13

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

## Affected and fixed versions

- Linux: \>= a042fbed02904493ae6df26ec836045f5a7d3ce2, \< 12e4431e5078847791936820bd39df9e1ee26d2e; \>= a042fbed02904493ae6df26ec836045f5a7d3ce2, \< 3135e03a92f6b5259d0a7f25f728e9e7866ede3f; \>= a042fbed02904493ae6df26ec836045f5a7d3ce2, \< 7002b954c4a8b9965ba0f139812ee4a6f71beac8; \>= a042fbed02904493ae6df26ec836045f5a7d3ce2, \< b2057374f326303c86d8423415ab58656eebc695; \>= a042fbed02904493ae6df26ec836045f5a7d3ce2, \< 4b23c46eb2d88924b93aca647bde9a4b9cf62cf9; \>= a042fbed02904493ae6df26ec836045f5a7d3ce2, \< 1d5baab39e5b09a76870b345cdee7933871b881f; \>= a042fbed02904493ae6df26ec836045f5a7d3ce2, \< 873d47114fd5e5a1cad2018843671537cc71ac84; \>= a042fbed02904493ae6df26ec836045f5a7d3ce2, \< d694bf8a9acdbd061596f3e7549bc8cb70750a60 (cvelist)
- Linux: 4.13 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-38313. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-38313.md
Affected: Linux >= a042fbed02904493ae6df26ec836045f5a7d3ce2, < 12e4431e5078847791936820bd39df9e1ee26d2e; >= a042fbed02904493ae6df26ec836045f5a7d3ce2, < 3135e03a92f6b5259d0a7f25f728e9e7866ede3f; >= a042fbed02904493ae6df26ec836045f5a7d3ce2, < 7002b954c4a8b9965ba0f139812ee4a6f71beac8; >= a042fbed02904493ae6df26…
Fixed in: Linux 12e4431e5078847791936820bd39df9e1ee26d2e, Linux 3135e03a92f6b5259d0a7f25f728e9e7866ede3f, Linux 7002b954c4a8b9965ba0f139812ee4a6f71beac8, Linux 4b23c46eb2d88924b93aca647bde9a4b9cf62cf9, Linux 1d5baab39e5b09a76870b345cdee7933871b881f, Linux 873d47114fd5e5a1cad2018843671537cc71ac84

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-38313 being exploited?

There is no confirmed exploitation: CVE-2025-38313 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.32% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-38313?

High: CVSS 7.8 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-38313?

Linux \>= a042fbed02904493ae6df26ec836045f5a7d3ce2, \< 12e4431e5078847791936820bd39df9e1ee26d2e; \>= a042fbed02904493ae6df26ec836045f5a7d3ce2, \< 3135e03a92f6b5259d0a7f25f728e9e7866ede3f; \>= a042fbed02904493ae6df26ec836045f5a7d3ce2, \< 7002b954c4a8b9965ba0f139812ee4a6f71beac8; \>= a042fbed02904493ae6df26ec836045f5a7d3ce2, \< b2057374f326303c86d8423415ab58656eebc695; \>= a042fbed02904493ae6df26ec836045f5a7d3ce2, \< 4b23c46eb2d88924b93aca647bde9a4b9cf62cf9; \>= a042fbed02904493ae6df26ec836045f5a7d3ce2, \< 1d5baab39e5b09a76870b345cdee7933871b881f; \>= a042fbed02904493ae6df26ec836045f5a7d3ce2, \< 873d47114fd5e5a1cad2018843671537cc71ac84; \>= a042fbed02904493ae6df26ec836045f5a7d3ce2, \< d694bf8a9acdbd061596f3e7549bc8cb70750a60; Linux 4.13.

### Is there a fix for CVE-2025-38313?

Yes. Fixed in Linux 12e4431e5078847791936820bd39df9e1ee26d2e, Linux 3135e03a92f6b5259d0a7f25f728e9e7866ede3f, Linux 7002b954c4a8b9965ba0f139812ee4a6f71beac8, Linux 4b23c46eb2d88924b93aca647bde9a4b9cf62cf9, Linux 1d5baab39e5b09a76870b345cdee7933871b881f, Linux 873d47114fd5e5a1cad2018843671537cc71ac84. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2025-38313?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <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>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-38313>

HTML: <https://flawdb.com/CVE-2025-38313> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-38313>
