{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-139361",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-11-30T13:22:15.929Z",
        "datePublished": "2026-11-30T13:34:02.926Z",
        "dateUpdated": "2026-11-30T13:34:02.926Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-11-30T13:34:02.926Z"
            },
            "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."
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "include/sound/pcm.h",
                        "sound/core/pcm.c",
                        "sound/core/pcm_native.c"
                    ],
                    "versions": [
                        {
                            "version": "f2cb2e0d27fb925c73a78f0ce7d6dbf68d3747c1",
                            "lessThan": "220edbb1806a43a45e9f51a6cc68c54d58c583ee",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "fc71f888994569f87d5bee20b1ac6c9c1e3a7a79",
                            "lessThan": "7131b6e1cab439eae7bf4ed37857183e84268b5b",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "629cf09464cf98670996ea5c191dc9743e6f3f00",
                            "lessThan": "bf052a1fb6507ccb6aea53b12db98f0976f8872d",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "ae8f8d30d334bad5b1b3cdb1eb8a0b771f55e432",
                            "lessThan": "68273cb3c8e115b1886ddb4bdf30dd91af1a9e62",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "4a758e9a1f5ed722f83c4dd35f867fe811553bcb",
                            "lessThan": "7d8afac865e73648bae36075b829d5bc4dd32f4e",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "9b1dbd69ba6f8f8c69bc7b77c2ce3b9c6ed05ba6",
                            "lessThan": "bac6a5a3c96237c025086b885d31a3485a3204d9",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "9b1dbd69ba6f8f8c69bc7b77c2ce3b9c6ed05ba6",
                            "lessThan": "91d0048a97e0fdc0a071caa0ba59e659bc6f84df",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "9baee36e8c5443411c4629afabafaff8a46a23fd",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "c2f64e05a0587a83ec42dbd6b7a7ded79b2ff694",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "5.15.220",
                            "lessThan": "5.15.226",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.167",
                            "lessThan": "6.1.193",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.130",
                            "lessThan": "6.6.163",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.78",
                            "lessThan": "6.12.119",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.18.19",
                            "lessThan": "6.18.65",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.253",
                            "lessThan": "5.11",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.19.9",
                            "lessThan": "6.20",
                            "status": "affected",
                            "versionType": "semver"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "include/sound/pcm.h",
                        "sound/core/pcm.c",
                        "sound/core/pcm_native.c"
                    ],
                    "versions": [
                        {
                            "version": "7.0",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "7.0",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.226",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.193",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.163",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.119",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.18.65",
                            "lessThanOrEqual": "6.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.3.6",
                            "lessThanOrEqual": "7.3.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.4-rc1",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.15.220",
                                    "versionEndExcluding": "5.15.226"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.1.167",
                                    "versionEndExcluding": "6.1.193"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.6.130",
                                    "versionEndExcluding": "6.6.163"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.12.78",
                                    "versionEndExcluding": "6.12.119"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.18.19",
                                    "versionEndExcluding": "6.18.65"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "7.0",
                                    "versionEndExcluding": "7.3.6"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "7.0",
                                    "versionEndExcluding": "7.4-rc1"
                                },
                                {
                                    "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"
                                }
                            ]
                        }
                    ]
                }
            ],
            "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"
            }
        }
    }
}