{"api_version":"1","generated_at":"2026-11-30T18:56:04+00:00","cve":"CVE-2026-139361","urls":{"html":"https://cve.report/CVE-2026-139361","api":"https://cve.report/api/cve/CVE-2026-139361.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-139361","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-139361"},"summary":{"title":"ALSA: pcm: Add refcount for races between drain and unlink","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nALSA: pcm: Add refcount for races between drain and unlink\n\nWe added a workaround for the case where a linked substream gets\nunlinked during the drain operation by another substream of the same\nlinked group in the commit 9b1dbd69ba6f (\"ALSA: pcm: fix\nuse-after-free on linked stream runtime in snd_pcm_drain()\").\nThere, we just cached the parameters of the draining substream for\navoiding UAF.\n\nThen, we check the draining substream (to_check) again in the loop and\nremove it from the queue only when it's still present.  It means,\nhowever, that the wait queue entry won't be removed if the substream\nwent out of the link beforehand, hence a stale wq entry remains.\nLater on, this can be woken up, and this may hit a UAF, too.\nThe problem surfaced more due to the recent change to call\nsnd_pcm_unlink() earlier.\n\nFor properly handling both cases above, in this patch, we introduce a\nrefcount to the snd_pcm_runtime that indicates the substream is being\naccessed / used, then at snd_pcm_release_substream(), it's synced\nbefore the actual resource release via snd_refcount_sync().  This\nguarantees that the accessors are finished, and safe to release\nmemories.  Along with the introduction of a refcount, the comments and\nthe code changes by the former fix were partially reverted as they\ndon't fit with the updated code flow any longer.\n\nLast but not least, the setup of wait queue entry and\nprepare_to_wait() call are moved before the group unref.  With this\nchange, we can avoid the race between the enqueue and the wakeup, too.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:19:02","updated_at":"2026-11-30 14:19:02"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/bf052a1fb6507ccb6aea53b12db98f0976f8872d","name":"https://git.kernel.org/stable/c/bf052a1fb6507ccb6aea53b12db98f0976f8872d","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/68273cb3c8e115b1886ddb4bdf30dd91af1a9e62","name":"https://git.kernel.org/stable/c/68273cb3c8e115b1886ddb4bdf30dd91af1a9e62","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/7131b6e1cab439eae7bf4ed37857183e84268b5b","name":"https://git.kernel.org/stable/c/7131b6e1cab439eae7bf4ed37857183e84268b5b","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/7d8afac865e73648bae36075b829d5bc4dd32f4e","name":"https://git.kernel.org/stable/c/7d8afac865e73648bae36075b829d5bc4dd32f4e","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/91d0048a97e0fdc0a071caa0ba59e659bc6f84df","name":"https://git.kernel.org/stable/c/91d0048a97e0fdc0a071caa0ba59e659bc6f84df","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/220edbb1806a43a45e9f51a6cc68c54d58c583ee","name":"https://git.kernel.org/stable/c/220edbb1806a43a45e9f51a6cc68c54d58c583ee","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/bac6a5a3c96237c025086b885d31a3485a3204d9","name":"https://git.kernel.org/stable/c/bac6a5a3c96237c025086b885d31a3485a3204d9","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-139361","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139361","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected f2cb2e0d27fb925c73a78f0ce7d6dbf68d3747c1 220edbb1806a43a45e9f51a6cc68c54d58c583ee git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected fc71f888994569f87d5bee20b1ac6c9c1e3a7a79 7131b6e1cab439eae7bf4ed37857183e84268b5b git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 629cf09464cf98670996ea5c191dc9743e6f3f00 bf052a1fb6507ccb6aea53b12db98f0976f8872d git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ae8f8d30d334bad5b1b3cdb1eb8a0b771f55e432 68273cb3c8e115b1886ddb4bdf30dd91af1a9e62 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4a758e9a1f5ed722f83c4dd35f867fe811553bcb 7d8afac865e73648bae36075b829d5bc4dd32f4e git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 9b1dbd69ba6f8f8c69bc7b77c2ce3b9c6ed05ba6 bac6a5a3c96237c025086b885d31a3485a3204d9 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 9b1dbd69ba6f8f8c69bc7b77c2ce3b9c6ed05ba6 91d0048a97e0fdc0a071caa0ba59e659bc6f84df git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 9baee36e8c5443411c4629afabafaff8a46a23fd git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected c2f64e05a0587a83ec42dbd6b7a7ded79b2ff694 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5.15.220 5.15.226 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.1.167 6.1.193 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.6.130 6.6.163 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.12.78 6.12.119 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.18.19 6.18.65 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5.10.253 5.11 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.19.9 6.20 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 7.0","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.0 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.15.226 5.15.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1.193 6.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.163 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.119 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.65 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.6 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["include/sound/pcm.h","sound/core/pcm.c","sound/core/pcm_native.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"220edbb1806a43a45e9f51a6cc68c54d58c583ee","status":"affected","version":"f2cb2e0d27fb925c73a78f0ce7d6dbf68d3747c1","versionType":"git"},{"lessThan":"7131b6e1cab439eae7bf4ed37857183e84268b5b","status":"affected","version":"fc71f888994569f87d5bee20b1ac6c9c1e3a7a79","versionType":"git"},{"lessThan":"bf052a1fb6507ccb6aea53b12db98f0976f8872d","status":"affected","version":"629cf09464cf98670996ea5c191dc9743e6f3f00","versionType":"git"},{"lessThan":"68273cb3c8e115b1886ddb4bdf30dd91af1a9e62","status":"affected","version":"ae8f8d30d334bad5b1b3cdb1eb8a0b771f55e432","versionType":"git"},{"lessThan":"7d8afac865e73648bae36075b829d5bc4dd32f4e","status":"affected","version":"4a758e9a1f5ed722f83c4dd35f867fe811553bcb","versionType":"git"},{"lessThan":"bac6a5a3c96237c025086b885d31a3485a3204d9","status":"affected","version":"9b1dbd69ba6f8f8c69bc7b77c2ce3b9c6ed05ba6","versionType":"git"},{"lessThan":"91d0048a97e0fdc0a071caa0ba59e659bc6f84df","status":"affected","version":"9b1dbd69ba6f8f8c69bc7b77c2ce3b9c6ed05ba6","versionType":"git"},{"status":"affected","version":"9baee36e8c5443411c4629afabafaff8a46a23fd","versionType":"git"},{"status":"affected","version":"c2f64e05a0587a83ec42dbd6b7a7ded79b2ff694","versionType":"git"},{"lessThan":"5.15.226","status":"affected","version":"5.15.220","versionType":"semver"},{"lessThan":"6.1.193","status":"affected","version":"6.1.167","versionType":"semver"},{"lessThan":"6.6.163","status":"affected","version":"6.6.130","versionType":"semver"},{"lessThan":"6.12.119","status":"affected","version":"6.12.78","versionType":"semver"},{"lessThan":"6.18.65","status":"affected","version":"6.18.19","versionType":"semver"},{"lessThan":"5.11","status":"affected","version":"5.10.253","versionType":"semver"},{"lessThan":"6.20","status":"affected","version":"6.19.9","versionType":"semver"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["include/sound/pcm.h","sound/core/pcm.c","sound/core/pcm_native.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"7.0"},{"lessThan":"7.0","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"5.15.*","status":"unaffected","version":"5.15.226","versionType":"semver"},{"lessThanOrEqual":"6.1.*","status":"unaffected","version":"6.1.193","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.163","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.119","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.65","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.6","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.15.226","versionStartIncluding":"5.15.220","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.1.193","versionStartIncluding":"6.1.167","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.163","versionStartIncluding":"6.6.130","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.119","versionStartIncluding":"6.12.78","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.65","versionStartIncluding":"6.18.19","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.6","versionStartIncluding":"7.0","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"7.0","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.10.253","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.19.9","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nALSA: pcm: Add refcount for races between drain and unlink\n\nWe added a workaround for the case where a linked substream gets\nunlinked during the drain operation by another substream of the same\nlinked group in the commit 9b1dbd69ba6f (\"ALSA: pcm: fix\nuse-after-free on linked stream runtime in snd_pcm_drain()\").\nThere, we just cached the parameters of the draining substream for\navoiding UAF.\n\nThen, we check the draining substream (to_check) again in the loop and\nremove it from the queue only when it's still present.  It means,\nhowever, that the wait queue entry won't be removed if the substream\nwent out of the link beforehand, hence a stale wq entry remains.\nLater on, this can be woken up, and this may hit a UAF, too.\nThe problem surfaced more due to the recent change to call\nsnd_pcm_unlink() earlier.\n\nFor properly handling both cases above, in this patch, we introduce a\nrefcount to the snd_pcm_runtime that indicates the substream is being\naccessed / used, then at snd_pcm_release_substream(), it's synced\nbefore the actual resource release via snd_refcount_sync().  This\nguarantees that the accessors are finished, and safe to release\nmemories.  Along with the introduction of a refcount, the comments and\nthe code changes by the former fix were partially reverted as they\ndon't fit with the updated code flow any longer.\n\nLast but not least, the setup of wait queue entry and\nprepare_to_wait() call are moved before the group unref.  With this\nchange, we can avoid the race between the enqueue and the wakeup, too."}],"providerMetadata":{"dateUpdated":"2026-11-30T13:34:02.926Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/220edbb1806a43a45e9f51a6cc68c54d58c583ee"},{"url":"https://git.kernel.org/stable/c/7131b6e1cab439eae7bf4ed37857183e84268b5b"},{"url":"https://git.kernel.org/stable/c/bf052a1fb6507ccb6aea53b12db98f0976f8872d"},{"url":"https://git.kernel.org/stable/c/68273cb3c8e115b1886ddb4bdf30dd91af1a9e62"},{"url":"https://git.kernel.org/stable/c/7d8afac865e73648bae36075b829d5bc4dd32f4e"},{"url":"https://git.kernel.org/stable/c/bac6a5a3c96237c025086b885d31a3485a3204d9"},{"url":"https://git.kernel.org/stable/c/91d0048a97e0fdc0a071caa0ba59e659bc6f84df"}],"title":"ALSA: pcm: Add refcount for races between drain and unlink","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-139361","datePublished":"2026-11-30T13:34:02.926Z","dateReserved":"2026-11-30T13:22:15.929Z","dateUpdated":"2026-11-30T13:34:02.926Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:19:02","lastModifiedDate":"2026-11-30 14:19:02","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"139361","Ordinal":"1","Title":"ALSA: pcm: Add refcount for races between drain and unlink","CVE":"CVE-2026-139361","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"139361","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nALSA: pcm: Add refcount for races between drain and unlink\n\nWe added a workaround for the case where a linked substream gets\nunlinked during the drain operation by another substream of the same\nlinked group in the commit 9b1dbd69ba6f (\"ALSA: pcm: fix\nuse-after-free on linked stream runtime in snd_pcm_drain()\").\nThere, we just cached the parameters of the draining substream for\navoiding UAF.\n\nThen, we check the draining substream (to_check) again in the loop and\nremove it from the queue only when it's still present.  It means,\nhowever, that the wait queue entry won't be removed if the substream\nwent out of the link beforehand, hence a stale wq entry remains.\nLater on, this can be woken up, and this may hit a UAF, too.\nThe problem surfaced more due to the recent change to call\nsnd_pcm_unlink() earlier.\n\nFor properly handling both cases above, in this patch, we introduce a\nrefcount to the snd_pcm_runtime that indicates the substream is being\naccessed / used, then at snd_pcm_release_substream(), it's synced\nbefore the actual resource release via snd_refcount_sync().  This\nguarantees that the accessors are finished, and safe to release\nmemories.  Along with the introduction of a refcount, the comments and\nthe code changes by the former fix were partially reverted as they\ndon't fit with the updated code flow any longer.\n\nLast but not least, the setup of wait queue entry and\nprepare_to_wait() call are moved before the group unref.  With this\nchange, we can avoid the race between the enqueue and the wakeup, too.","Type":"Description","Title":"ALSA: pcm: Add refcount for races between drain and unlink"}]}}}