{"id":"CVE-2025-37850","aliases":["CVE-2025-37850"],"related":[],"kind":"vulnerability","state":"published","title":"pwm: mediatek: Prevent divide-by-zero in pwm_mediatek_config()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\npwm: mediatek: Prevent divide-by-zero in pwm_mediatek_config()\n\nWith CONFIG_COMPILE_TEST && !CONFIG_HAVE_CLK, pwm_mediatek_config() has a\ndivide-by-zero in the following line:\n\n\tdo_div(resolution, clk_get_rate(pc->clk_pwms[pwm->hwpwm]));\n\ndue to the fact that the !CONFIG_HAVE_CLK version of clk_get_rate()\nreturns zero.\n\nThis is presumably just a theoretical problem: COMPILE_TEST overrides\nthe dependency on RALINK which would select COMMON_CLK.  Regardless it's\na good idea to check for the error explicitly to avoid divide-by-zero.\n\nFixes the following warning:\n\n  drivers/pwm/pwm-mediatek.o: warning: objtool: .text: unexpected end of section\n\n[ukleinek: s/CONFIG_CLK/CONFIG_HAVE_CLK/]","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\npwm: mediatek: Prevent divide-by-zero in pwm_mediatek_config()\n\nWith CONFIG_COMPILE_TEST && !CONFIG_HAVE_CLK, pwm_mediatek_config() has a\ndivide-by-zero in the following line:\n\n\tdo_div(resolution, clk_get_rate(pc->clk_pwms[pwm->hwpwm]));\n\ndue to the fact that the !CONFIG_HAVE_CLK version of clk_get_rate()\nreturns zero.\n\nThis is presumably just a theoretical problem: COMPILE_TEST overrides\nthe dependency on RALINK which would select COMMON_CLK.  Regardless it's\na good idea to check for the error explicitly to avoid divide-by-zero.\n\nFixes the following warning:\n\n  drivers/pwm/pwm-mediatek.o: warning: objtool: .text: unexpected end of section\n\n[ukleinek: s/CONFIG_CLK/CONFIG_HAVE_CLK/]","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: pwm: mediatek: Evitar la división por cero en pwm_mediatek_config(). Con CONFIG_COMPILE_TEST y !CONFIG_HAVE_CLK, pwm_mediatek_config() presenta una división por cero en la siguiente línea: do_div(resolution, clk_get_rate(pc-&gt;clk_pwms[pwm-&gt;hwpwm])); debido a que la versión !CONFIG_HAVE_CLK de clk_get_rate() devuelve cero. Se supone que se trata de un problema teórico: COMPILE_TEST anula la dependencia de RALINK, que seleccionaría COMMON_CLK. En cualquier caso, es recomendable comprobar el error explícitamente para evitar la división por cero. Corrige la siguiente advertencia: drivers/pwm/pwm-mediatek.o: advertencia: objtool: .text: final inesperado de sección [ukleinek: s/CONFIG_CLK/CONFIG_HAVE_CLK/]","source":"nvd"}],"published":"2025-05-09T06:41:57.784Z","modified":"2026-06-17T09:15:33.813Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-369"],"affected":[{"ranges":[{"type":"git","introduced":"caf065f8fd583b43a3f95d84c8a0a0d07597963b","fixed":"8b9f60725d74b72c238e4437c957d0217746b506","status":"affected"},{"type":"git","introduced":"caf065f8fd583b43a3f95d84c8a0a0d07597963b","fixed":"e1206d8e1651c9f62e5640b69b14d925b1a0a00a","status":"affected"},{"type":"git","introduced":"caf065f8fd583b43a3f95d84c8a0a0d07597963b","fixed":"e3cf0c38d3ce754ad63005102fcfeb0b7ff3290b","status":"affected"},{"type":"git","introduced":"caf065f8fd583b43a3f95d84c8a0a0d07597963b","fixed":"f3e9cf266c2c103cf071e15d7a17e2c699fff3c5","status":"affected"},{"type":"git","introduced":"caf065f8fd583b43a3f95d84c8a0a0d07597963b","fixed":"8ddbec73ea2598d8414e8f7103241b55cf877010","status":"affected"},{"type":"git","introduced":"caf065f8fd583b43a3f95d84c8a0a0d07597963b","fixed":"4cb15042b5f3ec0474e91cf379120cc597625dbb","status":"affected"},{"type":"git","introduced":"caf065f8fd583b43a3f95d84c8a0a0d07597963b","fixed":"c343856ff2689ce0afef823592732fc178ef4aac","status":"affected"},{"type":"git","introduced":"caf065f8fd583b43a3f95d84c8a0a0d07597963b","fixed":"77fb96dbe350e8a5ae4965ff9f6e7049f3966a6b","status":"affected"},{"type":"git","introduced":"caf065f8fd583b43a3f95d84c8a0a0d07597963b","fixed":"7ca59947b5fcf94e7ea4029d1bd0f7c41500a161","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.12","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.12","status":"unaffected"},{"type":"semver","introduced":"5.4.293","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.237","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.181","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.135","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.88","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.24","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.13.12","lastAffected":"6.13.*","status":"unaffected"},{"type":"semver","introduced":"6.14.3","lastAffected":"6.14.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.15","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.12","fixed":"5.4.293"},{"status":"affected","introduced":"5.5","fixed":"5.10.237"},{"status":"affected","introduced":"5.11","fixed":"5.15.181"},{"status":"affected","introduced":"5.16","fixed":"6.1.135"},{"status":"affected","introduced":"6.2","fixed":"6.6.88"},{"status":"affected","introduced":"6.7","fixed":"6.12.24"},{"status":"affected","introduced":"6.13","fixed":"6.13.12"},{"status":"affected","introduced":"6.14","fixed":"6.14.3"},{"status":"affected","version":"6.15"}],"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/8b9f60725d74b72c238e4437c957d0217746b506","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e1206d8e1651c9f62e5640b69b14d925b1a0a00a","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e3cf0c38d3ce754ad63005102fcfeb0b7ff3290b","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f3e9cf266c2c103cf071e15d7a17e2c699fff3c5","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8ddbec73ea2598d8414e8f7103241b55cf877010","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4cb15042b5f3ec0474e91cf379120cc597625dbb","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c343856ff2689ce0afef823592732fc178ef4aac","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/77fb96dbe350e8a5ae4965ff9f6e7049f3966a6b","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7ca59947b5fcf94e7ea4029d1bd0f7c41500a161","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html","tags":["mailing-list"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html","tags":["mailing-list"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-37850","url":"https://www.cve.org/CVERecord?id=CVE-2025-37850","licence":"CVE Terms of Use","modified":"2026-05-11T21:16:19.020Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-37850","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-37850","licence":"Public domain","modified":"2026-06-17T09:15:33.813Z"}],"updatedAt":"2026-11-25T22:58:57.846Z","epss":{"score":0.00298,"percentile":0.24234,"date":"2026-12-01T12:00:22.000Z"}}