mmc: moxart: fix return value check of mmc_add_host()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1b66e94e6b9995323190f31c51d8e1a6f516627e · < f0502fe86a2db2336c9498d2de3e97f22dcf85ae| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
mmc: moxart: 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().
From the CVE record · Linux
The Linux kernel's moxart MMC driver did not check whether mmc_add_host() failed. If it failed, allocated memory could leak, and removing the device could crash the kernel. The input does not specify an attack path, authentication requirement, or user interaction.
Engineers running Linux kernels that use the moxart MMC driver should check their exposure; affected versions are not specified.