CVE-2021-47081

7.8 HIGH

📋 TL;DR

This is a use-after-free vulnerability in the Linux kernel's Habana Labs Gaudi AI accelerator driver. It could allow local attackers to cause kernel memory corruption, potentially leading to privilege escalation or denial of service. Systems using Habana Gaudi AI accelerators with vulnerable kernel versions are affected.

💻 Affected Systems

Products:
  • Linux kernel with Habana Labs Gaudi driver
Versions: Linux kernel versions before the fix commits (115726c5d312b462c9d9931ea42becdfa838a076 and b49f5af30b0e4064fbd91e83823a4bfcb2c7a3e7)
Operating Systems: Linux distributions with vulnerable kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems with Habana Gaudi AI accelerators installed and the corresponding kernel driver loaded.

📦 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 →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Local privilege escalation to root, kernel panic causing system crash, or arbitrary code execution in kernel context.

🟠

Likely Case

Kernel crash leading to denial of service, system instability, or memory corruption.

🟢

If Mitigated

Limited impact if proper access controls prevent local users from accessing the vulnerable driver interface.

🌐 Internet-Facing: LOW - This requires local access to the system.
🏢 Internal Only: MEDIUM - Local users or compromised accounts could exploit this vulnerability.

🎯 Exploit Status

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

Requires local access and ability to interact with the Gaudi driver interface. No public exploits known at this time.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Linux kernel with commits 115726c5d312b462c9d9931ea42becdfa838a076 and b49f5af30b0e4064fbd91e83823a4bfcb2c7a3e7

Vendor Advisory: https://git.kernel.org/stable/c/115726c5d312b462c9d9931ea42becdfa838a076

Restart Required: Yes

Instructions:

1. Update Linux kernel to version containing the fix commits. 2. Rebuild kernel if compiling from source. 3. Reboot system to load patched kernel.

🔧 Temporary Workarounds

Disable Gaudi driver module

linux

Prevent loading of the vulnerable driver if Gaudi accelerator is not required

echo 'blacklist habanalabs' >> /etc/modprobe.d/blacklist.conf
rmmod habanalabs

Restrict driver access

linux

Limit which users can access the Gaudi device files

chmod 600 /dev/habanalabs/*
setfacl -m u:root:rw /dev/habanalabs/*

🧯 If You Can't Patch

  • Restrict local user access to systems with Gaudi accelerators
  • Implement strict privilege separation and limit sudo/root access

🔍 How to Verify

Check if Vulnerable:

Check if habanalabs kernel module is loaded: lsmod | grep habanalabs. Check kernel version: uname -r and compare with patched versions.

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes fix commits: git log --oneline | grep -E '115726c5d312|b49f5af30b0e'

📡 Detection & Monitoring

Log Indicators:

  • Kernel oops messages
  • System crashes/panics
  • dmesg errors related to habanalabs or memory corruption

Network Indicators:

  • None - local vulnerability only

SIEM Query:

source="kernel" AND ("habanalabs" OR "use-after-free" OR "kernel panic")

🔗 References

📤 Share & Export