CVE-2024-57984

7.8 HIGH

📋 TL;DR

A use-after-free vulnerability in the Linux kernel's dw_i3c_master driver allows attackers to potentially crash the system or execute arbitrary code with kernel privileges. This affects systems using the I3C bus controller hardware with the vulnerable driver loaded. The vulnerability occurs during module removal when a race condition between cleanup and work queue execution leads to accessing freed memory.

💻 Affected Systems

Products:
  • Linux kernel with dw_i3c_master driver
Versions: Linux kernel versions before the fix commits (specific versions vary by distribution)
Operating Systems: Linux distributions using vulnerable kernel versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable if the dw_i3c_master driver is loaded and I3C hardware is present. Most systems won't have this hardware/driver loaded by default.

📦 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

Kernel panic leading to system crash or potential privilege escalation to kernel mode allowing complete system compromise.

🟠

Likely Case

System crash or kernel panic causing denial of service, requiring physical access or reboot to restore functionality.

🟢

If Mitigated

No impact if the vulnerable driver module is not loaded or the system is patched.

🌐 Internet-Facing: LOW - Requires local access to trigger module removal and race condition.
🏢 Internal Only: MEDIUM - Local attackers with sufficient privileges to load/unload kernel modules could exploit this.

🎯 Exploit Status

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

Requires local access and ability to trigger module removal while work queue is active. Timing the race condition adds complexity.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Kernel versions containing commits: 60d2fb033a999bb644f8e8606ff4a1b82de36c6f, 9b0063098fcde17cd2894f2c96459b23388507ca, b75439c945b94dd8a2b645355bdb56f948052601, fc84dd3c909a372c0d130f5f84c404717c17eed8

Vendor Advisory: https://git.kernel.org/stable/c/60d2fb033a999bb644f8e8606ff4a1b82de36c6f

Restart Required: Yes

Instructions:

1. Update Linux kernel to patched version from your distribution vendor. 2. Reboot system to load new kernel. 3. Verify the dw_i3c_master driver is not vulnerable.

🔧 Temporary Workarounds

Disable dw_i3c_master module

Linux

Prevent loading of vulnerable kernel module

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

🧯 If You Can't Patch

  • Ensure only trusted users have CAP_SYS_MODULE capability to prevent module manipulation
  • Monitor for suspicious module loading/unloading activity and implement strict access controls

🔍 How to Verify

Check if Vulnerable:

Check if dw_i3c_master module is loaded: lsmod | grep dw_i3c_master. If loaded, check kernel version against patched versions.

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes fix commits and module is either not loaded or updated. Check dmesg for any use-after-free errors related to dw_i3c.

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages
  • Use-after-free errors in dmesg/kernel logs
  • OOPs messages related to dw_i3c_master

Network Indicators:

  • None - local vulnerability only

SIEM Query:

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

🔗 References

📤 Share & Export