CVE-2025-40346
NoneCVSS
—
EPSS
0.2%
Published
Dec 16, 2025
CISA due date
—
Cloudanix analysis
A Linux kernel bug can make computers crash when they try to read processor clock information during startup.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- Moderate
- Impact
- Denial Of Service
- Component
- OS kernel
- Class
- Memory Corruption
- Remediation
- Patch
- Effort
- Low
- Patch risk
- Low
What it actually does
Incorrect use of PTR_ERR_OR_ZERO() on a clock pointer allows NULL values to reach clk_get_rate(), resulting in a NULL pointer dereference during CPU topology parsing in the Linux kernel.
Why it matters to the business
Systems may experience crashes or instability during boot or CPU initialization on affected Linux distributions, potentially causing downtime; low exploitability reduces immediate risk but kernel-level flaws warrant priority patching.
How an attack unfolds
An attacker with local access or the ability to influence device tree/ACPI configuration triggers topology_parse_cpu_capacity() such that of_clk_get() returns NULL; the flawed error check then passes the NULL pointer to clk_get_rate(), causing a dereference that may lead to a kernel crash.
How to fix it
Upgrade the Linux kernel to a version containing commit 64da320252e43456cc9ec3055ff567f168467b37; for listed Red Hat packages apply python-virtualenv 15.1.0-4.el7_8 or later where applicable.
How to confirm the fix worked
Inspect the topology_parse_cpu_capacity() function to confirm replacement of PTR_ERR_OR_ZERO() with IS_ERR_OR_NULL(); verify kernel version or commit hash after update and test boot on affected hardware.
Typical attack path
- Gain local execution or control device-tree content
- Trigger CPU topology initialization code path
- Force of_clk_get() to return NULL
- Bypass flawed PTR_ERR_OR_ZERO() check
- Invoke clk_get_rate(NULL) to dereference
How to detect it
Search kernel logs and crash dumps for oops or panic messages involving clk_get_rate or topology_parse_cpu_capacity; review dmesg output around boot time for NULL pointer dereferences in arch_topology.
What your security team should do
- Apply the referenced kernel commit or package updates within standard patch windows given low EPSS and absence from KEV
- Monitor kernel logs for NULL pointer dereference oops during topology parsing
- Include the affected kernel module in routine vulnerability scanning
The record
In the Linux kernel, the following vulnerability has been resolved: arch_topology: Fix incorrect error check in topology_parse_cpu_capacity() Fix incorrect use of PTR_ERR_OR_ZERO() in topology_parse_cpu_capacity() which causes the code to proceed with NULL clock pointers. The current logic uses !PTR_ERR_OR_ZERO(cpu_clk) which evaluates to true for both valid pointers and NULL, leading to potential NULL pointer dereference in clk_get_rate(). Per include/linux/err.h documentation, PTR_ERR_OR_ZERO(ptr) returns: "The error code within @ptr if it is an error pointer; 0 otherwise." This means PTR_ERR_OR_ZERO() returns 0 for both valid pointers AND NULL pointers. Therefore !PTR_ERR_OR_ZERO(cpu_clk) evaluates to true (proceed) when cpu_clk is either valid or NULL, causing clk_get_rate(NULL) to be called when of_clk_get() returns NULL. Replace with !IS_ERR_OR_NULL(cpu_clk) which only proceeds for valid pointers, preventing potential NULL pointer dereference in clk_get_rate().
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Linux | Kernel | 5.7.0 | 5.10.246 |
| openSUSE:Leap 16.0 | dtb-aarch64 | 0 | 6.12.0-160000.9.1 |
| openSUSE:Leap 16.0 | kernel-64kb | 0 | 6.12.0-160000.9.1 |
| openSUSE:Leap 16.0 | kernel-azure | 0 | 6.12.0-160000.9.1 |
| openSUSE:Leap 16.0 | kernel-default | 0 | 6.12.0-160000.9.1 |
| openSUSE:Leap 16.0 | kernel-default-base | 0 | 6.12.0-160000.9.1.160000.2.6 |
| openSUSE:Leap 16.0 | kernel-docs | 0 | 6.12.0-160000.9.1 |
| openSUSE:Leap 16.0 | kernel-kvmsmall | 0 | 6.12.0-160000.9.1 |
| openSUSE:Leap 16.0 | kernel-obs-build | 0 | 6.12.0-160000.9.1 |
| openSUSE:Leap 16.0 | kernel-obs-qa | 0 | 6.12.0-160000.9.1 |
| openSUSE:Leap 16.0 | kernel-rt | 0 | 6.12.0-160000.9.1 |
| openSUSE:Leap 16.0 | kernel-source | 0 | 6.12.0-160000.9.1 |
| openSUSE:Leap 16.0 | kernel-syms | 0 | 6.12.0-160000.9.1 |
| openSUSE:Leap 16.0 | kernel-zfcpdump | 0 | 6.12.0-160000.9.1 |
Related vulnerabilities
- CVE-2026-23226 In the Linux kernel, the following vulnerability has been resolved: ksmbd: add chann_lock… Also affects Kernel
- CVE-2026-23225 In the Linux kernel, the following vulnerability has been resolved: sched/mmcid: Don't… Also affects Kernel
- CVE-2026-23230 In the Linux kernel, the following vulnerability has been resolved: smb: client: split… Also affects Kernel
- CVE-2026-23224 In the Linux kernel, the following vulnerability has been resolved: erofs: fix UAF issue… Also affects Kernel
- CVE-2026-23227 In the Linux kernel, the following vulnerability has been resolved: drm/exynos: vidi: use… Also affects Kernel
- CVE-2026-23223 In the Linux kernel, the following vulnerability has been resolved: xfs: fix UAF in… Also affects Kernel
- CVE-2026-23228 In the Linux kernel, the following vulnerability has been resolved: smb: server: fix leak… Also affects Kernel
- CVE-2026-23229 In the Linux kernel, the following vulnerability has been resolved: crypto: virtio - Add… Also affects Kernel