CVE-2026-31725·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_ecm: 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.
- Severity
- medium
- Software
- Kernel
- Fixed in
- 6.19.12
- Published
Affected versions
From: 6.19
Until: 6.19.12
Fixed in: 6.19.12
How to fix this CVE
Update your Linux kernel to version 6.19.12 or later to resolve this USB gadget ECM driver vulnerability. The fix corrects improper device lifecycle management that causes orphaned sysfs entries when the USB function unbinds and rebinds. Systems running kernel versions 6.19 through 6.19.11 should prioritize this update to restore proper device topology and prevent potential stability issues during repeated bind/unbind cycles.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check your installed kernel version with `uname -r` and compare against 6.19.0 through 6.19.11
- Step 2: Verify ECM gadget is active by checking if usb0 device exists with `ip link show usb0` or `ls -l /sys/class/net/ | grep usb`
- Step 3: Search kernel logs for sysfs link errors with `dmesg | grep -i 'sysfs\|device_move\|net_device'` or check `/var/log/kern.log`
- Step 4: Confirm the fix by checking kernel version is 6.19.12+ with `uname -r`, then verify usb0 symlinks resolve correctly with `ls -l /sys/class/net/usb0 && readlink -f /sys/class/net/usb0`
FAQ
What is CVE-2026-31725?
This vulnerability affects the Linux kernel's USB ECM (Ethernet Control Model) gadget driver. It causes dangling sysfs symlinks to persist when the USB function unbinds from its parent gadget device, creating orphaned entries in /sys/class/net that no longer resolve to valid device paths.
Is CVE-2026-31725 being actively exploited?
No, this vulnerability is not listed on the CISA KEV catalog and has no known public exploits. The issue is primarily a stability and device management problem rather than a direct security threat.
What versions of Kernel are affected by CVE-2026-31725?
Linux kernel versions 6.19 through 6.19.11 are vulnerable. Version 6.19.12 and later contain the fix.
How do I check if my server is vulnerable to CVE-2026-31725?
Run `uname -r` to check your kernel version. If it shows 6.19.0 through 6.19.11, you are vulnerable. Additionally, if you use USB gadget ECM functionality, check for broken symlinks with `ls -l /sys/class/net/usb0 2>&1 | grep -i 'No such file'`.
Does Defensia detect CVE-2026-31725?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2026-31725 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/40c4d35c71a170889fe9333a1feb69a4dd5d4365
- https://git.kernel.org/stable/c/4e34f3f491fd731809b57ddb5329ec763bd39553
- https://git.kernel.org/stable/c/5eaeac22240d965d24c3bd0c54ded64efd8f6ca1
- https://git.kernel.org/stable/c/9b1e5589593293c78a2ab8bb118a41e2271a2af8
- https://git.kernel.org/stable/c/b2cc4fae67a51f60d81d6af2678696accb07c656
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-31725. Free for 1 server.
Get started free