usb: gadget: u_serial: Add null pointer check in gserial_suspend
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
usb: gadget: u_serial: Add null pointer check in gserial_suspend
Consider a case where gserial_disconnect has already cleared gser->ioport. And if gserial_suspend gets called afterwards, it will lead to accessing of gser->ioport and thus causing null pointer dereference.
Avoid this by adding a null pointer check. Added a static spinlock to prevent gser->ioport from becoming null after the newly added null pointer check.
From the CVE record · Linux
The Linux kernel USB gadget u_serial component can dereference a null pointer if gserial_suspend runs after gserial_disconnect has cleared gser->ioport. This can cause a kernel fault; the input does not establish how an attacker could trigger it or whether authentication or user interaction is required.
Engineers running Linux kernels with the USB gadget u_serial component should check their versions; affected versions are not specified.