CVE-2021-4460

7.1 HIGH

📋 TL;DR

This CVE describes an undefined behavior shift operation vulnerability in the AMD GPU kernel driver (drm/amdkfd) in the Linux kernel. When certain queue count functions return zero, a shift operation occurs with undefined behavior that could potentially lead to kernel memory corruption or crashes. Systems using AMD GPUs with the affected kernel driver are vulnerable.

💻 Affected Systems

Products:
  • Linux kernel with AMD GPU driver (drm/amdkfd)
Versions: Linux kernel versions before the fix commits (specific versions vary by distribution)
Operating Systems: Linux distributions with affected kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Requires AMD GPU hardware and the amdkfd driver to be loaded and used.

📦 What is this software?

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Kernel panic, system crash, or potential privilege escalation leading to full system compromise.

🟠

Likely Case

System instability, kernel crashes, or denial of service affecting GPU functionality.

🟢

If Mitigated

Minor performance impact or no effect if the vulnerable code path isn't triggered.

🌐 Internet-Facing: LOW - Requires local access or ability to trigger specific GPU operations.
🏢 Internal Only: MEDIUM - Local users or processes with GPU access could trigger the vulnerability.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: HIGH

Exploitation requires triggering specific GPU driver operations and understanding kernel memory layout.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Linux kernel with commits 0c0356ef2498c1a250fe3846f30293f828737309 or later

Vendor Advisory: https://gitlab.freedesktop.org/drm/amd/-/issues/1472

Restart Required: Yes

Instructions:

1. Update Linux kernel to version containing the fix commits. 2. Reboot system. 3. Verify kernel version and that amdkfd module loads correctly.

🔧 Temporary Workarounds

Disable AMD GPU kernel driver

linux

Prevent loading of the vulnerable amdkfd kernel module

echo 'blacklist amdkfd' >> /etc/modprobe.d/blacklist-amdkfd.conf
update-initramfs -u
reboot

🧯 If You Can't Patch

  • Restrict local user access to systems with AMD GPUs
  • Monitor system logs for kernel crashes or GPU driver errors

🔍 How to Verify

Check if Vulnerable:

Check if amdkfd module is loaded: lsmod | grep amdkfd AND check kernel version against patched versions

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes fix commits AND test GPU functionality remains stable

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages
  • GPU driver error logs
  • System crash dumps

Network Indicators:

  • None - local vulnerability only

SIEM Query:

source="kernel" AND ("panic" OR "Oops" OR "amdkfd")

🔗 References

📤 Share & Export