CVE-2025-37850: Vulnerability in Linux Linux
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/]
AI Analysis
Technical Summary
CVE-2025-37850 is a vulnerability identified in the Linux kernel specifically within the PWM (Pulse Width Modulation) driver for MediaTek hardware, located in the function pwm_mediatek_config(). The issue arises due to a divide-by-zero error triggered when the kernel is compiled with the CONFIG_COMPILE_TEST option enabled and the CONFIG_HAVE_CLK option disabled. Under these conditions, the clk_get_rate() function returns zero, leading to a division by zero in the line do_div(resolution, clk_get_rate(pc->clk_pwms[pwm->hwpwm])). This vulnerability is primarily theoretical because the COMPILE_TEST configuration typically overrides dependencies that would select a common clock source, preventing this scenario in most practical builds. However, the flaw was identified and fixed to explicitly check for this error condition, preventing the divide-by-zero. The vulnerability does not appear to have any known exploits in the wild and is related to a compilation-time configuration rather than a runtime flaw affecting typical end-user systems. The fix also addresses a related warning about an unexpected end of section during object tool verification. The affected versions are identified by a specific commit hash, indicating this is a low-level kernel source code issue rather than a widespread binary vulnerability. No CVSS score is assigned, and no known exploits or active attacks have been reported. This vulnerability is primarily of concern to developers and maintainers compiling custom Linux kernels for MediaTek platforms with unusual configuration flags rather than general Linux users or administrators.
Potential Impact
For European organizations, the direct impact of CVE-2025-37850 is minimal. The vulnerability is tied to a very specific kernel compile-time configuration that is unlikely to be present in production or standard Linux distributions. Most commercial and enterprise Linux distributions used in Europe do not compile kernels with CONFIG_COMPILE_TEST enabled and CONFIG_HAVE_CLK disabled simultaneously, making exploitation improbable. Furthermore, the vulnerability does not lead to privilege escalation, remote code execution, or data leakage but rather a potential kernel panic or crash if triggered, which could affect system availability during kernel compilation or testing phases. Organizations involved in embedded systems development, particularly those using MediaTek hardware and custom Linux kernels, should be aware of this issue. However, for typical IT infrastructure, cloud environments, and end-user systems across Europe, the risk is negligible. The vulnerability does not affect confidentiality or integrity of data and does not require user interaction or authentication to manifest, but its scope is limited to kernel compilation scenarios rather than runtime exploitation.
Mitigation Recommendations
The primary mitigation is to apply the patch that explicitly checks for the divide-by-zero condition in pwm_mediatek_config() during kernel compilation. Developers and maintainers compiling custom Linux kernels for MediaTek platforms should ensure they are using updated kernel source code that includes this fix. Avoid compiling kernels with the CONFIG_COMPILE_TEST option enabled while disabling CONFIG_HAVE_CLK, as this combination triggers the vulnerability. For organizations using standard Linux distributions, ensure that kernel updates from trusted vendors are applied promptly, as these distributions will incorporate the fix in their kernel releases. Additionally, maintain rigorous kernel build and testing procedures to detect and prevent unusual configuration combinations that could introduce similar issues. Monitoring kernel build logs for warnings related to objtool or unexpected section ends can also help identify potential problems early. Since no known exploits exist, no runtime mitigations are necessary beyond standard kernel update practices.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Sweden, Finland
CVE-2025-37850: Vulnerability in Linux Linux
Description
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/]
AI-Powered Analysis
Technical Analysis
CVE-2025-37850 is a vulnerability identified in the Linux kernel specifically within the PWM (Pulse Width Modulation) driver for MediaTek hardware, located in the function pwm_mediatek_config(). The issue arises due to a divide-by-zero error triggered when the kernel is compiled with the CONFIG_COMPILE_TEST option enabled and the CONFIG_HAVE_CLK option disabled. Under these conditions, the clk_get_rate() function returns zero, leading to a division by zero in the line do_div(resolution, clk_get_rate(pc->clk_pwms[pwm->hwpwm])). This vulnerability is primarily theoretical because the COMPILE_TEST configuration typically overrides dependencies that would select a common clock source, preventing this scenario in most practical builds. However, the flaw was identified and fixed to explicitly check for this error condition, preventing the divide-by-zero. The vulnerability does not appear to have any known exploits in the wild and is related to a compilation-time configuration rather than a runtime flaw affecting typical end-user systems. The fix also addresses a related warning about an unexpected end of section during object tool verification. The affected versions are identified by a specific commit hash, indicating this is a low-level kernel source code issue rather than a widespread binary vulnerability. No CVSS score is assigned, and no known exploits or active attacks have been reported. This vulnerability is primarily of concern to developers and maintainers compiling custom Linux kernels for MediaTek platforms with unusual configuration flags rather than general Linux users or administrators.
Potential Impact
For European organizations, the direct impact of CVE-2025-37850 is minimal. The vulnerability is tied to a very specific kernel compile-time configuration that is unlikely to be present in production or standard Linux distributions. Most commercial and enterprise Linux distributions used in Europe do not compile kernels with CONFIG_COMPILE_TEST enabled and CONFIG_HAVE_CLK disabled simultaneously, making exploitation improbable. Furthermore, the vulnerability does not lead to privilege escalation, remote code execution, or data leakage but rather a potential kernel panic or crash if triggered, which could affect system availability during kernel compilation or testing phases. Organizations involved in embedded systems development, particularly those using MediaTek hardware and custom Linux kernels, should be aware of this issue. However, for typical IT infrastructure, cloud environments, and end-user systems across Europe, the risk is negligible. The vulnerability does not affect confidentiality or integrity of data and does not require user interaction or authentication to manifest, but its scope is limited to kernel compilation scenarios rather than runtime exploitation.
Mitigation Recommendations
The primary mitigation is to apply the patch that explicitly checks for the divide-by-zero condition in pwm_mediatek_config() during kernel compilation. Developers and maintainers compiling custom Linux kernels for MediaTek platforms should ensure they are using updated kernel source code that includes this fix. Avoid compiling kernels with the CONFIG_COMPILE_TEST option enabled while disabling CONFIG_HAVE_CLK, as this combination triggers the vulnerability. For organizations using standard Linux distributions, ensure that kernel updates from trusted vendors are applied promptly, as these distributions will incorporate the fix in their kernel releases. Additionally, maintain rigorous kernel build and testing procedures to detect and prevent unusual configuration combinations that could introduce similar issues. Monitoring kernel build logs for warnings related to objtool or unexpected section ends can also help identify potential problems early. Since no known exploits exist, no runtime mitigations are necessary beyond standard kernel update practices.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2025-04-16T04:51:23.954Z
- Cisa Enriched
- false
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9818c4522896dcbd7c96
Added to database: 5/21/2025, 9:08:40 AM
Last enriched: 7/4/2025, 12:26:30 AM
Last updated: 8/13/2025, 8:59:55 AM
Views: 11
Related Threats
CVE-2025-53948: CWE-415 Double Free in Santesoft Sante PACS Server
HighCVE-2025-52584: CWE-122 Heap-based Buffer Overflow in Ashlar-Vellum Cobalt
HighCVE-2025-46269: CWE-122 Heap-based Buffer Overflow in Ashlar-Vellum Cobalt
HighCVE-2025-54862: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Santesoft Sante PACS Server
MediumCVE-2025-54759: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Santesoft Sante PACS Server
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.