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/]
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/37xxx/CVE-2025-37850.json"
}"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-37850.json"
[
{
"signature_version": "v1",
"target": {
"file": "drivers/pwm/pwm-mediatek.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e1206d8e1651c9f62e5640b69b14d925b1a0a00a",
"deprecated": false,
"digest": {
"line_hashes": [
"185114601446742223705878418122229557539",
"245894048209424495293368887547104508009",
"104790398992766195665668011462943424290",
"125845717158254573239087046101411551002",
"206115863106524038188147765903612157780",
"19896982042624409843999268831342794163",
"224584236802172020409101118516038159610",
"182809326692258680755447258708719802289",
"307624246537065055355548754134646015209",
"307570438502836296742237389107319551771",
"8472995677680043477354701255775573036",
"44387051699904115185752370709221701732",
"36948190464804134786698828451359693292"
],
"threshold": 0.9
},
"id": "CVE-2025-37850-8a38bd58",
"signature_type": "Line"
},
{
"signature_version": "v1",
"target": {
"file": "drivers/pwm/pwm-mediatek.c",
"function": "pwm_mediatek_config"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e1206d8e1651c9f62e5640b69b14d925b1a0a00a",
"deprecated": false,
"digest": {
"function_hash": "144107569782524028558235672885658272045",
"length": 1119.0
},
"id": "CVE-2025-37850-f8ae4299",
"signature_type": "Function"
}
]