CVE-2025-39954

5.5 MEDIUM

📋 TL;DR

A divide-by-zero vulnerability in the Linux kernel's sunxi-ng clock driver for Allwinner SoCs causes incorrect clock rate calculations, potentially leading to system instability or crashes. This affects Linux systems using Allwinner processors with the vulnerable clock driver. The vulnerability requires local access to trigger.

💻 Affected Systems

Products:
  • Linux kernel with sunxi-ng clock driver
Versions: Linux kernel versions with vulnerable sunxi-ng mp dual-divider support (specific versions not specified in CVE)
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems with Allwinner SoCs using the sunxi-ng clock driver's mp dual-divider functionality.

📦 What is this software?

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

⚠️ Risk & Real-World Impact

🔴

Worst Case

System crash or kernel panic due to divide-by-zero error, causing denial of service and potential data loss.

🟠

Likely Case

System instability, clock-related hardware malfunctions, or application crashes when accessing affected clock controls.

🟢

If Mitigated

Minimal impact with proper access controls limiting who can interact with clock subsystems.

🌐 Internet-Facing: LOW - Requires local access to trigger, not directly exploitable over network.
🏢 Internal Only: MEDIUM - Local users or processes could trigger system instability affecting shared resources.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Requires local access and knowledge of clock subsystem interaction. No known public exploits.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Linux kernel with commit 25fbbaf515acd13399589bd5ee6de5f35740cef2 or 40108f69c372af3aea73e7829d6849a44638d662

Vendor Advisory: https://git.kernel.org/stable/c/25fbbaf515acd13399589bd5ee6de5f35740cef2

Restart Required: No

Instructions:

1. Update Linux kernel to version containing the fix commit. 2. For embedded systems, rebuild kernel with patched source. 3. No reboot required for hotpatch if supported.

🔧 Temporary Workarounds

Restrict clock subsystem access

all

Limit user/process access to clock control interfaces via permissions or SELinux/AppArmor policies.

chmod 600 /sys/class/clk_sunxi_ng/*
setenforce 1
aa-enforce /etc/apparmor.d/usr.bin.clk

🧯 If You Can't Patch

  • Implement strict access controls to prevent unauthorized users from accessing clock subsystem interfaces.
  • Monitor system logs for clock-related errors and implement automated alerting for potential exploitation attempts.

🔍 How to Verify

Check if Vulnerable:

Check kernel version and if sunxi-ng driver is loaded: 'lsmod | grep sunxi_ng' and 'uname -r' to compare with patched versions.

Check Version:

uname -r

Verify Fix Applied:

Verify kernel includes fix commit: 'git log --oneline | grep -E "25fbbaf515ac|40108f69c372"' or check kernel changelog.

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages
  • Divide-by-zero errors in dmesg
  • Clock subsystem error messages

Network Indicators:

  • None - local vulnerability only

SIEM Query:

source="kernel" AND ("divide by zero" OR "sunxi_ng" OR "clock error")

🔗 References

📤 Share & Export