{"id":"CVE-2022-50670","aliases":["CVE-2022-50670"],"related":[],"kind":"vulnerability","state":"published","title":"mmc: omap_hsmmc: fix return value check of mmc_add_host()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nmmc: omap_hsmmc: fix return value check of mmc_add_host()\n\nmmc_add_host() may return error, if we ignore its return value,\nit will lead two issues:\n1. The memory that allocated in mmc_alloc_host() is leaked.\n2. In the remove() path, mmc_remove_host() will be called to\n   delete device, but it's not added yet, it will lead a kernel\n   crash because of null-ptr-deref in device_del().\n\nFix this by checking the return value and goto error path wihch\nwill call mmc_free_host().","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nmmc: omap_hsmmc: fix return value check of mmc_add_host()\n\nmmc_add_host() may return error, if we ignore its return value,\nit will lead two issues:\n1. The memory that allocated in mmc_alloc_host() is leaked.\n2. In the remove() path, mmc_remove_host() will be called to\n   delete device, but it's not added yet, it will lead a kernel\n   crash because of null-ptr-deref in device_del().\n\nFix this by checking the return value and goto error path wihch\nwill call mmc_free_host().","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nmmc: omap_hsmmc: corregir la comprobación del valor de retorno de mmc_add_host()\n\nmmc_add_host() puede devolver un error; si ignoramos su valor de retorno, esto conducirá a dos problemas:\n1. La memoria que se asignó en mmc_alloc_host() se filtra.\n2. En la ruta de remove(), se llamará a mmc_remove_host() para eliminar el dispositivo, pero aún no se ha añadido, lo que provocará un fallo del kernel debido a una desreferencia de puntero nulo en device_del().\n\nEsto se soluciona comprobando el valor de retorno y yendo a la ruta de error que llamará a mmc_free_host().","source":"nvd"}],"published":"2025-12-09T01:29:21.864Z","modified":"2026-11-10T12:10:00.177Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"a45c6cb816474cefe56059fce422a9bdcd77e0dc","fixed":"f153c9e15f8961bdf38707853e15b42ea7c691d9","status":"affected"},{"type":"git","introduced":"a45c6cb816474cefe56059fce422a9bdcd77e0dc","fixed":"fb3d596267a98813a7a8206097d8d46c98505a0d","status":"affected"},{"type":"git","introduced":"a45c6cb816474cefe56059fce422a9bdcd77e0dc","fixed":"62005dfcc396424db3337a1dc3ab49623537f5e5","status":"affected"},{"type":"git","introduced":"a45c6cb816474cefe56059fce422a9bdcd77e0dc","fixed":"a5f8a4583280a76e50329b910e91ef1dea1e6c79","status":"affected"},{"type":"git","introduced":"a45c6cb816474cefe56059fce422a9bdcd77e0dc","fixed":"4e1dc24bcfc8257f24c0663badec7e4f3ae80558","status":"affected"},{"type":"git","introduced":"a45c6cb816474cefe56059fce422a9bdcd77e0dc","fixed":"a525cad241c339ca00bf7ebf03c5180f2a9b767c","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"2.6.29","status":"affected"},{"type":"semver","introduced":"0","fixed":"2.6.29","status":"unaffected"},{"type":"semver","introduced":"5.4.229","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.163","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.86","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.0.16","lastAffected":"6.0.*","status":"unaffected"},{"type":"semver","introduced":"6.1.2","lastAffected":"6.1.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.2","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/f153c9e15f8961bdf38707853e15b42ea7c691d9","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/fb3d596267a98813a7a8206097d8d46c98505a0d","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/62005dfcc396424db3337a1dc3ab49623537f5e5","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a5f8a4583280a76e50329b910e91ef1dea1e6c79","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4e1dc24bcfc8257f24c0663badec7e4f3ae80558","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a525cad241c339ca00bf7ebf03c5180f2a9b767c","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-50670","url":"https://www.cve.org/CVERecord?id=CVE-2022-50670","licence":"CVE Terms of Use","modified":"2026-05-11T19:23:21.367Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-50670","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50670","licence":"Public domain","modified":"2026-11-10T12:10:00.177Z"}],"updatedAt":"2026-11-25T22:58:21.314Z","epss":{"score":0.00262,"percentile":0.1924,"date":"2026-12-01T12:00:22.000Z"}}