Advisory Published
Updated

CVE-2025-37850: pwm: mediatek: Prevent divide-by-zero in pwm_mediatek_config()

First published: Fri May 09 2025(Updated: )

In the Linux kernel, the following vulnerability has been resolved: pwm: mediatek: Prevent divide-by-zero in pwm_mediatek_config() With CONFIG_COMPILE_TEST && !CONFIG_HAVE_CLK, pwm_mediatek_config() 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 !CONFIG_HAVE_CLK version of clk_get_rate() returns zero. This is presumably just a theoretical problem: COMPILE_TEST overrides the dependency on RALINK which would select COMMON_CLK. 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/CONFIG_CLK/CONFIG_HAVE_CLK/]

Credit: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Affected SoftwareAffected VersionHow to fix
Linux Kernel

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is the severity of CVE-2025-37850?

    CVE-2025-37850 is classified as a moderate severity vulnerability impacting the Linux kernel.

  • How do I fix CVE-2025-37850?

    To fix CVE-2025-37850, users should update their Linux kernel to a version that includes the patch addressing the divide-by-zero issue.

  • What systems are affected by CVE-2025-37850?

    CVE-2025-37850 affects systems running the Linux kernel with CONFIG_COMPILE_TEST and without CONFIG_HAVE_CLK.

  • What type of vulnerability is CVE-2025-37850?

    CVE-2025-37850 is a divide-by-zero vulnerability related to the pwm_mediatek_config() function in the Linux kernel.

  • Is there a public disclosure for CVE-2025-37850?

    Yes, CVE-2025-37850 was disclosed publicly and has been addressed in updated Linux kernel releases.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203