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/]
[
{
"id": "CVE-2025-37850-02fdd189",
"target": {
"file": "drivers/pwm/pwm-mediatek.c",
"function": "pwm_mediatek_config"
},
"digest": {
"length": 1119.0,
"function_hash": "144107569782524028558235672885658272045"
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8b9f60725d74b72c238e4437c957d0217746b506",
"signature_version": "v1"
},
{
"id": "CVE-2025-37850-09a122dc",
"target": {
"file": "drivers/pwm/pwm-mediatek.c",
"function": "pwm_mediatek_config"
},
"digest": {
"length": 1125.0,
"function_hash": "263129166270764737475871223495341592820"
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8ddbec73ea2598d8414e8f7103241b55cf877010",
"signature_version": "v1"
},
{
"id": "CVE-2025-37850-1cd67ab2",
"target": {
"file": "drivers/pwm/pwm-mediatek.c",
"function": "pwm_mediatek_config"
},
"digest": {
"length": 1131.0,
"function_hash": "158642562466644723244479903919318741736"
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c343856ff2689ce0afef823592732fc178ef4aac",
"signature_version": "v1"
},
{
"id": "CVE-2025-37850-64a02e84",
"target": {
"file": "drivers/pwm/pwm-mediatek.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"185114601446742223705878418122229557539",
"245894048209424495293368887547104508009",
"104790398992766195665668011462943424290",
"125845717158254573239087046101411551002",
"206115863106524038188147765903612157780",
"19896982042624409843999268831342794163",
"224584236802172020409101118516038159610",
"182809326692258680755447258708719802289",
"307624246537065055355548754134646015209",
"307570438502836296742237389107319551771",
"8472995677680043477354701255775573036",
"44387051699904115185752370709221701732",
"36948190464804134786698828451359693292"
]
},
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8ddbec73ea2598d8414e8f7103241b55cf877010",
"signature_version": "v1"
},
{
"id": "CVE-2025-37850-77531ca8",
"target": {
"file": "drivers/pwm/pwm-mediatek.c",
"function": "pwm_mediatek_config"
},
"digest": {
"length": 1125.0,
"function_hash": "263129166270764737475871223495341592820"
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f3e9cf266c2c103cf071e15d7a17e2c699fff3c5",
"signature_version": "v1"
},
{
"id": "CVE-2025-37850-7c5c9790",
"target": {
"file": "drivers/pwm/pwm-mediatek.c",
"function": "pwm_mediatek_config"
},
"digest": {
"length": 1131.0,
"function_hash": "158642562466644723244479903919318741736"
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7ca59947b5fcf94e7ea4029d1bd0f7c41500a161",
"signature_version": "v1"
},
{
"id": "CVE-2025-37850-883877d4",
"target": {
"file": "drivers/pwm/pwm-mediatek.c",
"function": "pwm_mediatek_config"
},
"digest": {
"length": 1131.0,
"function_hash": "158642562466644723244479903919318741736"
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4cb15042b5f3ec0474e91cf379120cc597625dbb",
"signature_version": "v1"
},
{
"id": "CVE-2025-37850-8a38bd58",
"target": {
"file": "drivers/pwm/pwm-mediatek.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"185114601446742223705878418122229557539",
"245894048209424495293368887547104508009",
"104790398992766195665668011462943424290",
"125845717158254573239087046101411551002",
"206115863106524038188147765903612157780",
"19896982042624409843999268831342794163",
"224584236802172020409101118516038159610",
"182809326692258680755447258708719802289",
"307624246537065055355548754134646015209",
"307570438502836296742237389107319551771",
"8472995677680043477354701255775573036",
"44387051699904115185752370709221701732",
"36948190464804134786698828451359693292"
]
},
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e1206d8e1651c9f62e5640b69b14d925b1a0a00a",
"signature_version": "v1"
},
{
"id": "CVE-2025-37850-8e516feb",
"target": {
"file": "drivers/pwm/pwm-mediatek.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"185114601446742223705878418122229557539",
"245894048209424495293368887547104508009",
"104790398992766195665668011462943424290",
"125845717158254573239087046101411551002",
"206115863106524038188147765903612157780",
"19896982042624409843999268831342794163",
"224584236802172020409101118516038159610",
"182809326692258680755447258708719802289",
"307624246537065055355548754134646015209",
"307570438502836296742237389107319551771",
"8472995677680043477354701255775573036",
"44387051699904115185752370709221701732",
"36948190464804134786698828451359693292"
]
},
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8b9f60725d74b72c238e4437c957d0217746b506",
"signature_version": "v1"
},
{
"id": "CVE-2025-37850-91fa444d",
"target": {
"file": "drivers/pwm/pwm-mediatek.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"185114601446742223705878418122229557539",
"245894048209424495293368887547104508009",
"104790398992766195665668011462943424290",
"125845717158254573239087046101411551002",
"206115863106524038188147765903612157780",
"19896982042624409843999268831342794163",
"224584236802172020409101118516038159610",
"182809326692258680755447258708719802289",
"307624246537065055355548754134646015209",
"307570438502836296742237389107319551771",
"8472995677680043477354701255775573036",
"44387051699904115185752370709221701732",
"36948190464804134786698828451359693292"
]
},
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4cb15042b5f3ec0474e91cf379120cc597625dbb",
"signature_version": "v1"
},
{
"id": "CVE-2025-37850-9bbfeef1",
"target": {
"file": "drivers/pwm/pwm-mediatek.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"185114601446742223705878418122229557539",
"245894048209424495293368887547104508009",
"104790398992766195665668011462943424290",
"125845717158254573239087046101411551002",
"206115863106524038188147765903612157780",
"19896982042624409843999268831342794163",
"224584236802172020409101118516038159610",
"182809326692258680755447258708719802289",
"307624246537065055355548754134646015209",
"307570438502836296742237389107319551771",
"8472995677680043477354701255775573036",
"44387051699904115185752370709221701732",
"36948190464804134786698828451359693292"
]
},
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f3e9cf266c2c103cf071e15d7a17e2c699fff3c5",
"signature_version": "v1"
},
{
"id": "CVE-2025-37850-b637c60a",
"target": {
"file": "drivers/pwm/pwm-mediatek.c",
"function": "pwm_mediatek_config"
},
"digest": {
"length": 1131.0,
"function_hash": "158642562466644723244479903919318741736"
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@77fb96dbe350e8a5ae4965ff9f6e7049f3966a6b",
"signature_version": "v1"
},
{
"id": "CVE-2025-37850-cbec4794",
"target": {
"file": "drivers/pwm/pwm-mediatek.c",
"function": "pwm_mediatek_config"
},
"digest": {
"length": 1119.0,
"function_hash": "144107569782524028558235672885658272045"
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e3cf0c38d3ce754ad63005102fcfeb0b7ff3290b",
"signature_version": "v1"
},
{
"id": "CVE-2025-37850-ccca420a",
"target": {
"file": "drivers/pwm/pwm-mediatek.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"185114601446742223705878418122229557539",
"245894048209424495293368887547104508009",
"104790398992766195665668011462943424290",
"125845717158254573239087046101411551002",
"206115863106524038188147765903612157780",
"19896982042624409843999268831342794163",
"224584236802172020409101118516038159610",
"182809326692258680755447258708719802289",
"307624246537065055355548754134646015209",
"307570438502836296742237389107319551771",
"8472995677680043477354701255775573036",
"44387051699904115185752370709221701732",
"36948190464804134786698828451359693292"
]
},
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c343856ff2689ce0afef823592732fc178ef4aac",
"signature_version": "v1"
},
{
"id": "CVE-2025-37850-d1b1f7fc",
"target": {
"file": "drivers/pwm/pwm-mediatek.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"185114601446742223705878418122229557539",
"245894048209424495293368887547104508009",
"104790398992766195665668011462943424290",
"125845717158254573239087046101411551002",
"206115863106524038188147765903612157780",
"19896982042624409843999268831342794163",
"224584236802172020409101118516038159610",
"182809326692258680755447258708719802289",
"307624246537065055355548754134646015209",
"307570438502836296742237389107319551771",
"8472995677680043477354701255775573036",
"44387051699904115185752370709221701732",
"36948190464804134786698828451359693292"
]
},
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@77fb96dbe350e8a5ae4965ff9f6e7049f3966a6b",
"signature_version": "v1"
},
{
"id": "CVE-2025-37850-ebaa44a9",
"target": {
"file": "drivers/pwm/pwm-mediatek.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"185114601446742223705878418122229557539",
"245894048209424495293368887547104508009",
"104790398992766195665668011462943424290",
"125845717158254573239087046101411551002",
"206115863106524038188147765903612157780",
"19896982042624409843999268831342794163",
"224584236802172020409101118516038159610",
"182809326692258680755447258708719802289",
"307624246537065055355548754134646015209",
"307570438502836296742237389107319551771",
"8472995677680043477354701255775573036",
"44387051699904115185752370709221701732",
"36948190464804134786698828451359693292"
]
},
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e3cf0c38d3ce754ad63005102fcfeb0b7ff3290b",
"signature_version": "v1"
},
{
"id": "CVE-2025-37850-f8ae4299",
"target": {
"file": "drivers/pwm/pwm-mediatek.c",
"function": "pwm_mediatek_config"
},
"digest": {
"length": 1119.0,
"function_hash": "144107569782524028558235672885658272045"
},
"deprecated": false,
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e1206d8e1651c9f62e5640b69b14d925b1a0a00a",
"signature_version": "v1"
},
{
"id": "CVE-2025-37850-ff573ac3",
"target": {
"file": "drivers/pwm/pwm-mediatek.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"185114601446742223705878418122229557539",
"245894048209424495293368887547104508009",
"104790398992766195665668011462943424290",
"125845717158254573239087046101411551002",
"206115863106524038188147765903612157780",
"19896982042624409843999268831342794163",
"224584236802172020409101118516038159610",
"182809326692258680755447258708719802289",
"307624246537065055355548754134646015209",
"307570438502836296742237389107319551771",
"8472995677680043477354701255775573036",
"44387051699904115185752370709221701732",
"36948190464804134786698828451359693292"
]
},
"deprecated": false,
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7ca59947b5fcf94e7ea4029d1bd0f7c41500a161",
"signature_version": "v1"
}
]