CVE-2025-38722
📋 TL;DR
This is a use-after-free vulnerability in the Linux kernel's habanalabs driver export_dmabuf() function. It allows a local attacker to potentially escalate privileges or crash the system by exploiting a race condition between file descriptor installation and cleanup. Systems using habanalabs hardware acceleration (like AI/ML accelerators) with vulnerable kernel versions are affected.
💻 Affected Systems
- Linux kernel with habanalabs driver enabled
📦 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
Local privilege escalation to root, kernel memory corruption leading to system crash, or potential arbitrary code execution in kernel context.
Likely Case
Kernel panic causing system crash/denial-of-service, or privilege escalation to root if combined with other vulnerabilities.
If Mitigated
Limited to denial-of-service if proper access controls prevent local user access to habanalabs devices.
🎯 Exploit Status
Requires local access and race condition timing exploitation. The vulnerability is well-documented in the kernel commit messages, making exploitation more feasible for skilled attackers.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Kernel versions containing commits: 33927f3d0ecdcff06326d6e4edb6166aed42811c, 40deceb38f9db759772d1c289c28fd2a543f57fc, 55c232d7e0241f1d5120b595e7a9de24c75ed3d8, c07886761fd6251db6938d4e747002e3d150d231
Vendor Advisory: https://git.kernel.org/stable/c/33927f3d0ecdcff06326d6e4edb6166aed42811c
Restart Required: Yes
Instructions:
1. Update Linux kernel to patched version from your distribution. 2. For custom kernels: apply the fix commits from kernel.org. 3. Reboot system to load new kernel.
🔧 Temporary Workarounds
Disable habanalabs driver
linuxPrevent loading of vulnerable driver module if not needed
echo 'blacklist habanalabs' >> /etc/modprobe.d/blacklist-habanalabs.conf
rmmod habanalabs
Restrict device access
linuxLimit access to habanalabs device files to trusted users only
chmod 600 /dev/habanalabs*
chown root:root /dev/habanalabs*
🧯 If You Can't Patch
- Disable habanalabs driver if not required for system functionality
- Implement strict access controls to prevent unauthorized users from accessing habanalabs devices
🔍 How to Verify
Check if Vulnerable:
Check if habanalabs module is loaded: lsmod | grep habanalabs AND check kernel version against patched versions
Check Version:
uname -r
Verify Fix Applied:
Verify kernel version includes fix commits AND habanalabs module functions correctly with dma-buf operations
📡 Detection & Monitoring
Log Indicators:
- Kernel oops/panic messages related to habanalabs
- Failed dma-buf operations in kernel logs
- Unexpected process crashes with habanalabs device access
Network Indicators:
- None - this is a local vulnerability
SIEM Query:
source="kernel" AND ("habanalabs" OR "UAF" OR "use-after-free")