Linux Kernel
CVE-2024-53192
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain local shell on Loongson2 system
-
DeliveryTrigger clk-loongson2 driver load
-
ExploitClock enumeration miscounts array bound
-
ExecutionWrite past flex-array boundary
-
PersistCorrupt kernel heap metadata
-
ImpactEscalate privileges to root
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Buffer copy size validation
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires local, authenticated access (PR:L) with at least a standard user shell account on a system running Loongson2 SoC hardware with the clk-loongson2 kernel driver loaded. The overflow occurs during the driver's clock enumeration/initialization phase, which is triggered at kernel module load time (typically during boot). The system must be running an unpatched Linux kernel built with Loongson2 clock driver support. What limits exploitation: (1) the target must be physical or virtual Loongson2 hardware - this driver is not present on x86, ARM, or other architectures; (2) local authenticated access is required - remote unauthenticated exploitation is not possible given AV:L; (3) the corruption window is bounded to driver initialization, not a persistent runtime interface. Non-default configurations are not required - any Loongson2 system booting with this driver is potentially affected. |
| Impact | Real-world risk is moderate despite the 7.8 CVSS score. The AV:L vector confines exploitation to users with local shell access on physical or virtualized Loongson2 hardware - a significant limiting factor given the niche deployment footprint of this architecture. CVSS AC:L/PR:L/UI:N indicates low complexity once local access is established, and C:H/I:H/A:H reflects the full-kernel-compromise potential of memory corruption bugs. However, EPSS at 0.23% (13th percentile) and no KEV listing confirm no observed exploitation at time of analysis. The vulnerability exists in a driver initialization path, meaning the overflow opportunity is bounded to the clock enumeration phase rather than being a persistent attack surface. The combination of hardware-specific scope (Loongson2 only), local-only access requirement, and very low EPSS makes this a low operational priority for organizations not running Loongson2 hardware, but a meaningful patch-urgency item for those who do. |
| Exploit ScenarioDerived | A local user with a standard shell account on a Loongson2-based embedded system or workstation triggers clock driver initialization - which occurs at boot or module load - causing the kernel to enumerate hardware clocks and write one entry beyond the properly bounded flex-array, corrupting adjacent kernel heap data. With a crafted sequence of subsequent operations targeting the corrupted allocation, the attacker may achieve kernel code execution and escalate to root. No public proof-of-concept exploit code has been identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 04, 2026
Buffer overflow in the Linux kernel's clk-loongson2 clock driver allows a local low-privileged user on Loongson2-based systems to corrupt kernel memory, potentially enabling privilege escalation to root. The flaw stems from a mismatch between the allocated flexible array size and the counter field governing compiler-level bounds instrumentation: the counted_by() annotation on hws relies on clk_data.num being set correctly, but the driver was leaving it inconsistent with the allocated clks_num, defeating sanitizer detection of out-of-bounds writes. No public exploit has been identified and EPSS sits at 0.23% (13th percentile), indicating negligible opportunistic exploitation risk, though kernel memory corruption primitives carry inherent escalation potential once triggered.
RemediationAI
Apply the upstream kernel stable patches corresponding to your kernel series: commit 02fb4f0084331ef72c28d0c70fcb15d1bea369ec, 1bf8877150128c3abd9d233886a05f6966fbf0c7, or b96fc194984d0c82de1ca2b4166b35b1298b216c (all available at git.kernel.org/stable). Distributions shipping kernels for Loongson2 targets (e.g., Loongnix, AOSC OS for loongarch/mips) should be checked for updated packages incorporating these stable backports. No exact released kernel version is independently confirmed as fully patched across all stable branches from the available reference data. As a compensating control on unpatched systems, restrict local user access to Loongson2 machines to trusted personnel only, since exploitation requires local shell access with at least low privileges. Disabling or blacklisting the clk-loongson2 module (modprobe -r clk-loongson2) would eliminate the attack surface but may break clock management and render the system unusable, so this trade-off is only viable in controlled lab contexts.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The affected code resides in drivers/clk/clk-loongson2.c within the Linux kernel, which manages clock hardware on Loongson2 MIPS-derived SoCs (CPE: cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*). The root cause is CWE-120 (Buffer Copy without Checking Size of Input), specifically a misuse of C's flexible array member pattern with the counted_by() attribute - a Clang/GCC sanitizer annotation that links a flex-array's runtime bound to a named counter field. During probe, devm_kzalloc() allocates struct_size(clp, clk_data.hws, clks_num) bytes, correctly sizing the heap block for clks_num clock entries. However, the driver then failed to assign clp->clk_data.num = clks_num, leaving the sanitizer's view of array capacity incorrect. Any subsequent write to clp->clk_data.hws[clks_num] (one past the last valid index) would corrupt adjacent kernel heap memory without the compiler-instrumented bounds check firing.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Local access required (driver-level initialization on specific hardware); PR:L since a basic user account can trigger the load path; full kernel memory corruption yields C/I/A:H.
Primary rating from Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67).
CVSS VectorVendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Lifecycle Timeline
4DescriptionCVE.org
In the Linux kernel, the following vulnerability has been resolved:
clk: clk-loongson2: Fix potential buffer overflow in flexible-array member access
Flexible-array member hws in struct clk_hw_onecell_data is annotated with the counted_by() attribute. This means that when memory is allocated for this array, the _counter_, which in this case is member num in the flexible structure, should be set to the maximum number of elements the flexible array can contain, or fewer.
In this case, the total number of elements for the flexible array is determined by variable clks_num when allocating heap space via devm_kzalloc(), as shown below:
289 struct loongson2_clk_provider *clp; ... 296 for (p = data; p->name; p++) 297 clks_num++; 298 299 clp = devm_kzalloc(dev, struct_size(clp, clk_data.hws, clks_num), 300 GFP_KERNEL);
So, clp->clk_data.num should be set to clks_num or less, and not exceed clks_num, as is currently the case. Otherwise, if data is written into clp->clk_data.hws[clks_num], the instrumentation provided by the compiler won't detect the overflow, leading to a memory corruption bug at runtime.
Fix this issue by setting clp->clk_data.num to clks_num.
Executive ViewAI
A buffer overflow flaw in the Linux kernel's clk-loongson2 clock driver allows local users to escalate privileges to root through kernel memory corruption, affecting organizations operating Loongson2-based systems. Successful exploitation would grant complete system control. While no public exploit code currently exists and opportunistic exploitation is statistically unlikely, affected systems require urgent patching.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
NVD
CVE.org
EPSS
GitHub PoC
Exploit-DB