SecurityContext

CVE-2024-56695: Linux Kernel - Buffer Overflow

  • Cve: CVE-2024-56695
  • Name: Linux Kernel - Buffer Overflow
  • 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 | } | ^
  • Impact: Prevents stack overflow in kernel space, reducing risk of kernel panic or arbitrary code execution due to excessive stack usage.
  • Remediation: Update to the latest Linux kernel version where this fix is included.
  • Vulnerability type: buffer_overflow
  • Vulnerability impact: denial_of_service
  • Requirements: Exploit requires kernel space execution.
  • Labels source: projectdiscovery
  • Severity: high
  • Cvss score: 7.8
  • Cvss vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Epss score: 0.00217
  • Epss percentile: 0.12006
  • Assignee: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  • Published at: 2024-12-28T10:15:15Z
  • Age in days: 696
  • Modified at: 2026-06-17T08:12:45Z
  • Patch available: yes
  • References total: 2
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2024-56695
  • Nvd status: modified
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
  • Not known: requirement type, hackerone

Cwe

IdName
CWE-787Out-of-bounds Write

References

UrlSourceTags
https://git.kernel.org/stable/c/6d9f07196389f35a3afebcf1a12c1425725cadddnvdMailing List, Patch
https://git.kernel.org/stable/c/922f0e00017b09d9d47e3efac008c8b20ed546a0nvdMailing List, Patch

Products

ProductAffectedPlatform boundSourcesUrl
linux:linux_kernel>= 6.12, < 6.12.2nonvd/v1/products/linux/linux_kernel

Projects

RepositoryLink kindsIndexedUrl
torvalds/linuxcna_commit, commityes/v1/repositories/torvalds/linux

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Authentication required: yes
  • Exposed hosts: 10038339
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, remote
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports