mmc: vub300: fix return value check of mmc_add_host()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 88095e7b473a3d9ec3b9c60429576e9cbd327c89 · < afc898019e7bf18c5eb7a0ac19852fcb1b341b3c| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
mmc: vub300: fix return value check of mmc_add_host()
mmc_add_host() may return error, if we ignore its return value, the memory that allocated in mmc_alloc_host() will be leaked and it will lead a kernel crash because of deleting not added device in the remove path.
So fix this by checking the return value and goto error path which will call mmc_free_host(), besides, the timer added before mmc_add_host() needs be del.
And this patch fixes another missing call mmc_free_host() if usb_control_msg() fails.
From the CVE record · Linux
The Linux kernel's vub300 MMC driver can leak memory if mmc_add_host() or usb_control_msg() fails. An mmc_add_host() failure can also lead to a kernel crash when the remove path tries to delete a device that was not added. The input does not specify attacker access requirements or user interaction.
Engineers running the Linux kernel should check whether their kernel includes the affected vub300 driver; affected versions are not specified.