{"id":"CVE-2021-47195","sourceIdentifier":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","published":"2024-04-10T19:15:47.853","lastModified":"2026-06-17T04:16:53.067","vulnStatus":"Modified","cveTags":[],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nspi: fix use-after-free of the add_lock mutex\n\nCommit 6098475d4cb4 (\"spi: Fix deadlock when adding SPI controllers on\nSPI buses\") introduced a per-controller mutex. But mutex_unlock() of\nsaid lock is called after the controller is already freed:\n\n  spi_unregister_controller(ctlr)\n  -> put_device(&ctlr->dev)\n    -> spi_controller_release(dev)\n  -> mutex_unlock(&ctrl->add_lock)\n\nMove the put_device() after the mutex_unlock()."},{"lang":"es","value":"En el kernel de Linux, se resolvió la siguiente vulnerabilidad: spi: corrige el use-after-free del mutex add_lock. El commit 6098475d4cb4 (\"spi: corrige el punto muerto al agregar controladores SPI en buses SPI\") introdujo un mutex por controlador. Pero mutex_unlock() de dicho bloqueo se llama después de que el controlador ya está liberado: spi_unregister_controller(ctlr) -&gt; put_device(&amp;ctlr-&gt;dev) -&gt; spi_controller_release(dev) -&gt; mutex_unlock(&amp;ctrl-&gt;add_lock) Mueva put_device() después el mutex_unlock()."}],"affected":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","affectedData":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","programFiles":["drivers/spi/spi.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"aa3f3d7bef59583f2d3234173105a27ff61ef8fe","lessThan":"54c2c96eafcfd242e52e932ab54ace4784efe1dd","versionType":"git","status":"affected"},{"version":"c8dce228db6f81dbc897a018dfc5c418e917cf64","lessThan":"11eab327a2a8bd36c38afbff920ae1bd45588dd4","versionType":"git","status":"affected"},{"version":"6098475d4cb48d821bdf453c61118c56e26294f0","lessThan":"37330f37f6666c7739a44b2b6b95b047ccdbed2d","versionType":"git","status":"affected"},{"version":"6098475d4cb48d821bdf453c61118c56e26294f0","lessThan":"6c53b45c71b4920b5e62f0ea8079a1da382b9434","versionType":"git","status":"affected"},{"version":"722ef19a161ce3fffb3d1b01ce2301c306639bdd","versionType":"git","status":"affected"},{"version":"5.14.15","lessThan":"5.15","versionType":"semver","status":"affected"}]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","programFiles":["drivers/spi/spi.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"5.15","status":"affected"},{"version":"0","lessThan":"5.15","versionType":"semver","status":"unaffected"},{"version":"5.15.5","lessThanOrEqual":"5.15.*","versionType":"semver","status":"unaffected"},{"version":"5.16","lessThanOrEqual":"*","versionType":"original_commit_for_fix","status":"unaffected"}]}]}],"metrics":{"cvssMetricV31":[{"source":"nvd@nist.gov","type":"Primary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","baseScore":5.5,"baseSeverity":"MEDIUM","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH"},"exploitabilityScore":1.8,"impactScore":3.6}],"ssvcV203":[{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","ssvcData":{"timestamp":"2024-04-10T19:52:25.727067Z","id":"CVE-2021-47195","options":[{"exploitation":"none"},{"automatable":"no"},{"technicalImpact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}]},"weaknesses":[{"source":"nvd@nist.gov","type":"Primary","description":[{"lang":"en","value":"CWE-416"}]}],"configurations":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartExcluding":"5.15.0","versionEndExcluding":"5.15.5","matchCriteriaId":"9E41D489-7457-4244-B477-AF077373C777"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/11eab327a2a8bd36c38afbff920ae1bd45588dd4","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/37330f37f6666c7739a44b2b6b95b047ccdbed2d","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"]},{"url":"https://git.kernel.org/stable/c/54c2c96eafcfd242e52e932ab54ace4784efe1dd","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/6c53b45c71b4920b5e62f0ea8079a1da382b9434","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"]},{"url":"https://git.kernel.org/stable/c/37330f37f6666c7739a44b2b6b95b047ccdbed2d","source":"af854a3a-2127-422b-91ae-364da2661108","tags":["Patch"]},{"url":"https://git.kernel.org/stable/c/6c53b45c71b4920b5e62f0ea8079a1da382b9434","source":"af854a3a-2127-422b-91ae-364da2661108","tags":["Patch"]}]}