CVE-2026-31725
usb: gadget: f_ecm: Fix net_device lifecycle with device_move
Description
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.
INFO
Published Date :
May 1, 2026, 3:16 p.m.
Last Modified :
Nov. 11, 2026, 9:10 p.m.
Remotely Exploit :
No
Source :
416baaa9-dc9f-4396-8d5f-8c081fb06d67
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS 3.1 | MEDIUM | [email protected] |
Solution
- Reparent net_device using device_move across bind/unbind.
- Move net_device to virtual tree on final unbind.
- Reparent net_device back under new gadget on rebind.
- Utilize bound flag for legacy composite driver compatibility.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-31725.
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-31725 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-31725
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-31725 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-31725 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Translated by [email protected]
Nov. 11, 2026
Action Type Old Value New Value Added Translation Title: Linux Kernel, Description: En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: usb: gadget: f_ecm: Corrección del ciclo de vida de net_device con device_move El net_device se asigna durante la creación de la instancia de función y se registra durante la fase de enlace con el dispositivo gadget como su padre sysfs. Cuando la función se desvincula, el dispositivo padre es destruido, pero el net_device sobrevive, lo que resulta en enlaces simbólicos sysfs colgantes: 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 existe tal archivo o directorio Usar device_move() para reasignar el padre al net_device entre el árbol de dispositivos gadget y /sys/devices/virtual a través de los ciclos de enlace y desvinculación. Durante la desvinculación final, al llamar a device_move(NULL) se mueve el net_device al árbol de dispositivos virtual antes de que el dispositivo gadget sea destruido. Al volver a enlazar, device_move() reasigna el padre al dispositivo de nuevo bajo el nuevo gadget, asegurando una topología sysfs y un orden de gestión de energía adecuados. Para mantener la compatibilidad con controladores compuestos heredados (p. ej., multi.c), se utiliza la bandera ’bound’ para indicar si el dispositivo de red se comparte y se pre-registra durante la fase de enlace del controlador heredado. -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Oct. 30, 2026
Action Type Old Value New Value Added Affected Affected value modified. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2026/31xxx/CVE-2026-31725.json">CVE-2026-31725</a> Added Reference https://git.kernel.org/stable/c/40c4d35c71a170889fe9333a1feb69a4dd5d4365 -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Oct. 21, 2026
Action Type Old Value New Value Added Affected Affected value modified. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2026/31xxx/CVE-2026-31725.json">CVE-2026-31725</a> Added Reference https://git.kernel.org/stable/c/4e34f3f491fd731809b57ddb5329ec763bd39553 Added Reference https://git.kernel.org/stable/c/5eaeac22240d965d24c3bd0c54ded64efd8f6ca1 Added Reference https://git.kernel.org/stable/c/9b1e5589593293c78a2ab8bb118a41e2271a2af8 Added Reference https://git.kernel.org/stable/c/b2cc4fae67a51f60d81d6af2678696accb07c656 Added Reference https://git.kernel.org/stable/c/fdc3aa4c23d3e0ed781ca0e10213c645e445cc03 Removed Reference https://git.kernel.org/stable/c/4e34f3f491fd731809b57ddb5329ec763bd39553 Removed Reference https://git.kernel.org/stable/c/5eaeac22240d965d24c3bd0c54ded64efd8f6ca1 Removed Reference https://git.kernel.org/stable/c/9b1e5589593293c78a2ab8bb118a41e2271a2af8 Removed Reference https://git.kernel.org/stable/c/b2cc4fae67a51f60d81d6af2678696accb07c656 Removed Reference Type https://git.kernel.org/stable/c/4e34f3f491fd731809b57ddb5329ec763bd39553 Types: Patch Removed Reference Type https://git.kernel.org/stable/c/5eaeac22240d965d24c3bd0c54ded64efd8f6ca1 Types: Patch Removed Reference Type https://git.kernel.org/stable/c/9b1e5589593293c78a2ab8bb118a41e2271a2af8 Types: Patch Removed Reference Type https://git.kernel.org/stable/c/b2cc4fae67a51f60d81d6af2678696accb07c656 Types: Patch -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Jun. 17, 2026
Action Type Old Value New Value Added Affected [{'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': 'fee562a6450b7806f1fbbe1469a67b5395b5c10a', 'lessThan': '5eaeac22240d965d24c3bd0c54ded64efd8f6ca1', 'versionType': 'git'}, {'status': 'affected', 'version': 'fee562a6450b7806f1fbbe1469a67b5395b5c10a', 'lessThan': '4e34f3f491fd731809b57ddb5329ec763bd39553', 'versionType': 'git'}, {'status': 'affected', 'version': 'fee562a6450b7806f1fbbe1469a67b5395b5c10a', 'lessThan': '9b1e5589593293c78a2ab8bb118a41e2271a2af8', 'versionType': 'git'}, {'status': 'affected', 'version': 'fee562a6450b7806f1fbbe1469a67b5395b5c10a', 'lessThan': 'b2cc4fae67a51f60d81d6af2678696accb07c656', 'versionType': 'git'}], 'programFiles': ['drivers/usb/gadget/function/f_ecm.c', 'drivers/usb/gadget/function/u_ecm.h'], 'defaultStatus': 'unaffected'}, {'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': '3.11'}, {'status': 'unaffected', 'version': '0', 'lessThan': '3.11', 'versionType': 'semver'}, {'status': 'unaffected', 'version': '6.12.81', 'versionType': 'semver', 'lessThanOrEqual': '6.12.*'}, {'status': 'unaffected', 'version': '6.18.22', 'versionType': 'semver', 'lessThanOrEqual': '6.18.*'}, {'status': 'unaffected', 'version': '6.19.12', 'versionType': 'semver', 'lessThanOrEqual': '6.19.*'}, {'status': 'unaffected', 'version': '7.0', 'versionType': 'original_commit_for_fix', 'lessThanOrEqual': '*'}], 'programFiles': ['drivers/usb/gadget/function/f_ecm.c', 'drivers/usb/gadget/function/u_ecm.h'], 'defaultStatus': 'affected'}] -
Initial Analysis by [email protected]
May. 07, 2026
Action Type Old Value New Value Added CVSS V3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H Added CWE NVD-CWE-noinfo Added CPE Configuration OR *cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.0:rc5:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.0:rc6:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.13 up to (excluding) 6.18.22 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.19 up to (excluding) 6.19.12 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 3.11 up to (excluding) 6.12.81 Added Reference Type kernel.org: https://git.kernel.org/stable/c/4e34f3f491fd731809b57ddb5329ec763bd39553 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/5eaeac22240d965d24c3bd0c54ded64efd8f6ca1 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/9b1e5589593293c78a2ab8bb118a41e2271a2af8 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/b2cc4fae67a51f60d81d6af2678696accb07c656 Types: Patch -
New CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
May. 01, 2026
Action Type Old Value New Value Added Description 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. Added Reference https://git.kernel.org/stable/c/4e34f3f491fd731809b57ddb5329ec763bd39553 Added Reference https://git.kernel.org/stable/c/5eaeac22240d965d24c3bd0c54ded64efd8f6ca1 Added Reference https://git.kernel.org/stable/c/9b1e5589593293c78a2ab8bb118a41e2271a2af8 Added Reference https://git.kernel.org/stable/c/b2cc4fae67a51f60d81d6af2678696accb07c656