CVE-2026-31724
Medium · 5.5CVSS
5.5
EPSS
0.2%
Published
May 1, 2026
CISA due date
—
Cloudanix analysis
A local user who can change USB gadget settings could make affected Linux devices unstable or disrupt their USB networking until the kernel is updated.
- Exploitation
- Local Privilege
- Attacker needs
- Low Privilege
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- OS kernel
- Class
- Denial of service
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
CVE-2026-31724 is a Linux kernel USB gadget Ethernet Emulation Model (EEM) lifecycle flaw in the f_eem function. The network device for the USB gadget interface is allocated before binding and can survive after the gadget device that was its sysfs parent is destroyed. This leaves stale sysfs topology, dangling /sys/class/net links, and incorrect device parentage across bind/unbind cycles. A local user with sufficient privileges to manipulate USB gadget configuration can repeatedly bind and unbind the EEM gadget function to trigger inconsistent kernel device state, potentially causing availability impact through kernel warnings, device-management failures, power-management ordering problems, or system instability.
Why it matters to the business
Systems that expose or rely on Linux USB gadget networking can become unstable or unavailable if the vulnerable lifecycle condition is triggered. The main risk is operational disruption rather than data theft: embedded devices, appliances, development boards, phones, IoT systems, and other Linux-based products using USB gadget EEM may experience network-interface failures, broken sysfs state, or crashes requiring service restart or reboot. The public exploitation signal is currently low: EPSS is 0.00122 with no 30-day increase, it is not listed in CISA KEV, is not associated with ransomware, and no public exploit maturity is reported. However, because the issue is in the kernel, affected product vendors should still prioritize kernel updates during normal maintenance windows, especially for devices where local users, containers, debug shells, or management agents can alter USB gadget configuration.
How an attack unfolds
An attacker first needs local access and the ability to interact with USB gadget configuration, typically through configfs, gadget composite driver controls, or a privileged local process. The attacker configures a USB gadget using the f_eem function so that a net_device such as usb0 is registered under the gadget device in sysfs. They then cause repeated unbind and rebind operations, or otherwise tear down the gadget while the network device persists. On vulnerable kernels, the gadget parent device can be destroyed while the net_device remains registered, leaving dangling sysfs symlinks and inconsistent kernel object relationships. Continued interaction with the stale interface, sysfs entries, udev, network-management tooling, or power-management paths may produce device-management errors or kernel instability. The practical outcome is denial of service against the local host or the USB gadget networking function, not remote code execution or direct data compromise.
How to fix it
Update to a Linux kernel build that includes the upstream fix for the USB gadget f_eem net_device lifecycle issue. The fix reparents the net_device with device_move() between the gadget device tree and /sys/devices/virtual across bind and unbind cycles, preventing dangling sysfs links and preserving correct device lifecycle ordering. No exact fixed package versions were provided in the input, so use the kernel version supplied by the relevant Linux distribution, device vendor, Android/device BSP vendor, or appliance firmware vendor that explicitly references this CVE or the upstream f_eem device_move fix. If immediate patching is not possible, reduce exposure by disabling unused USB gadget functionality, removing or blacklisting unnecessary gadget EEM configurations, limiting access to configfs and gadget-management tooling to trusted administrators, preventing untrusted local users or containers from controlling USB gadget state, and monitoring for repeated gadget bind/unbind operations.
How to confirm the fix worked
Confirm remediation by verifying the running kernel or firmware contains the f_eem fix that moves the net_device between the gadget parent and /sys/devices/virtual during unbind and rebind. After patching, perform a controlled test on non-production hardware: create an EEM gadget, bind it to a UDC, confirm the network interface appears, unbind the gadget, and verify that /sys/class/net/<interface> does not point to a destroyed gadget path. Rebind the gadget and confirm the interface is correctly reparented under the new gadget path without kernel warnings, broken symlinks, udev errors, or network-manager failures. Also validate that unprivileged users and containers cannot write to USB gadget configfs paths unless explicitly required.
Typical attack path
- Obtain local access to a Linux system that has USB gadget support enabled and the EEM function available.
- Gain sufficient privilege to configure or manipulate USB gadget functions, such as access to configfs or equivalent gadget-management controls.
- Create or enable a USB gadget configuration using the f_eem Ethernet Emulation Model function, resulting in an interface such as usb0.
- Bind the gadget to a USB Device Controller so the EEM net_device is registered under the gadget device tree.
- Repeatedly unbind, remove, or reconfigure the gadget so the gadget parent device is destroyed while the net_device survives.
- Interact with the stale network interface, sysfs links, or management services to trigger errors, instability, or loss of availability.
How to detect it
Look for evidence that USB gadget EEM interfaces were repeatedly created, bound, unbound, or left in an inconsistent sysfs state. Useful sources include kernel logs from dmesg or journald, udev logs, audit logs for writes under /sys/kernel/config/usb_gadget, shell history or EDR telemetry showing gadget-management commands, and system monitoring that records interface creation/removal events for usb0 or other gadget network interfaces. Investigate repeated bind/unbind operations involving f_eem, sudden disappearance of gadget sysfs parent paths while /sys/class/net entries remain, udev failures for gadget network devices, kernel warnings involving USB gadget, configfs, net_device, or sysfs, and local processes writing to UDC, functions/eem.*, or configuration symlinks. Because no public exploit indicators or actor-specific tooling are known, detection should focus on behavioral artifacts and post-condition evidence rather than fixed malware signatures.
- /sys/kernel/config/usb_gadget
- /sys/kernel/config/usb_gadget/*/UDC
- /sys/kernel/config/usb_gadget/*/functions/eem.*
- /sys/kernel/config/usb_gadget/*/configs/*/eem.*
- /sys/class/net/usb0
- /sys/devices/virtual/net/usb0
- /sys/devices/platform/*/gadget.*/net/usb0
- f_eem
- usb_f_eem
- functions/eem
- gadget.0/net/usb0
- No such file or directory
- dangling sysfs symlinks
- net_device
- device_move
What your security team should do
- Inventory Linux systems, appliances, embedded devices, and development platforms that enable USB gadget mode, especially those using f_eem or usb0-style gadget networking.
- Prioritize updates for devices where local users, support shells, containers, management agents, or physical/debug access can manipulate USB gadget configuration.
- Apply vendor kernel or firmware updates that include the upstream USB gadget f_eem device lifecycle fix.
- Where patching is delayed, disable unused USB gadget functions and restrict write access to /sys/kernel/config/usb_gadget and related management interfaces.
- Monitor kernel, udev, and system logs for repeated gadget bind/unbind activity, dangling sysfs paths, and USB gadget network-interface errors.
- Add regression testing for USB gadget bind, unbind, and rebind cycles to device qualification pipelines for products that ship USB gadget networking.
- Treat this as a local denial-of-service risk with low current exploitation likelihood, but maintain normal kernel patch hygiene because exploitation can be simple where gadget control is exposed.
The record
In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_eem: Fix net_device lifecycle with device_move The net_device is allocated during function instance creation and registered during the bind phase with the gadget device as its sysfs parent. When the function unbinds, the parent device is destroyed, but the net_device survives, resulting in dangling sysfs symlinks: console:/ # ls -l /sys/class/net/usb0 lrwxrwxrwx ... /sys/class/net/usb0 -> /sys/devices/platform/.../gadget.0/net/usb0 console:/ # ls -l /sys/devices/platform/.../gadget.0/net/usb0 ls: .../gadget.0/net/usb0: No such file or directory Use device_move() to reparent the net_device between the gadget device tree and /sys/devices/virtual across bind and unbind cycles. During the final unbind, calling device_move(NULL) moves the net_device to the virtual device tree before the gadget device is destroyed. On rebinding, device_move() reparents the device back under the new gadget, ensuring proper sysfs topology and power management ordering. To maintain compatibility with legacy composite drivers (e.g., multi.c), the bound flag is used to indicate whether the network device is shared and pre-registered during the legacy driver's bind phase.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|