usb: xhci: Add error handling in xhci_map_urb_for_dma
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 2017a1e58472a27e532b9644b4a61dfe18f6baac · < be95cc6d71dfd0cba66e3621c65413321b398052| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
usb: xhci: Add error handling in xhci_map_urb_for_dma
Currently xhci_map_urb_for_dma() creates a temporary buffer and copies the SG list to the new linear buffer. But if the kzalloc_node() fails, then the following sg_pcopy_to_buffer() can lead to crash since it tries to memcpy to NULL pointer.
So return -ENOMEM if kzalloc returns null pointer.
From the CVE record · Linux
The Linux kernel’s xhci_map_urb_for_dma() can crash if temporary-buffer allocation fails and the code then copies data to a null pointer. The input does not specify how an attacker could trigger this condition or whether access or user interaction is required.
Engineers running the Linux kernel should check their versions; affected versions are not specified.