CVE-2025-37850

Source
https://nvd.nist.gov/vuln/detail/CVE-2025-37850
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-37850.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-37850
Downstream
Related
Published
2025-05-09T07:16:05Z
Modified
2025-08-09T20:01:25Z
Summary
[none]
Details

In the Linux kernel, the following vulnerability has been resolved:

pwm: mediatek: Prevent divide-by-zero in pwmmediatekconfig()

With CONFIGCOMPILETEST && !CONFIGHAVECLK, pwmmediatekconfig() has a divide-by-zero in the following line:

do_div(resolution, clk_get_rate(pc->clk_pwms[pwm->hwpwm]));

due to the fact that the !CONFIGHAVECLK version of clkgetrate() returns zero.

This is presumably just a theoretical problem: COMPILETEST overrides the dependency on RALINK which would select COMMONCLK. Regardless it's a good idea to check for the error explicitly to avoid divide-by-zero.

Fixes the following warning:

drivers/pwm/pwm-mediatek.o: warning: objtool: .text: unexpected end of section

[ukleinek: s/CONFIGCLK/CONFIGHAVE_CLK/]

References

Affected packages