usb: ulpi: fix memory leak on ulpi_register() error paths
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 38c28fe25611099230f0965c925499bfcf46a795 · < 2a71e01b2cf9b4329ff67102c1bea7448c2a2d2d| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
usb: ulpi: fix memory leak on ulpi_register() error paths
Commit 01af542392b5 ("usb: ulpi: fix double free in ulpi_register_interface() error path") removed kfree(ulpi) from ulpi_register_interface() to fix a double-free when device_register() fails.
But when ulpi_of_register() or ulpi_read_id() fail before device_register() is called, the ulpi allocation is leaked.
Add kfree(ulpi) on both error paths to properly clean up the allocation.
From the CVE record · Linux
The Linux kernel's USB ULPI registration code leaks an allocation if ulpi_of_register() or ulpi_read_id() fails before device_register() is called. The input does not describe how an attacker could trigger the failure or specify access or user-interaction requirements.
Engineers running Linux kernels with USB ULPI support should check their kernels; affected versions are not specified.