dmaengine: imx-sdma: Fix a possible memory leak in sdma_transfer_init
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 21420841a554dae8a193cd3454ba91d913cfc320 · < 1417f59ac0b02130ee56c0c50794b9b257be3d17| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
dmaengine: imx-sdma: Fix a possible memory leak in sdma_transfer_init
If the function sdma_load_context() fails, the sdma_desc will be freed, but the allocated desc->bd is forgot to be freed.
We already met the sdma_load_context() failure case and the log as below: [ 450.699064] imx-sdma 30bd0000.dma-controller: Timeout waiting for CH0 ready ...
In this case, the desc->bd will not be freed without this change.
From the CVE record · Linux
The Linux kernel's imx-sdma driver can leak memory when sdma_load_context() fails during sdma_transfer_init: the descriptor is freed, but its allocated desc->bd is not. The input does not describe an attacker, access requirements, or user interaction.
Engineers running the Linux kernel with the imx-sdma driver should check their systems; affected versions are not specified.