{"id":"CVE-2026-31722","title":"usb: gadget: f_rndis: Fix net_device lifecycle with device_move","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: f_rndis: Fix net_device lifecycle with device_move\n\nThe net_device is allocated during function instance creation and\nregistered during the bind phase with…","severity":"none","vendor":"Linux","product":"Linux","affected":["Linux >= f466c6353819326873fa48a02c6f2d7c903240d6 < 9701a98f4459b52558f683b6b12a6feb6f17b255","Linux >= f466c6353819326873fa48a02c6f2d7c903240d6 < 1ef251aa63972fe6c0f107f5abd139b7d0f7987a","Linux >= f466c6353819326873fa48a02c6f2d7c903240d6 < 18ada801899f2b13ef0ceff42427ad980a41e619","Linux >= f466c6353819326873fa48a02c6f2d7c903240d6 < 6045ea5ca6e3fa13f8a9fafb1c535c86e124c14d","Linux >= f466c6353819326873fa48a02c6f2d7c903240d6 < e367599529dc42578545a7f85fde517b35b3cda7","Linux 3.11"],"published":"2026-05-01","updated":"2026-10-21","sourceUpdated":"2026-10-21T12:39:43.076Z","source":"CVEORG","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-31722","references":[{"url":"https://git.kernel.org/stable/c/9701a98f4459b52558f683b6b12a6feb6f17b255"},{"url":"https://git.kernel.org/stable/c/1ef251aa63972fe6c0f107f5abd139b7d0f7987a"},{"url":"https://git.kernel.org/stable/c/18ada801899f2b13ef0ceff42427ad980a41e619"},{"url":"https://git.kernel.org/stable/c/6045ea5ca6e3fa13f8a9fafb1c535c86e124c14d"},{"url":"https://git.kernel.org/stable/c/e367599529dc42578545a7f85fde517b35b3cda7"}],"tags":["cve.org"],"epss":0.00162,"epssPercentile":0.04991,"ingestedAt":"2026-10-21T12:48:53.659Z","slug":"CVE-2026-31722","body":"## Overview\n\nIn the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: f_rndis: Fix net_device lifecycle with device_move\n\nThe net_device is allocated during function instance creation and\nregistered during the bind phase with the gadget device as its sysfs\nparent. When the function unbinds, the parent device is destroyed, but\nthe net_device survives, resulting in dangling sysfs symlinks:\n\n  console:/ # ls -l /sys/class/net/usb0\n  lrwxrwxrwx ... /sys/class/net/usb0 ->\n  /sys/devices/platform/.../gadget.0/net/usb0\n  console:/ # ls -l /sys/devices/platform/.../gadget.0/net/usb0\n  ls: .../gadget.0/net/usb0: No such file or directory\n\nUse device_move() to reparent the net_device between the gadget device\ntree and /sys/devices/virtual across bind and unbind cycles. During the\nfinal unbind, calling device_move(NULL) moves the net_device to the\nvirtual device tree before the gadget device is destroyed. On rebinding,\ndevice_move() reparents the device back under the new gadget, ensuring\nproper sysfs topology and power management ordering.\n\nTo maintain compatibility with legacy composite drivers (e.g., multi.c),\nthe borrowed_net flag is used to indicate whether the network device is\nshared and pre-registered during the legacy driver's bind phase.\n\n## Affected\n\n- `Linux >= f466c6353819326873fa48a02c6f2d7c903240d6 < 9701a98f4459b52558f683b6b12a6feb6f17b255`\n- `Linux >= f466c6353819326873fa48a02c6f2d7c903240d6 < 1ef251aa63972fe6c0f107f5abd139b7d0f7987a`\n- `Linux >= f466c6353819326873fa48a02c6f2d7c903240d6 < 18ada801899f2b13ef0ceff42427ad980a41e619`\n- `Linux >= f466c6353819326873fa48a02c6f2d7c903240d6 < 6045ea5ca6e3fa13f8a9fafb1c535c86e124c14d`\n- `Linux >= f466c6353819326873fa48a02c6f2d7c903240d6 < e367599529dc42578545a7f85fde517b35b3cda7`\n- `Linux 3.11`\n\n## Remediation\n\nRefer to the linked advisories for vendor-supplied fixes and affected version ranges.","depth":"sunlit","depthScore":3,"depthScoreParts":{"impact":2.8,"likelihood":0,"exploitation":0,"ransomware":0},"changes":[]}