{"id":"CVE-2022-50347","summary":"mmc: rtsx_usb_sdmmc: fix return value check of mmc_add_host()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nmmc: rtsx_usb_sdmmc: fix return value check of mmc_add_host()\n\nmmc_add_host() may return error, if we ignore its return value, the memory\nthat allocated in mmc_alloc_host() will be leaked and it will lead a kernel\ncrash because of deleting not added device in the remove path.\n\nSo fix this by checking the return value and calling mmc_free_host() in the\nerror path, besides, led_classdev_unregister() and pm_runtime_disable() also\nneed be called.","modified":"2026-04-11T11:56:53.154351Z","published":"2025-09-16T16:11:39.891Z","related":["SUSE-SU-2025:03615-1","SUSE-SU-2025:03628-1","SUSE-SU-2025:3716-1","SUSE-SU-2025:3761-1","SUSE-SU-2026:0473-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50347.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/1491667d5450778a265eddddd294219acfd648cb"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7fa922c7a3dd623fd59f1af50e8896fd9ca7f654"},{"type":"WEB","url":"https://git.kernel.org/stable/c/89303ddbb502c3bc8edbf864f9f85500c8fe07e9"},{"type":"WEB","url":"https://git.kernel.org/stable/c/937112e991ed25d1727d878734adcbef3b900274"},{"type":"WEB","url":"https://git.kernel.org/stable/c/a522e26a20a43dcfbef9ee9f71ed803290e852b0"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d7ad7278be401b09c9f9a9f522cf4c449c7fd489"},{"type":"WEB","url":"https://git.kernel.org/stable/c/df683201c7ffbd21a806a7cad657b661c5ebfb6f"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e598c9683fe1cf97c2b11b800cc3cee072108220"},{"type":"WEB","url":"https://git.kernel.org/stable/c/fc38a5a10e9e5a75eb9189854abeb8405b214cc9"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50347.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50347"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"c7f6558d84afe60016b8103c0737df6e376a1c2d"},{"fixed":"d7ad7278be401b09c9f9a9f522cf4c449c7fd489"},{"fixed":"e598c9683fe1cf97c2b11b800cc3cee072108220"},{"fixed":"89303ddbb502c3bc8edbf864f9f85500c8fe07e9"},{"fixed":"937112e991ed25d1727d878734adcbef3b900274"},{"fixed":"7fa922c7a3dd623fd59f1af50e8896fd9ca7f654"},{"fixed":"df683201c7ffbd21a806a7cad657b661c5ebfb6f"},{"fixed":"1491667d5450778a265eddddd294219acfd648cb"},{"fixed":"a522e26a20a43dcfbef9ee9f71ed803290e852b0"},{"fixed":"fc38a5a10e9e5a75eb9189854abeb8405b214cc9"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50347.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.16.0"},{"fixed":"4.9.337"}]},{"type":"ECOSYSTEM","events":[{"introduced":"4.10.0"},{"fixed":"4.14.303"}]},{"type":"ECOSYSTEM","events":[{"introduced":"4.15.0"},{"fixed":"4.19.270"}]},{"type":"ECOSYSTEM","events":[{"introduced":"4.20.0"},{"fixed":"5.4.229"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.5.0"},{"fixed":"5.10.163"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.86"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.0.16"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.1.0"},{"fixed":"6.1.2"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50347.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"}]}