CVE-2026-31725

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.
Configurations

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
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:*:*:*:*:*:*

History

11 Nov 2026, 21:10

Type Values Removed Values Added
Summary
  • (es) 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.

30 Oct 2026, 13:18

Type Values Removed Values Added
References
  • () https://git.kernel.org/stable/c/40c4d35c71a170889fe9333a1feb69a4dd5d4365 -

21 Oct 2026, 13:18

Type Values Removed Values Added
References
  • () https://git.kernel.org/stable/c/fdc3aa4c23d3e0ed781ca0e10213c645e445cc03 -

Information

Published : 2026-05-01 15:16

Updated : 2026-11-11 21:10


NVD link : CVE-2026-31725

Mitre link : CVE-2026-31725

CVE.ORG link : CVE-2026-31725


JSON object : View

Products Affected

linux

  • linux_kernel