{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2025-37850","id":"CVE-2025-37850","title":"pwm: mediatek: Prevent divide-by-zero in pwm_mediatek_config()","description":"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 p","descriptionLong":"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/]","published":"2025-05-09T06:41:57.784Z","updated":"2026-10-28T02:30:52.180293418Z","reserved":"2025-04-16T04:51:23.954Z","status":"Analyzed","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"},"metrics":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"}],"rating":"medium","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"caf065f8fd583b43a3f95d84c8a0a0d07597963b","lessThan":"8b9f60725d74b72c238e4437c957d0217746b506","status":"affected","versionType":"git"},{"version":"caf065f8fd583b43a3f95d84c8a0a0d07597963b","lessThan":"e1206d8e1651c9f62e5640b69b14d925b1a0a00a","status":"affected","versionType":"git"},{"version":"caf065f8fd583b43a3f95d84c8a0a0d07597963b","lessThan":"e3cf0c38d3ce754ad63005102fcfeb0b7ff3290b","status":"affected","versionType":"git"},{"version":"caf065f8fd583b43a3f95d84c8a0a0d07597963b","lessThan":"f3e9cf266c2c103cf071e15d7a17e2c699fff3c5","status":"affected","versionType":"git"},{"version":"caf065f8fd583b43a3f95d84c8a0a0d07597963b","lessThan":"8ddbec73ea2598d8414e8f7103241b55cf877010","status":"affected","versionType":"git"},{"version":"caf065f8fd583b43a3f95d84c8a0a0d07597963b","lessThan":"4cb15042b5f3ec0474e91cf379120cc597625dbb","status":"affected","versionType":"git"},{"version":"caf065f8fd583b43a3f95d84c8a0a0d07597963b","lessThan":"c343856ff2689ce0afef823592732fc178ef4aac","status":"affected","versionType":"git"},{"version":"caf065f8fd583b43a3f95d84c8a0a0d07597963b","lessThan":"77fb96dbe350e8a5ae4965ff9f6e7049f3966a6b","status":"affected","versionType":"git"},{"version":"caf065f8fd583b43a3f95d84c8a0a0d07597963b","lessThan":"7ca59947b5fcf94e7ea4029d1bd0f7c41500a161","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.12","status":"affected"},{"version":"0","lessThan":"4.12","status":"unaffected","versionType":"semver"},{"version":"5.4.293","lessThanOrEqual":"5.4.*","status":"unaffected","versionType":"semver"},{"version":"5.10.237","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.15.181","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.1.135","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.88","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.12.24","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.13.12","lessThanOrEqual":"6.13.*","status":"unaffected","versionType":"semver"},{"version":"6.14.3","lessThanOrEqual":"6.14.*","status":"unaffected","versionType":"semver"},{"version":"6.15","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":["CWE-369"],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/8b9f60725d74b72c238e4437c957d0217746b506","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/e1206d8e1651c9f62e5640b69b14d925b1a0a00a","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/e3cf0c38d3ce754ad63005102fcfeb0b7ff3290b","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/f3e9cf266c2c103cf071e15d7a17e2c699fff3c5","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/8ddbec73ea2598d8414e8f7103241b55cf877010","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/4cb15042b5f3ec0474e91cf379120cc597625dbb","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/c343856ff2689ce0afef823592732fc178ef4aac","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/77fb96dbe350e8a5ae4965ff9f6e7049f3966a6b","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/7ca59947b5fcf94e7ea4029d1bd0f7c41500a161","tags":["Patch","web"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html","tags":["Mailing List","web"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html","tags":["Mailing List","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/37xxx/CVE-2025-37850.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-37850","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.00298,"epssPercentile":0.22931,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2025-37850","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-37850","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2025-37850","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2025-37850","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}