{"id":"CVE-2022-49842","published":"2025-05-01T14:09:57Z","modified":"2026-05-11T19:07:49Z","title":"ASoC: core: Fix use-after-free in snd_soc_exit()","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nASoC: core: Fix use-after-free in snd_soc_exit()\n\nKASAN reports a use-after-free:\n\nBUG: KASAN: use-after-free in device_del+0xb5b/0xc60\nRead of size 8 at addr ffff888008655050 by task rmmod/387\nCPU: 2 PID: 387 Comm: rmmod\nHardware name: QEMU Standard PC (i440FX + PIIX, 1996)\nCall Trace:\n<TASK>\ndump_stack_lvl+0x79/0x9a\nprint_report+0x17f/0x47b\nkasan_report+0xbb/0xf0\ndevice_del+0xb5b/0xc60\nplatform_device_del.part.0+0x24/0x200\nplatform_device_unregister+0x2e/0x40\nsnd_soc_exit+0xa/0x22 [snd_soc_core]\n__do_sys_delete_module.constprop.0+0x34f/0x5b0\ndo_syscall_64+0x3a/0x90\nentry_SYSCALL_64_after_hwframe+0x63/0xcd\n...\n</TASK>\n\nIt's bacause in snd_soc_init(), snd_soc_util_init() is possble to fail,\nbut its ret is ignored, which makes soc_dummy_dev unregistered twice.\n\nsnd_soc_init()\n    snd_soc_util_init()\n        platform_device_register_simple(soc_dummy_dev)\n        platform_driver_register() # fail\n    \tplatform_device_unregister(soc_dummy_dev)\n    platform_driver_register() # success\n...\nsnd_soc_exit()\n    snd_soc_util_exit()\n    # soc_dummy_dev will be unregistered for second time\n\nTo fix it, handle error and stop snd_soc_init() when util_init() fail.\nAlso clean debugfs when util_init() or driver_register() fail.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.00222,"percentile":0.13016,"provenance":"source"},"cwes":[{"id":"CWE-416","name":"Use After Free"}],"references":[{"url":"https://git.kernel.org/stable/c/41fad4f712e081acdfde8b59847f9f66eaf407a0","tags":[]},{"url":"https://git.kernel.org/stable/c/90bbdf30a51e42378cb23a312005a022794b8e1e","tags":[]},{"url":"https://git.kernel.org/stable/c/a3365e62239dc064019a244bde5686ac18527c22","tags":[]},{"url":"https://git.kernel.org/stable/c/2ec3f558db343b045a7c7419cdbaec266b8ac1a7","tags":[]},{"url":"https://git.kernel.org/stable/c/8d21554ec7680e9585fb852d933203c3db60dad1","tags":[]},{"url":"https://git.kernel.org/stable/c/34eee4189bcebbd5f6a2ff25ef0cb893ad33d51e","tags":[]},{"url":"https://git.kernel.org/stable/c/c5674bd073c0fd9f620ca550c5ff08d0d429bdd9","tags":[]},{"url":"https://git.kernel.org/stable/c/6ec27c53886c8963729885bcf2dd996eba2767a7","tags":[]}],"priority":{"score":8.1,"factors":[{"name":"EPSS percentile","points":2.6},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= fb257897bf20c5f0e1df584bb5b874e811651263, < 41fad4f712e081acdfde8b59847f9f66eaf407a0",">= fb257897bf20c5f0e1df584bb5b874e811651263, < 90bbdf30a51e42378cb23a312005a022794b8e1e",">= fb257897bf20c5f0e1df584bb5b874e811651263, < a3365e62239dc064019a244bde5686ac18527c22",">= fb257897bf20c5f0e1df584bb5b874e811651263, < 2ec3f558db343b045a7c7419cdbaec266b8ac1a7",">= fb257897bf20c5f0e1df584bb5b874e811651263, < 8d21554ec7680e9585fb852d933203c3db60dad1",">= fb257897bf20c5f0e1df584bb5b874e811651263, < 34eee4189bcebbd5f6a2ff25ef0cb893ad33d51e",">= fb257897bf20c5f0e1df584bb5b874e811651263, < c5674bd073c0fd9f620ca550c5ff08d0d429bdd9",">= fb257897bf20c5f0e1df584bb5b874e811651263, < 6ec27c53886c8963729885bcf2dd996eba2767a7"]},{"vendor":"Linux","product":"Linux","versions":["3.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2025-10-01T17:00:53.638936Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2025-12936","exploited":false,"provenance":"source"}}