{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-138844","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2026-11-30T13:22:15.898Z","datePublished":"2026-11-30T13:25:30.613Z","dateUpdated":"2026-11-30T13:25:30.613Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-11-30T13:25:30.613Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: core: don't set drvdata to NULL in usb_unbind_interface()\n\nusb_unbind_interface() serves as the remove() callback of struct\nusb_driver and calls usb_set_intfdata(intf, NULL) to clear the bus\ndevice private data pointer.\n\nHowever, the driver core code already sets the bus device private data\npointer to NULL in device_unbind_cleanup() *after* devres_release_all(),\nwhich makes the call redundant.\n\nIn addition, it can create unexpected NULL pointer dereference scenarios\nwhen drivers use managed APIs.\n\n\tint probe(struct usb_interface *intf,\n\t\t  const struct usb_device_id *id)\n\t{\n\t\tstruct data *data;\n\t\tint ret;\n\n\t\tdata = devm_kzalloc(&intf->dev, sizeof(*data), GFP_KERNEL);\n\t\tif (!data)\n\t\t\treturn -ENOMEM;\n\n\t\tret = devm_device_add_group(&intf->dev, &foo_attr_group);\n\t\tif (ret)\n\t\t\treturn ret;\n\n\t\t...\n\t}\n\n\tssize_t foo_value_show(struct device *dev, struct device_attribute *attr,\n\t\t\t       char *buf)\n\t{\n\t\tstruct usb_interface *intf = to_usb_interface(dev);\n\t\tstruct data *data = usb_get_intfdata(intf);\n\n\t\t/* Potential NULL pointer dereference */\n\t\treturn sysfs_emit(buf, \"%u\\n\", data->value);\n\t}\n\nNothing prevents usb_unbind_interface() to race with foo_value_show()\nand set usb_set_intfdata(intf, NULL).\n\nThe same applies to the unwind path of usb_probe_interface(), which also\ncalls usb_set_intfdata(intf, NULL).\n\nBesides that, the Rust driver core code manages a driver's bus device\nprivate data and destroys it in device_unbind_cleanup().\n\nIf usb_unbind_interface() sets the pointer to NULL prematurely, the Rust\ndriver core code sees NULL, and hence skips the destructor of the bus\ndevice private data, which leaks all its resources.\n\nThus, drop usb_set_intfdata(intf, NULL) from usb_probe_interface() and\nusb_unbind_interface(), and move it to usb_driver_release_interface(),\nwhich manually calls the remove() callback of struct usb_driver and\nhence can't rely on the driver core."}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/usb/core/driver.c"],"versions":[{"version":"a995fe1a3aa78b7d06cc1cc7b6b8436c5e93b07f","lessThan":"c460161d08103ee44c670e94da8c3c70ae82f4be","status":"affected","versionType":"git"},{"version":"a995fe1a3aa78b7d06cc1cc7b6b8436c5e93b07f","lessThan":"8f0d16174102863936d583c90258ea02bf06205c","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/usb/core/driver.c"],"versions":[{"version":"6.19","status":"affected"},{"version":"0","lessThan":"6.19","status":"unaffected","versionType":"semver"},{"version":"7.3.4","lessThanOrEqual":"7.3.*","status":"unaffected","versionType":"semver"},{"version":"7.4-rc1","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.19","versionEndExcluding":"7.3.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.19","versionEndExcluding":"7.4-rc1"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/c460161d08103ee44c670e94da8c3c70ae82f4be"},{"url":"https://git.kernel.org/stable/c/8f0d16174102863936d583c90258ea02bf06205c"}],"title":"usb: core: don't set drvdata to NULL in usb_unbind_interface()","x_generator":{"engine":"bippy-1.2.0"}}}}