usb: roles: fix NULL pointer issue when put module's reference
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 5c54fcac9a9de559b444ac63ec3cd82f1d157a0b · < 1c9be13846c0b2abc2480602f8ef421360e1ad9e| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
usb: roles: fix NULL pointer issue when put module's reference
In current design, usb role class driver will get usb_role_switch parent's module reference after the user get usb_role_switch device and put the reference after the user put the usb_role_switch device. However, the parent device of usb_role_switch may be removed before the user put the usb_role_switch. If so, then, NULL pointer issue will be met when the user put the parent module's reference.
This will save the module pointer in structure of usb_role_switch. Then, we don't need to find module by iterating long relations.
From the CVE record · Linux
The Linux kernel USB role class driver can encounter a NULL pointer issue when releasing a parent module reference. This occurs if the USB role switch’s parent device is removed before a user releases the switch; the input does not specify attacker access requirements or user interaction.
Engineers running Linux kernels with USB role switch support should check their versions; affected versions are not specified.