usbip: vhci_hcd: fix NULL deref in status_show_vhci
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 0775a9cbc694e8c7276688be3bbd2f386167ab54 · < dacd7c317ba12e035653c28a0eaaf23d91abc073| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
usbip: vhci_hcd: fix NULL deref in status_show_vhci
platform_get_drvdata() can return NULL if a VHCI host controller's probe failed (e.g. due to USB bus number exhaustion). status_show_vhci() checked for a NULL pdev but not for a NULL hcd returned by platform_get_drvdata(). Passing NULL to hcd_to_vhci_hcd() does not return NULL - it returns a pointer offset of 0x260, causing a NULL pointer dereference when that value is subsequently dereferenced.
Add a NULL check on hcd before calling hcd_to_vhci_hcd(). Move status_show_not_ready() above status_show_vhci() to make it callable from the new error path without a forward declaration.
From the CVE record · Linux
The Linux kernel’s usbip vhci_hcd component can dereference a NULL pointer when its status is read after a VHCI host controller probe fails. This can cause a kernel fault; the input does not specify whether triggering it requires network access, authentication, or user interaction.
Anyone running a Linux kernel with the usbip vhci_hcd component should check their version; affected versions are not specified.