{"id":"CVE-2022-49291","state":"PUBLISHED","title":"ALSA: pcm: Fix races among concurrent hw_params and hw_free calls","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nALSA: pcm: Fix races among concurrent hw_params and hw_free calls\n\nCurrently we have neither proper check nor protection against the\nconcurrent calls of PCM hw_params and hw_free ioctls, which may result\nin a UAF.  Since the existing PCM stream lock can't be used for\nprotecting the whole ioctl operations, we need a new mutex to protect\nthose racy calls.\n\nThis patch introduced a new mutex, runtime->buffer_mutex, and applies\nit to both hw_params and hw_free ioctl code paths.  Along with it, the\nboth functions are slightly modified (the mmap_count check is moved\ninto the state-check block) for code simplicity.","publishedAt":"2025-02-26T01:56:27.986Z","updatedAt":"2026-08-05T08:54:39.261Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"a42aa926843acca96c0dfbde2e835b8137f2f092","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"9cb6c40a6ebe4a0cfc9d6a181958211682cffea9","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"fbeb492694ce0441053de57699e1e2b7bc148a69","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"0f6947f5f5208f6ebd4d76a82a4757e2839a23f8","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"33061d0fba51d2bf70a2ef9645f703c33fe8e438","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"0090c13cbbdffd7da079ac56f80373a9a1be0bf8","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"1bbf82d9f961414d6c76a08f7f843ea068e0ab7b","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"92ee3c60ec9fe64404dc035e7c41277d74aa26cb","versionType":"git"}],"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"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.12","versionType":"semver"},{"version":"4.14.279","status":"unaffected","lessThanOrEqual":"4.14.*","versionType":"semver"},{"version":"4.19.243","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.193","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.109","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.32","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.16.18","status":"unaffected","lessThanOrEqual":"5.16.*","versionType":"semver"},{"version":"5.17.1","status":"unaffected","lessThanOrEqual":"5.17.*","versionType":"semver"},{"version":"5.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"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"]}],"references":["https://git.kernel.org/stable/c/a42aa926843acca96c0dfbde2e835b8137f2f092","https://git.kernel.org/stable/c/9cb6c40a6ebe4a0cfc9d6a181958211682cffea9","https://git.kernel.org/stable/c/fbeb492694ce0441053de57699e1e2b7bc148a69","https://git.kernel.org/stable/c/0f6947f5f5208f6ebd4d76a82a4757e2839a23f8","https://git.kernel.org/stable/c/33061d0fba51d2bf70a2ef9645f703c33fe8e438","https://git.kernel.org/stable/c/0090c13cbbdffd7da079ac56f80373a9a1be0bf8","https://git.kernel.org/stable/c/1bbf82d9f961414d6c76a08f7f843ea068e0ab7b","https://git.kernel.org/stable/c/92ee3c60ec9fe64404dc035e7c41277d74aa26cb"],"weaknesses":["CWE-416"],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/49xxx/CVE-2022-49291.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-49291","state":"PUBLISHED","datePublished":"2025-02-26T01:56:27.986Z","dateUpdated":"2026-08-05T08:54:39.261Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-02-26T01:49:39.302Z"},"containers":{"cna":{"title":"ALSA: pcm: Fix races among concurrent hw_params and hw_free calls","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nALSA: pcm: Fix races among concurrent hw_params and hw_free calls\n\nCurrently we have neither proper check nor protection against the\nconcurrent calls of PCM hw_params and hw_free ioctls, which may result\nin a UAF.  Since the existing PCM stream lock can't be used for\nprotecting the whole ioctl operations, we need a new mutex to protect\nthose racy calls.\n\nThis patch introduced a new mutex, runtime->buffer_mutex, and applies\nit to both hw_params and hw_free ioctl code paths.  Along with it, the\nboth functions are slightly modified (the mmap_count check is moved\ninto the state-check block) for code simplicity."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"a42aa926843acca96c0dfbde2e835b8137f2f092","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"9cb6c40a6ebe4a0cfc9d6a181958211682cffea9","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"fbeb492694ce0441053de57699e1e2b7bc148a69","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"0f6947f5f5208f6ebd4d76a82a4757e2839a23f8","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"33061d0fba51d2bf70a2ef9645f703c33fe8e438","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"0090c13cbbdffd7da079ac56f80373a9a1be0bf8","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"1bbf82d9f961414d6c76a08f7f843ea068e0ab7b","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"92ee3c60ec9fe64404dc035e7c41277d74aa26cb","versionType":"git"}],"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"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.12","versionType":"semver"},{"version":"4.14.279","status":"unaffected","lessThanOrEqual":"4.14.*","versionType":"semver"},{"version":"4.19.243","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.193","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.109","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.32","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.16.18","status":"unaffected","lessThanOrEqual":"5.16.*","versionType":"semver"},{"version":"5.17.1","status":"unaffected","lessThanOrEqual":"5.17.*","versionType":"semver"},{"version":"5.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"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"]}],"references":[{"url":"https://git.kernel.org/stable/c/a42aa926843acca96c0dfbde2e835b8137f2f092"},{"url":"https://git.kernel.org/stable/c/9cb6c40a6ebe4a0cfc9d6a181958211682cffea9"},{"url":"https://git.kernel.org/stable/c/fbeb492694ce0441053de57699e1e2b7bc148a69"},{"url":"https://git.kernel.org/stable/c/0f6947f5f5208f6ebd4d76a82a4757e2839a23f8"},{"url":"https://git.kernel.org/stable/c/33061d0fba51d2bf70a2ef9645f703c33fe8e438"},{"url":"https://git.kernel.org/stable/c/0090c13cbbdffd7da079ac56f80373a9a1be0bf8"},{"url":"https://git.kernel.org/stable/c/1bbf82d9f961414d6c76a08f7f843ea068e0ab7b"},{"url":"https://git.kernel.org/stable/c/92ee3c60ec9fe64404dc035e7c41277d74aa26cb"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - Reached via local ALSA PCM character-device ioctls (SNDRV_PCM_IOCTL_HW_PARAMS/HW_FREE) on /dev/snd/pcm*; not network-facing packet processing.\nAC:L - The attacker controls both sides of the race by issuing concurrent hw_params and hw_free ioctls from multiple threads on the same PCM fd; no conditions outside attacker control are required.\nPR:L - Any unprivileged local user who can open a PCM device (audio group, logind seat ACL, or equivalent) can trigger the ioctls; there are no capability checks on this path.\nUI:N - Exploitation requires only the attacker's own open and ioctl calls; no action by another user is needed.\nS:U - Impact is confined to the host kernel privilege boundary (local privilege escalation / DoS); it does not cross a VM, IOMMU, or other security authority.\nC:H - The race yields a use-after-free of the PCM DMA buffer (dma_buffer_p/dma_area), which can be reused to obtain arbitrary kernel read primitives.\nI:H - The same UAF enables heap reuse and write primitives that can hijack control flow, matching the documented privilege-escalation impact.\nA:H - Use-after-free of kernel DMA buffer structures can cause kernel oops/panic even when not fully exploited for code execution."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T08:54:39.261Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"4.14.279"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"4.19.243"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"5.4.193"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"5.10.109"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"5.15.32"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"5.16.18"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"5.17.1"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"5.18"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.8,"attackVector":"LOCAL","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","integrityImpact":"HIGH","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"id":"CVE-2022-49291","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2025-02-27T17:58:45.856077Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-416","lang":"en","type":"CWE","description":"CWE-416 Use After Free"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-02-27T18:02:29.053Z"}}]}}}