i3c: dw: Fix memory leak in dw_i3c_master_i2c_xfers()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
i3c: dw: Fix memory leak in dw_i3c_master_i2c_xfers()
The dw_i3c_master_i2c_xfers() function allocates memory for the xfer structure using dw_i3c_master_alloc_xfer(). If pm_runtime_resume_and_get() fails, the function returns without freeing the allocated xfer, resulting in a memory leak.
Add a dw_i3c_master_free_xfer() call to the error path to ensure the allocated memory is properly freed.
Compile tested only. Issue found using a prototype static analysis tool and code review.
From the CVE record · Linux
The Linux kernel’s dw_i3c_master_i2c_xfers() function can leak an allocated transfer structure if pm_runtime_resume_and_get() fails. The input does not establish how an attacker could trigger this failure or specify network access, authentication, or user-interaction requirements.
Engineers running Linux kernels with the affected DesignWare I3C driver should check their kernel versions; affected versions were not provided.