ASoC: soc-core: flush delayed work before removing DAIs and widgets
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 5.10.253, 5.15.203, 6.1.167, 6.6.130, 6.12.78, and 2 more
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: no
- Technical impact: total
Summary
In the Linux kernel, the following vulnerability has been resolved: ASoC: soc-core: flush delayed work before removing DAIs and widgets When a sound card is unbound while a PCM stream is open, a use-after-free can occur in snd_soc_dapm_stream_event(), called from the close_delayed_work workqueue handler. During unbind, snd_soc_unbind_card() flushes delayed work and then calls soc_cleanup_card_resources(). Inside cleanup, snd_card_disconnect_sync() releases all PCM file descriptors, and the resulting PCM close path can call snd_soc_dapm_stream_stop() which schedules new delayed work with a pmdown_time timer delay. Since this happens after the flush in snd_soc_unbind_card(), the new work is not caught. soc_remove_link_components() then frees DAPM widgets before this work fires, leading to the use-after-free. The existing flush in soc_free_pcm_runtime() also cannot help as it runs after soc_remove_link_components() has already freed the widgets. Add a flush in soc_cleanup_card_resources() after snd_card_disconnect_sync() (after which no new PCM closes can schedule further delayed work) and before soc_remove_link_dais() and soc_remove_link_components() (which tear down the structures the delayed work accesses).
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: total
- Record last updated
Affected versions
- Linux Linux
From e894efef9ac7c10b7727798dcc711cccf07569f9 · fixed in bf80a89da97285d9b877e0c6995e870d46b8025c; From e894efef9ac7c10b7727798dcc711cccf07569f9 · fixed in 3887e514978d28216246360b46a9cb534969eb5a; From e894efef9ac7c10b7727798dcc711cccf07569f9 · fixed in 231568afbc0cd25b8fb2a94ebf9738eabe1cf007; From e894efef9ac7c10b7727798dcc711cccf07569f9 · fixed in 317a9298c54bb00319da73e5a7179f00e67fcbdf; From e894efef9ac7c10b7727798dcc711cccf07569f9 · fixed in eab71e11ce2447c1e01809cbc11eab4234cf8dc8; From e894efef9ac7c10b7727798dcc711cccf07569f9 · fixed in 7d33e6140945482a07f8089ee86e13e02553ffdb; From e894efef9ac7c10b7727798dcc711cccf07569f9 · fixed in c054f0607c8bb1b1aa529bc109e4149298a1cccd; From e894efef9ac7c10b7727798dcc711cccf07569f9 · fixed in 95bc5c225513fc3c4ce169563fb5e3929fbb938b
- Linux Linux
4.20
- KernelLinux
From 4.20.0 · fixed in 5.10.253; From 5.11.0 · fixed in 5.15.203; From 5.16.0 · fixed in 6.1.167; From 6.2.0 · fixed in 6.6.130; From 6.7.0 · fixed in 6.12.78; From 6.13.0 · fixed in 6.18.19; From 6.19.0 · fixed in 6.19.9
References 8
git.kernel.org
- stable/c/bf80a89da97285d9b877e0c6995e870d46b8025c
- stable/c/3887e514978d28216246360b46a9cb534969eb5a
- stable/c/231568afbc0cd25b8fb2a94ebf9738eabe1cf007
- stable/c/317a9298c54bb00319da73e5a7179f00e67fcbdf
- stable/c/eab71e11ce2447c1e01809cbc11eab4234cf8dc8
- stable/c/7d33e6140945482a07f8089ee86e13e02553ffdb
- stable/c/c054f0607c8bb1b1aa529bc109e4149298a1cccd
- stable/c/95bc5c225513fc3c4ce169563fb5e3929fbb938b