CVE-2024-36894

5.6 MEDIUM

📋 TL;DR

A race condition in the Linux kernel's USB gadget FunctionFS subsystem allows concurrent access to freed memory pointers when AIO cancellation occurs during USB soft disconnects. This affects systems using USB gadget functionality with FunctionFS, potentially leading to kernel crashes or instability. The vulnerability requires local access to the affected USB gadget interface.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Kernel versions with commit b566d38857fc up to fix commits (specific versions vary by distribution)
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when USB gadget FunctionFS functionality is enabled and in use. Most desktop/server systems not using USB gadget mode are not affected.

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

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 →

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 →

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 or system crash leading to denial of service, with potential for privilege escalation if combined with other vulnerabilities.

🟠

Likely Case

System instability, USB gadget functionality failures, or application crashes when USB disconnects occur during active AIO operations.

🟢

If Mitigated

Minimal impact if proper access controls prevent unauthorized users from accessing USB gadget interfaces.

🌐 Internet-Facing: LOW - Requires local access to USB gadget interfaces, not directly exploitable over network.
🏢 Internal Only: MEDIUM - Local attackers with access to USB gadget interfaces could cause system instability or denial of service.

🎯 Exploit Status

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

Exploitation requires local access and specific timing conditions during USB soft disconnects. No public exploits known.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Kernel commits: 24729b307eefcd7c476065cd7351c1a018082c19, 3613e5023f09b3308545e9d1acda86017ebd418a, 73c05ad46bb4fbbdb346004651576d1c8dbcffbb, 9e72ef59cbe61cd1243857a6418ca92104275867, a0fdccb1c9e027e3195f947f61aa87d6d0d2ea14

Vendor Advisory: https://git.kernel.org/stable/c/24729b307eefcd7c476065cd7351c1a018082c19

Restart Required: Yes

Instructions:

1. Update Linux kernel to version containing fix commits. 2. Check distribution-specific security advisories. 3. Reboot system after kernel update.

🔧 Temporary Workarounds

Disable USB gadget FunctionFS

linux

Disable the vulnerable USB gadget FunctionFS subsystem if not required

modprobe -r g_ffs
echo 'blacklist g_ffs' >> /etc/modprobe.d/blacklist.conf

🧯 If You Can't Patch

  • Restrict access to USB gadget interfaces to trusted users only
  • Monitor system logs for USB gadget-related crashes or instability

🔍 How to Verify

Check if Vulnerable:

Check kernel version and if g_ffs module is loaded: lsmod | grep g_ffs

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes fix commits and test USB gadget functionality

📡 Detection & Monitoring

Log Indicators:

  • Kernel oops messages
  • USB gadget-related errors in dmesg
  • System crashes during USB disconnects

Network Indicators:

  • None - local vulnerability only

SIEM Query:

Search for kernel panic logs or USB gadget error messages in system logs

🔗 References

📤 Share & Export