{"id":"CVE-2024-42319","published":"2024-08-17T09:09:31Z","modified":"2026-05-11T20:30:09Z","title":"mailbox: mtk-cmdq: Move devm_mbox_controller_register() after devm_pm_runtime_enable()","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"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().","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.00209,"percentile":0.11198,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/1403991a40b94438a2acc749bf05c117abdb34f9","tags":[]},{"url":"https://git.kernel.org/stable/c/d00df6700ad10974a7e20646956f4ff22cdbe0ec","tags":[]},{"url":"https://git.kernel.org/stable/c/11fa625b45faf0649118b9deaf2d31c86ac41911","tags":[]},{"url":"https://git.kernel.org/stable/c/a8bd68e4329f9a0ad1b878733e0f80be6a971649","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html","tags":[]}],"priority":{"score":2.2,"factors":[{"name":"EPSS percentile","points":2.24}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 623a6143a845bd485b00ba684f0ccef11835edab, < 1403991a40b94438a2acc749bf05c117abdb34f9",">= 623a6143a845bd485b00ba684f0ccef11835edab, < d00df6700ad10974a7e20646956f4ff22cdbe0ec",">= 623a6143a845bd485b00ba684f0ccef11835edab, < 11fa625b45faf0649118b9deaf2d31c86ac41911",">= 623a6143a845bd485b00ba684f0ccef11835edab, < a8bd68e4329f9a0ad1b878733e0f80be6a971649"]},{"vendor":"Linux","product":"Linux","versions":["4.19"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-09-10T16:09:32.477080Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2024-39547","exploited":false,"provenance":"source"}}