CVE-2024-53192

MEDIUM EPSS 13.2%
Published Dec 27, 20241y ago · Modified Jun 17, 20261w ago
5.5 CVSS 3.1
Medium
Find Similar
Published Dec 27, 2024 1y ago
Last Modified Jun 17, 2026 1w ago

Description

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`.

CVSS Details

Base Score
5.5
Exploitability
1.8
Impact
3.6
Vector string
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Attack Vector Local
Attack Complexity Low
Privileges Required Low
User Interaction None
Scope Unchanged
Confidentiality None
Integrity None
Availability High

Threat Intelligence

EPSS Exploit Probability
13.2% percentile
Exploit & Patch Status
No Known Exploit
Patch Available

Weaknesses 1

CWE-120

Affected Products 2

VendorProductVersionRange
linuxlinux_kernel*≥6.10  –  <6.11.11
linuxlinux_kernel*≥6.12  –  <6.12.2

References 3

  • git.kernel.org https://git.kernel.org/stable/c/02fb4f0084331ef72c28d0c70fcb15d1bea369ec
    Patch
  • git.kernel.org https://git.kernel.org/stable/c/1bf8877150128c3abd9d233886a05f6966fbf0c7
    Patch
  • git.kernel.org https://git.kernel.org/stable/c/b96fc194984d0c82de1ca2b4166b35b1298b216c
    Patch

Remediation

  • git.kernel.org https://git.kernel.org/stable/c/02fb4f0084331ef72c28d0c70fcb15d1bea369ec
    Patch
  • git.kernel.org https://git.kernel.org/stable/c/1bf8877150128c3abd9d233886a05f6966fbf0c7
    Patch
  • git.kernel.org https://git.kernel.org/stable/c/b96fc194984d0c82de1ca2b4166b35b1298b216c
    Patch