CVE-2026-138844
usb: core: don't set drvdata to NULL in usb_unbind_interface()
Check your servers for CVE-2026-138844
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-138844 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
In the Linux kernel, the following vulnerability has been resolved:
usb: core: don't set drvdata to NULL in usb_unbind_interface()
usb_unbind_interface() serves as the remove() callback of struct usb_driver and calls usb_set_intfdata(intf, NULL) to clear the bus device private data pointer.
However, the driver core code already sets the bus device private data pointer to NULL in device_unbind_cleanup() *after* devres_release_all(), which makes the call redundant.
In addition, it can create unexpected NULL pointer dereference scenarios when drivers use managed APIs.
int probe(struct usb_interface *intf, const struct usb_device_id *id) { struct data *data; int ret;
data = devm_kzalloc(&intf->dev, sizeof(*data), GFP_KERNEL); if (!data) return -ENOMEM;
ret = devm_device_add_group(&intf->dev, &foo_attr_group); if (ret) return ret;
... }
ssize_t foo_value_show(struct device *dev, struct device_attribute *attr, char *buf) { struct usb_interface *intf = to_usb_interface(dev); struct data *data = usb_get_intfdata(intf);
/* Potential NULL pointer dereference */ return sysfs_emit(buf, "%u\n", data->value); }
Nothing prevents usb_unbind_interface() to race with foo_value_show() and set usb_set_intfdata(intf, NULL).
The same applies to the unwind path of usb_probe_interface(), which also calls usb_set_intfdata(intf, NULL).
Besides that, the Rust driver core code manages a driver's bus device private data and destroys it in device_unbind_cleanup().
If usb_unbind_interface() sets the pointer to NULL prematurely, the Rust driver core code sees NULL, and hence skips the destructor of the bus device private data, which leaks all its resources.
Thus, drop usb_set_intfdata(intf, NULL) from usb_probe_interface() and usb_unbind_interface(), and move it to usb_driver_release_interface(), which manually calls the remove() callback of struct usb_driver and hence can't rely on the driver core.
Exploitation
EPSS 0.16%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 5.71% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from a995fe1a3aa78b7d06cc1cc7b6b8436c5e93b07f, before c460161d08103ee44c670e94da8c3c70ae82f4be affected from a995fe1a3aa78b7d06cc1cc7b6b8436c5e93b07f, before 8f0d16174102863936d583c90258ea02bf06205c
Other versions: unaffected
|
| Linux |
affected 6.19 unaffected before 6.19 unaffected from 7.3.4 up to and including 7.3.* unaffected 7.4-rc1 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-138844 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-138844
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-138844
trivy image --scanners vuln IMAGE | grep CVE-2026-138844
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/c460161d08103ee44c670e94da8c3c70ae82f4be git.kernel.org
- https://git.kernel.org/stable/c/8f0d16174102863936d583c90258ea02bf06205c git.kernel.org
Source: the record CVE-2026-138844 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse