usb: ulpi: fix double free in ulpi_register_interface() error path
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 289fcff4bcdb1dcc0ce8788b7ea0f58a9e4a495f · < 38c28fe25611099230f0965c925499bfcf46a795| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
usb: ulpi: fix double free in ulpi_register_interface() error path
When device_register() fails, ulpi_register() calls put_device() on ulpi->dev.
The device release callback ulpi_dev_release() drops the OF node reference and frees ulpi, but the current error path in ulpi_register_interface() then calls kfree(ulpi) again, causing a double free.
Let put_device() handle the cleanup through ulpi_dev_release() and avoid freeing ulpi again in ulpi_register_interface().
From the CVE record · Linux
The Linux kernel’s USB ULPI interface registration error path can free the same memory twice when device_register() fails. The input does not specify how an attacker could trigger the failure or whether network access, authentication, or user interaction is required.
Engineers running Linux kernels with USB ULPI support should check their kernel versions; affected versions were not provided.