CVE-2026-31727
Awaiting Analysis Awaiting Analysis - Queue
NULL Pointer Dereference in Linux Kernel USB Gadget

Publication date: 2026-05-01

Last updated on: 2026-05-01

Assigner: kernel.org

Description
In the Linux kernel, the following vulnerability has been resolved: usb: gadget: u_ether: Fix NULL pointer deref in eth_get_drvinfo Commit ec35c1969650 ("usb: gadget: f_ncm: Fix net_device lifecycle with device_move") reparents the gadget device to /sys/devices/virtual during unbind, clearing the gadget pointer. If the userspace tool queries on the surviving interface during this detached window, this leads to a NULL pointer dereference. Unable to handle kernel NULL pointer dereference Call trace: eth_get_drvinfo+0x50/0x90 ethtool_get_drvinfo+0x5c/0x1f0 __dev_ethtool+0xaec/0x1fe0 dev_ethtool+0x134/0x2e0 dev_ioctl+0x338/0x560 Add a NULL check for dev->gadget in eth_get_drvinfo(). When detached, skip copying the fw_version and bus_info strings, which is natively handled by ethtool_get_drvinfo for empty strings.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-05-01
Last Modified
2026-05-01
Generated
2026-05-07
AI Q&A
2026-05-01
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
linux linux_kernel *
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability exists in the Linux kernel's USB gadget subsystem, specifically in the u_ether driver. It occurs because after a gadget device is unbound and reparented to a different location in the device hierarchy, a userspace tool querying the network interface during this detached state can trigger a NULL pointer dereference.

The issue arises when the eth_get_drvinfo function attempts to access the gadget pointer, which may be NULL during this window, leading to a kernel crash. The fix involves adding a NULL check for the gadget pointer in eth_get_drvinfo to safely skip copying certain strings when the device is detached.


How can this vulnerability impact me? :

This vulnerability can cause a kernel NULL pointer dereference, which typically results in a kernel crash or system instability. If exploited or triggered, it could lead to denial of service by crashing the affected system or device running the vulnerable Linux kernel.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart