CVE-2025-38635 in Linuxinfo

Summary

by MITRE • 08/22/2025

In the Linux kernel, the following vulnerability has been resolved:

clk: davinci: Add NULL check in davinci_lpsc_clk_register()

devm_kasprintf() returns NULL when memory allocation fails. Currently, davinci_lpsc_clk_register() does not check for this case, which results in a NULL pointer dereference.

Add NULL check after devm_kasprintf() to prevent this issue and ensuring no resources are left allocated.

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 05/28/2026

The vulnerability identified as CVE-2025-38635 represents a critical null pointer dereference flaw within the Linux kernel's clock management subsystem, specifically affecting the DaVinci platform clock driver. This issue resides in the davinci_lpsc_clk_register() function where improper error handling leads to system instability and potential denial of service conditions. The vulnerability stems from the function's failure to validate the return value of devm_kasprintf() which is a memory allocation utility that may return NULL when memory exhaustion occurs during kernel runtime operations. When this occurs without proper null checking, the subsequent code execution attempts to dereference a NULL pointer, causing immediate system crashes or unpredictable behavior.

The technical implementation of this vulnerability demonstrates a classic memory safety issue that aligns with CWE-476, which describes the presence of null pointer dereferences in software systems. The flaw operates at the kernel level within the clock framework of the DaVinci platform, which is commonly used in embedded systems and industrial applications requiring precise timing control. The davinci_lpsc_clk_register() function is responsible for registering platform clock devices and managing their lifecycle within the kernel's device model. When devm_kasprintf() fails to allocate memory for string formatting operations required by clock naming conventions, the absence of validation causes the kernel to proceed with a null pointer dereference, resulting in immediate system termination through kernel oops or panic conditions.

The operational impact of this vulnerability extends beyond simple system crashes to encompass broader security implications for embedded systems and industrial control environments where the DaVinci platform is prevalent. Attackers could potentially exploit this vulnerability to cause persistent denial of service conditions, particularly in environments where system availability is critical such as automotive systems, industrial automation, or network infrastructure devices. The vulnerability affects systems running Linux kernels that include the DaVinci platform clock driver implementation, making it relevant to a wide range of embedded devices and specialized hardware platforms. From an adversary perspective, this flaw maps to ATT&CK technique T1499.004, which involves network denial of service, though in this case the impact is more accurately characterized as system-level denial of service through kernel panic conditions.

Mitigation strategies for CVE-2025-38635 require immediate kernel updates and patches that implement proper null pointer validation following devm_kasprintf() calls. The fix involves adding a straightforward null check after memory allocation operations to prevent the kernel from proceeding with invalid pointer operations. System administrators should prioritize patching affected kernel versions, particularly those running on embedded devices, industrial control systems, or any platform utilizing the DaVinci clock management subsystem. Additionally, monitoring systems should be configured to detect kernel oops or panic messages that may indicate exploitation attempts, though the vulnerability itself does not provide direct attack surface for remote exploitation. The patch implementation follows standard kernel development practices for error handling and resource management, ensuring that allocated resources are properly managed even in failure scenarios. Organizations should also conduct inventory assessments to identify all systems running affected kernel versions and implement comprehensive testing procedures before deployment of patches to ensure operational continuity in mission-critical environments.

Responsible

Linux

Reservation

04/16/2025

Disclosure

08/22/2025

Moderation

accepted

CPE

ready

EPSS

0.00159

KEV

no

Activities

very low

Sources

Want to stay up to date on a daily basis?

Enable the mail alert feature now!