← Back

CVE-2024-56695

nvd nist
Published: Dec 28, 2024Modified: Oct 1, 2025

JSON object

Loading...
7.8
Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Exploitability: 1.8 / Impact: 5.9
Source: NVD

Description

In the Linux kernel, the following vulnerability has been resolved: drm/amdkfd: Use dynamic allocation for CU occupancy array in 'kfd_get_cu_occupancy()' The `kfd_get_cu_occupancy` function previously declared a large `cu_occupancy` array as a local variable, which could lead to stack overflows due to excessive stack usage. This commit replaces the static array allocation with dynamic memory allocation using `kcalloc`, thereby reducing the stack size. This change avoids the risk of stack overflows in kernel space, in scenarios where `AMDGPU_MAX_QUEUES` is large. The allocated memory is freed using `kfree` before the function returns to prevent memory leaks. Fixes the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_process.c: In function ‘kfd_get_cu_occupancy’: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_process.c:322:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=] 322 | } | ^

Affected (1)

Products: Linux: Linux Kernel
1 product
Linux Kernel
Configuration A
1 vulnerable
Vulnerable SoftwareAffected Versions
From 6.12 to 6.12.2

References (2)

Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Mailing ListPatch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Mailing ListPatch

Timeline

No history available yet.