# CVE-2022-50353: mmc: wmt-sdmmc: fix return value check of mmc_add_host()

- Severity: Medium 5.5 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 12% of CVEs (2026-12-01)
- Published: 2025-09-17T14:56:06.761Z
- Modified: 2026-06-17T05:23:18.323Z
- Weaknesses: CWE-476
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

mmc: wmt-sdmmc: 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, clk_disable_unprepare() also needs be called.

(As written by CVE List.)

## Affected

- Linux Linux: from 3a96dff0f828ae9dfb43efd49a9b67a74c6dc360 before 70b0620afab3c69d95a7e2dd7ceff162a21c4009; from 3a96dff0f828ae9dfb43efd49a9b67a74c6dc360 before ecd6f77af3478f5223aa4011642a891b7dc91228; from 3a96dff0f828ae9dfb43efd49a9b67a74c6dc360 before c7a328cea791cc2769b6417943939420913b4a46; from 3a96dff0f828ae9dfb43efd49a9b67a74c6dc360 before 9bedf64dda84b29151e41591d8ded9ff0e6d336a; from 3a96dff0f828ae9dfb43efd49a9b67a74c6dc360 before 58c3a8d0f1abeb1ca5c2df948be58ad4f7bb6f67; from 3a96dff0f828ae9dfb43efd49a9b67a74c6dc360 before b40ac3b696a9c84b36211ef0c3f5a422650c101b; from 3a96dff0f828ae9dfb43efd49a9b67a74c6dc360 before eb7a2d516d4fbd165c07877a20feccb047342b1f; from 3a96dff0f828ae9dfb43efd49a9b67a74c6dc360 before 29276d56f6ed138db0f38cd31aedc0b725c8c76c; 3.8 (not affected: before 3.8; from 4.14.303 up to 4.14.*; from 4.19.270 up to 4.19.*; from 5.4.229 up to 5.4.*; from 5.10.163 up to 5.10.*; from 5.15.86 up to 5.15.*; from 6.0.16 up to 6.0.*; from 6.1.2 up to 6.1.*; from 6.2 up to *)
- linux linux_kernel: from 3.8 before 4.14.303; from 4.15 before 4.19.270; from 4.20 before 5.4.229; from 5.5 before 5.10.163; from 5.11 before 5.15.86; from 5.16 before 6.0.16; from 6.1 before 6.1.2

## Every score

- CISA-ADP: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/70b0620afab3c69d95a7e2dd7ceff162a21c4009> (patch)
- <https://git.kernel.org/stable/c/ecd6f77af3478f5223aa4011642a891b7dc91228> (patch)
- <https://git.kernel.org/stable/c/c7a328cea791cc2769b6417943939420913b4a46> (patch)
- <https://git.kernel.org/stable/c/9bedf64dda84b29151e41591d8ded9ff0e6d336a> (patch)
- <https://git.kernel.org/stable/c/58c3a8d0f1abeb1ca5c2df948be58ad4f7bb6f67> (patch)
- <https://git.kernel.org/stable/c/b40ac3b696a9c84b36211ef0c3f5a422650c101b> (patch)
- <https://git.kernel.org/stable/c/eb7a2d516d4fbd165c07877a20feccb047342b1f> (patch)
- <https://git.kernel.org/stable/c/29276d56f6ed138db0f38cd31aedc0b725c8c76c> (patch)

## Sources

- CVE List: [CVE-2022-50353](https://www.cve.org/CVERecord?id=CVE-2022-50353), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2022-50353](https://nvd.nist.gov/vuln/detail/CVE-2022-50353), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-50353 · Whole record: https://cve.day/CVE-2022-50353.json · Rebuilt by cve.day 2026-11-25T22:58:21.177Z
