mmc: toshsd: fix return value check of mmc_add_host()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ a5eb8bbd66ccf9f169419f9652544aec771b7c57 · < 6444079767b68b1fbed0e7668081146e80dcb719| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
mmc: toshsd: 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, free_irq() also needs be called.
From the CVE record · Linux
The Linux kernel’s toshsd MMC driver fails to check whether mmc_add_host() returns an error, which can leak memory and cause a kernel crash when the device is removed. The input does not establish an attacker-triggered path or specify network access, authentication, or user interaction requirements.
Engineers running Linux kernels with the toshsd MMC driver should check their versions; affected versions are not specified.