Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2024-50282 Overview
CVE-2024-50282 is a buffer overflow vulnerability in the Linux kernel's AMD GPU (amdgpu) driver. The flaw resides in the amdgpu_debugfs_gprwave_read() function, which lacked a size check on user-supplied input. When a local user requested a read larger than 4K, the function could overflow its internal buffer. The issue is tracked as [CWE-120] (Buffer Copy without Checking Size of Input). Exploitation requires local access and low privileges, with no user interaction. Successful exploitation impacts confidentiality, integrity, and availability through kernel memory corruption. The upstream fix was cherry-picked from commit f5d873f5825b40d886d03bd2aede91d4cf002434.
Critical Impact
A local user with access to the amdgpu debugfs interface can trigger a kernel buffer overflow, leading to memory corruption, denial of service, or potential local privilege escalation.
Affected Products
- Linux kernel versions prior to the patched stable releases
- Linux kernel 6.12 release candidates rc1 through rc6
- Debian LTS distributions shipping affected kernel versions
Discovery Timeline
- 2024-11-19 - CVE-2024-50282 published to NVD
- 2025-01 - Debian LTS security announcement published
- 2025-03 - Follow-up Debian LTS security announcement published
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-50282
Vulnerability Analysis
The vulnerability exists in the amdgpu_debugfs_gprwave_read() function within the AMD GPU DRM (Direct Rendering Manager) driver. This function services reads from a debugfs interface used to inspect GPU general-purpose register (GPR) and wave state information. The function did not validate the caller-supplied size parameter before using it in buffer operations.
When a user requests a read with size exceeding 4096 bytes (4K), the operation can write past the bounds of an internal kernel buffer. This produces an out-of-bounds write condition in kernel memory, classified as [CWE-120]. Memory corruption in kernel context can destabilize the system or be shaped into a privilege escalation primitive, depending on adjacent kernel objects.
Root Cause
The root cause is a missing bounds check on the size argument passed to amdgpu_debugfs_gprwave_read(). The patch adds an explicit size check to reject or clamp requests larger than 4K, preventing the overflow. The fix was backported across stable branches in commits 2faaee36, 4d75b946, 673bdb42, and 8906728f.
Attack Vector
Exploitation is local only. An attacker needs code execution on the target system and access to the amdgpu debugfs node, typically under /sys/kernel/debug/dri/<N>/. By default, debugfs is readable only by root, which limits exposure. However, systems that relax debugfs permissions for diagnostics, container escapes, or multi-user workstations with AMD GPUs expand the attack surface. The attacker issues a read() syscall with a length greater than 4096 bytes against the vulnerable debugfs file.
// No verified public exploit code is available for CVE-2024-50282.
// The vulnerability is triggered by issuing a read() syscall against
// the amdgpu gprwave debugfs file with a size argument greater than 4096.
// Refer to the upstream patch commits for the exact fix:
// git.kernel.org/stable/c/f5d873f5825b40d886d03bd2aede91d4cf002434
Detection Methods for CVE-2024-50282
Indicators of Compromise
- Unexpected kernel oops or panic messages referencing amdgpu_debugfs_gprwave_read in dmesg or /var/log/kern.log
- KASAN or slab corruption reports mentioning the amdgpu driver
- Non-root processes accessing /sys/kernel/debug/dri/*/amdgpu_gprwave on hardened systems
Detection Strategies
- Audit kernel versions across the fleet and flag hosts running unpatched Linux kernels with the amdgpu driver loaded
- Monitor process activity for read() or pread() syscalls targeting amdgpu debugfs paths with large size arguments
- Enable CONFIG_KASAN in test and staging environments to surface overflow conditions during fuzzing or QA
Monitoring Recommendations
- Collect and centralize kernel ring buffer logs to detect driver-level crashes correlated with debugfs access
- Alert on unexpected mounts or permission changes to the debugfs filesystem
- Track package versions for linux-image-* on Debian and equivalent packages on other distributions to confirm patch status
How to Mitigate CVE-2024-50282
Immediate Actions Required
- Apply the stable kernel update that includes the upstream fix from commit f5d873f5825b40d886d03bd2aede91d4cf002434 or the backported equivalents
- Restrict access to the debugfs filesystem to root only and avoid mounting it on production systems
- Inventory systems with AMD GPUs and the amdgpu module loaded to prioritize patching
Patch Information
The fix adds a size check in amdgpu_debugfs_gprwave_read() to prevent reads larger than 4K. The patch is available across multiple stable branches via Kernel Git Commit 2faaee36, Kernel Git Commit 4d75b946, Kernel Git Commit 673bdb42, and Kernel Git Commit 8906728f. Debian users should consult the Debian LTS Security Announcement January 2025 and the Debian LTS Security Announcement March 2025.
Workarounds
- Unmount debugfs on systems that do not require it: umount /sys/kernel/debug
- Remove read permissions from the amdgpu gprwave debugfs node for non-root users
- Unload the amdgpu module on systems that do not use AMD graphics acceleration
# Verify kernel version and amdgpu module status
uname -r
lsmod | grep amdgpu
# Restrict debugfs access to root only
mount -o remount,mode=700 /sys/kernel/debug
# Confirm the installed kernel package carries the fix (Debian example)
apt-cache policy linux-image-$(uname -r)
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

