CVE-2025-38313

bus: fsl-mc: fix double-free on mc_dev

No CVSS score yet EPSS 0.19%

Published 10 Jul 2025 Updated 11 May 2026 CNA: Linux

Check your servers for CVE-2025-38313

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-38313 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

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

Exploitation

EPSS 0.19%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 9.54% of all scored CVEs. Scores of 1 Dec 2026.

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from a042fbed02904493ae6df26ec836045f5a7d3ce2, before 12e4431e5078847791936820bd39df9e1ee26d2e
affected from a042fbed02904493ae6df26ec836045f5a7d3ce2, before 3135e03a92f6b5259d0a7f25f728e9e7866ede3f
affected from a042fbed02904493ae6df26ec836045f5a7d3ce2, before 7002b954c4a8b9965ba0f139812ee4a6f71beac8
affected from a042fbed02904493ae6df26ec836045f5a7d3ce2, before b2057374f326303c86d8423415ab58656eebc695
affected from a042fbed02904493ae6df26ec836045f5a7d3ce2, before 4b23c46eb2d88924b93aca647bde9a4b9cf62cf9
affected from a042fbed02904493ae6df26ec836045f5a7d3ce2, before 1d5baab39e5b09a76870b345cdee7933871b881f
affected from a042fbed02904493ae6df26ec836045f5a7d3ce2, before 873d47114fd5e5a1cad2018843671537cc71ac84
affected from a042fbed02904493ae6df26ec836045f5a7d3ce2, before d694bf8a9acdbd061596f3e7549bc8cb70750a60
Other versions: unaffected
Linux
affected 4.13
unaffected before 4.13
unaffected from 5.4.295 up to and including 5.4.*
unaffected from 5.10.239 up to and including 5.10.*
unaffected from 5.15.186 up to and including 5.15.*
unaffected from 6.1.142 up to and including 6.1.*
unaffected from 6.6.94 up to and including 6.6.*
unaffected from 6.12.34 up to and including 6.12.*
unaffected from 6.15.3 up to and including 6.15.*
unaffected 6.16 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2025-38313 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2025-38313

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2025-38313
trivy image --scanners vuln IMAGE | grep CVE-2025-38313

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2025-38313 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.