Description
In the Linux kernel, the following vulnerability has been resolved:

usb: gadget: u_ether: Fix race between gether_disconnect and eth_stop

A race condition between gether_disconnect() and eth_stop() leads to a
NULL pointer dereference. Specifically, if eth_stop() is triggered
concurrently while gether_disconnect() is tearing down the endpoints,
eth_stop() attempts to access the cleared endpoint descriptor, causing
the following NPE:

Unable to handle kernel NULL pointer dereference
Call trace:
__dwc3_gadget_ep_enable+0x60/0x788
dwc3_gadget_ep_enable+0x70/0xe4
usb_ep_enable+0x60/0x15c
eth_stop+0xb8/0x108

Because eth_stop() crashes while holding the dev->lock, the thread
running gether_disconnect() fails to acquire the same lock and spins
forever, resulting in a hardlockup:

Core - Debugging Information for Hardlockup core(7)
Call trace:
queued_spin_lock_slowpath+0x94/0x488
_raw_spin_lock+0x64/0x6c
gether_disconnect+0x19c/0x1e8
ncm_set_alt+0x68/0x1a0
composite_setup+0x6a0/0xc50

The root cause is that the clearing of dev->port_usb in
gether_disconnect() is delayed until the end of the function.

Move the clearing of dev->port_usb to the very beginning of
gether_disconnect() while holding dev->lock. This cuts off the link
immediately, ensuring eth_stop() will see dev->port_usb as NULL and
safely bail out.
Published: 2026-05-01
Score: 5.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

A race condition (CWE‑367) between the gether_disconnect() and eth_stop() functions in the Linux kernel’s USB gadget u_ether driver can trigger a NULL pointer dereference. When eth_stop() runs concurrently while gether_disconnect() clears an endpoint descriptor, the driver fails to detect that the endpoint has been removed and attempts to dereference the cleared descriptor. This causes a kernel crash, and because eth_stop() holds the dev->lock during the dereference, the thread executing gether_disconnect() cannot acquire the same lock and spins forever, resulting in a hardlockup. The system becomes unresponsive until a reboot restores normal operation.

Affected Systems

The vulnerability affects all Linux kernel releases that include the unmodified u_ether USB gadget driver, specifically the core Linux kernel. The affected vendor is Linux and the product is the Linux kernel across all supported distributions that ship the kernel with this driver before the commit that moves the clearing of dev->port_usb to the start of gether_disconnect()

Risk and Exploitability

The CVSS score of 5.5 denotes moderate severity. With no EPSS score available and the issue not present in the CISA KEV catalog, the specific exploitation probability remains uncertain. However, the required conditions—a local user able to activate the u_ether driver and attach a USB Ethernet gadget—are plausible in many environments. Because the flaw leads to a hardlockup that requires a reboot, the primary impact is denial of service.

Generated by OpenCVE AI on May 2, 2026 at 11:47 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a version that incorporates the commit fixing the race condition; the patch is referenced in the provided commit logs.
  • If an update is not immediately available, disable the u_ether USB gadget driver until a patched kernel is installed (e.g., modprobe -r u_ether or add it to a blacklist).
  • Monitor system logs (dmesg, /var/log/kern.log) for signs of hardlockups and adjust device usage accordingly.

Generated by OpenCVE AI on May 2, 2026 at 11:47 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DLA Debian DLA DLA-4561-1 linux-6.1 security update
Debian DSA Debian DSA DSA-6243-1 linux security update
History

Sat, 02 May 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-367
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate


Fri, 01 May 2026 14:45:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: usb: gadget: u_ether: Fix race between gether_disconnect and eth_stop A race condition between gether_disconnect() and eth_stop() leads to a NULL pointer dereference. Specifically, if eth_stop() is triggered concurrently while gether_disconnect() is tearing down the endpoints, eth_stop() attempts to access the cleared endpoint descriptor, causing the following NPE: Unable to handle kernel NULL pointer dereference Call trace: __dwc3_gadget_ep_enable+0x60/0x788 dwc3_gadget_ep_enable+0x70/0xe4 usb_ep_enable+0x60/0x15c eth_stop+0xb8/0x108 Because eth_stop() crashes while holding the dev->lock, the thread running gether_disconnect() fails to acquire the same lock and spins forever, resulting in a hardlockup: Core - Debugging Information for Hardlockup core(7) Call trace: queued_spin_lock_slowpath+0x94/0x488 _raw_spin_lock+0x64/0x6c gether_disconnect+0x19c/0x1e8 ncm_set_alt+0x68/0x1a0 composite_setup+0x6a0/0xc50 The root cause is that the clearing of dev->port_usb in gether_disconnect() is delayed until the end of the function. Move the clearing of dev->port_usb to the very beginning of gether_disconnect() while holding dev->lock. This cuts off the link immediately, ensuring eth_stop() will see dev->port_usb as NULL and safely bail out.
Title usb: gadget: u_ether: Fix race between gether_disconnect and eth_stop
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-05-01T14:14:28.231Z

Reserved: 2026-03-09T15:48:24.134Z

Link: CVE-2026-31728

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-05-01T15:16:35.333

Modified: 2026-05-01T15:24:14.893

Link: CVE-2026-31728

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-05-01T00:00:00Z

Links: CVE-2026-31728 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-05-02T12:00:14Z

Weaknesses