{"id":"CVE-2024-42319","sourceIdentifier":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","published":"2024-08-17T09:15:11.767","lastModified":"2026-06-17T07:49:15.157","vulnStatus":"Modified","cveTags":[],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmailbox: mtk-cmdq: Move devm_mbox_controller_register() after devm_pm_runtime_enable()\n\nWhen mtk-cmdq unbinds, a WARN_ON message with condition\npm_runtime_get_sync() < 0 occurs.\n\nAccording to the call tracei below:\n  cmdq_mbox_shutdown\n  mbox_free_channel\n  mbox_controller_unregister\n  __devm_mbox_controller_unregister\n  ...\n\nThe root cause can be deduced to be calling pm_runtime_get_sync() after\ncalling pm_runtime_disable() as observed below:\n1. CMDQ driver uses devm_mbox_controller_register() in cmdq_probe()\n   to bind the cmdq device to the mbox_controller, so\n   devm_mbox_controller_unregister() will automatically unregister\n   the device bound to the mailbox controller when the device-managed\n   resource is removed. That means devm_mbox_controller_unregister()\n   and cmdq_mbox_shoutdown() will be called after cmdq_remove().\n2. CMDQ driver also uses devm_pm_runtime_enable() in cmdq_probe() after\n   devm_mbox_controller_register(), so that devm_pm_runtime_disable()\n   will be called after cmdq_remove(), but before\n   devm_mbox_controller_unregister().\n\nTo fix this problem, cmdq_probe() needs to move\ndevm_mbox_controller_register() after devm_pm_runtime_enable() to make\ndevm_pm_runtime_disable() be called after\ndevm_mbox_controller_unregister()."},{"lang":"es","value":"En el kernel de Linux, se resolvió la siguiente vulnerabilidad: buzón: mtk-cmdq: mover devm_mbox_controller_register() después de devm_pm_runtime_enable() Cuando mtk-cmdq se desvincula, aparece un mensaje WARN_ON con la condición pm_runtime_get_sync() &lt; 0. De acuerdo con el seguimiento de llamadas a continuación: cmdq_mbox_shutdown mbox_free_channel mbox_controller_unregister __devm_mbox_controller_unregister ... Se puede deducir que la causa raíz es llamar a pm_runtime_get_sync() después de llamar a pm_runtime_disable() como se observa a continuación: 1. El controlador CMDQ usa devm_mbox_controller_register() en cmdq_probe() para vincular el cmdq al mbox_controller, por lo que devm_mbox_controller_unregister() cancelará automáticamente el registro del dispositivo vinculado al controlador del buzón cuando se elimine el recurso administrado por el dispositivo. Eso significa que devm_mbox_controller_unregister() y cmdq_mbox_shoutdown() serán llamados después de cmdq_remove(). 2. El controlador CMDQ también usa devm_pm_runtime_enable() en cmdq_probe() después de devm_mbox_controller_register(), por lo que se llamará a devm_pm_runtime_disable() después de cmdq_remove(), pero antes de devm_mbox_controller_unregister(). Para solucionar este problema, cmdq_probe() necesita mover devm_mbox_controller_register() después de devm_pm_runtime_enable() para que se llame a devm_pm_runtime_disable() después de devm_mbox_controller_unregister()."}],"affected":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","affectedData":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","programFiles":["drivers/mailbox/mtk-cmdq-mailbox.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"623a6143a845bd485b00ba684f0ccef11835edab","lessThan":"1403991a40b94438a2acc749bf05c117abdb34f9","versionType":"git","status":"affected"},{"version":"623a6143a845bd485b00ba684f0ccef11835edab","lessThan":"d00df6700ad10974a7e20646956f4ff22cdbe0ec","versionType":"git","status":"affected"},{"version":"623a6143a845bd485b00ba684f0ccef11835edab","lessThan":"11fa625b45faf0649118b9deaf2d31c86ac41911","versionType":"git","status":"affected"},{"version":"623a6143a845bd485b00ba684f0ccef11835edab","lessThan":"a8bd68e4329f9a0ad1b878733e0f80be6a971649","versionType":"git","status":"affected"}]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","programFiles":["drivers/mailbox/mtk-cmdq-mailbox.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"4.19","status":"affected"},{"version":"0","lessThan":"4.19","versionType":"semver","status":"unaffected"},{"version":"6.1.120","lessThanOrEqual":"6.1.*","versionType":"semver","status":"unaffected"},{"version":"6.6.64","lessThanOrEqual":"6.6.*","versionType":"semver","status":"unaffected"},{"version":"6.10.3","lessThanOrEqual":"6.10.*","versionType":"semver","status":"unaffected"},{"version":"6.11","lessThanOrEqual":"*","versionType":"original_commit_for_fix","status":"unaffected"}]}]}],"metrics":{"cvssMetricV31":[{"source":"nvd@nist.gov","type":"Primary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","baseScore":5.5,"baseSeverity":"MEDIUM","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH"},"exploitabilityScore":1.8,"impactScore":3.6}],"ssvcV203":[{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","ssvcData":{"timestamp":"2024-09-10T16:09:32.477080Z","id":"CVE-2024-42319","options":[{"exploitation":"none"},{"automatable":"no"},{"technicalImpact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}]},"weaknesses":[{"source":"nvd@nist.gov","type":"Primary","description":[{"lang":"en","value":"NVD-CWE-noinfo"}]}],"configurations":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19","versionEndExcluding":"6.1.120","matchCriteriaId":"CBE41AF3-1464-4E2C-8D58-22503478A72E"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.2","versionEndExcluding":"6.6.64","matchCriteriaId":"CA16DEE3-ABEC-4449-9F4A-7A3DC4FC36C7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.7","versionEndExcluding":"6.10.3","matchCriteriaId":"92D388F2-1EAF-4CFA-AC06-5B26D762EA7D"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/11fa625b45faf0649118b9deaf2d31c86ac41911","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"]},{"url":"https://git.kernel.org/stable/c/1403991a40b94438a2acc749bf05c117abdb34f9","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"]},{"url":"https://git.kernel.org/stable/c/a8bd68e4329f9a0ad1b878733e0f80be6a971649","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"]},{"url":"https://git.kernel.org/stable/c/d00df6700ad10974a7e20646956f4ff22cdbe0ec","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html","source":"af854a3a-2127-422b-91ae-364da2661108"}]}