Bug 2379171 (CVE-2025-38313) - CVE-2025-38313 kernel: bus: fsl-mc: fix double-free on mc_dev
Summary: CVE-2025-38313 kernel: bus: fsl-mc: fix double-free on mc_dev
Keywords:
Status: NEW
Alias: CVE-2025-38313
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-07-10 08:01 UTC by OSIDB Bzimport
Modified: 2025-07-11 12:54 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-07-10 08:01:26 UTC
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);

Comment 1 Avinash Hanwate 2025-07-11 12:44:14 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025071015-CVE-2025-38313-4e5a@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.