{"id":"CVE-2025-38313","aliases":["CVE-2025-38313"],"related":[],"kind":"vulnerability","state":"published","title":"bus: fsl-mc: fix double-free on mc_dev","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nbus: fsl-mc: fix double-free on mc_dev\n\nThe blamed commit tried to simplify how the deallocations are done but,\nin the process, introduced a double-free on the mc_dev variable.\n\nIn case the MC device is a DPRC, a new mc_bus is allocated and the\nmc_dev variable is just a reference to one of its fields. In this\ncircumstance, on the error path only the mc_bus should be freed.\n\nThis commit introduces back the following checkpatch warning which is a\nfalse-positive.\n\nWARNING: kfree(NULL) is safe and this check is probably not required\n+       if (mc_bus)\n+               kfree(mc_bus);","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nbus: fsl-mc: fix double-free on mc_dev\n\nThe blamed commit tried to simplify how the deallocations are done but,\nin the process, introduced a double-free on the mc_dev variable.\n\nIn case the MC device is a DPRC, a new mc_bus is allocated and the\nmc_dev variable is just a reference to one of its fields. In this\ncircumstance, on the error path only the mc_bus should be freed.\n\nThis commit introduces back the following checkpatch warning which is a\nfalse-positive.\n\nWARNING: kfree(NULL) is safe and this check is probably not required\n+       if (mc_bus)\n+               kfree(mc_bus);","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: bus: fsl-mc: corrección de doble liberación en mc_dev La confirmación criticada intentó simplificar cómo se realizan las desasignaciones pero, en el proceso, introdujo una doble liberación en la variable mc_dev. En caso de que el dispositivo MC sea un DPRC, se asigna un nuevo mc_bus y la variable mc_dev es solo una referencia a uno de sus campos. En esta circunstancia, en la ruta de error solo se debe liberar mc_bus. Esta confirmación introduce de nuevo la siguiente advertencia checkpatch que es un falso positivo. ADVERTENCIA: kfree(NULL) es seguro y esta comprobación probablemente no sea necesaria + if (mc_bus) + kfree(mc_bus);","source":"nvd"}],"published":"2025-07-10T07:42:21.314Z","modified":"2026-06-17T09:16:36.130Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-415"],"affected":[{"ranges":[{"type":"git","introduced":"a042fbed02904493ae6df26ec836045f5a7d3ce2","fixed":"12e4431e5078847791936820bd39df9e1ee26d2e","status":"affected"},{"type":"git","introduced":"a042fbed02904493ae6df26ec836045f5a7d3ce2","fixed":"3135e03a92f6b5259d0a7f25f728e9e7866ede3f","status":"affected"},{"type":"git","introduced":"a042fbed02904493ae6df26ec836045f5a7d3ce2","fixed":"7002b954c4a8b9965ba0f139812ee4a6f71beac8","status":"affected"},{"type":"git","introduced":"a042fbed02904493ae6df26ec836045f5a7d3ce2","fixed":"b2057374f326303c86d8423415ab58656eebc695","status":"affected"},{"type":"git","introduced":"a042fbed02904493ae6df26ec836045f5a7d3ce2","fixed":"4b23c46eb2d88924b93aca647bde9a4b9cf62cf9","status":"affected"},{"type":"git","introduced":"a042fbed02904493ae6df26ec836045f5a7d3ce2","fixed":"1d5baab39e5b09a76870b345cdee7933871b881f","status":"affected"},{"type":"git","introduced":"a042fbed02904493ae6df26ec836045f5a7d3ce2","fixed":"873d47114fd5e5a1cad2018843671537cc71ac84","status":"affected"},{"type":"git","introduced":"a042fbed02904493ae6df26ec836045f5a7d3ce2","fixed":"d694bf8a9acdbd061596f3e7549bc8cb70750a60","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.13","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.13","status":"unaffected"},{"type":"semver","introduced":"5.4.295","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.239","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.186","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.142","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.94","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.34","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.15.3","lastAffected":"6.15.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.16","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"4.13","fixed":"5.4.295"},{"status":"affected","introduced":"5.5","fixed":"5.10.239"},{"status":"affected","introduced":"5.11","fixed":"5.15.186"},{"status":"affected","introduced":"5.16","fixed":"6.1.142"},{"status":"affected","introduced":"6.2","fixed":"6.6.94"},{"status":"affected","introduced":"6.7","fixed":"6.12.34"},{"status":"affected","introduced":"6.13","fixed":"6.15.3"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"11.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/12e4431e5078847791936820bd39df9e1ee26d2e","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3135e03a92f6b5259d0a7f25f728e9e7866ede3f","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7002b954c4a8b9965ba0f139812ee4a6f71beac8","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b2057374f326303c86d8423415ab58656eebc695","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4b23c46eb2d88924b93aca647bde9a4b9cf62cf9","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1d5baab39e5b09a76870b345cdee7933871b881f","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/873d47114fd5e5a1cad2018843671537cc71ac84","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d694bf8a9acdbd061596f3e7549bc8cb70750a60","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html","tags":["third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html","tags":["third-party-advisory"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-38313","url":"https://www.cve.org/CVERecord?id=CVE-2025-38313","licence":"CVE Terms of Use","modified":"2026-05-11T21:25:33.799Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-38313","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38313","licence":"Public domain","modified":"2026-06-17T09:16:36.130Z"}],"updatedAt":"2026-11-25T22:59:01.070Z","epss":{"score":0.00194,"percentile":0.09541,"date":"2026-12-01T12:00:22.000Z"}}