CVE-2026-89979 PUBLISHED

ALSA: pcm: Fix race between non-atomic ops and trigger-start

Assigner: Linux
Reserved: 11.09.2026 Published: 16.09.2026 Updated: 16.09.2026

In the Linux kernel, the following vulnerability has been resolved:

ALSA: pcm: Fix race between non-atomic ops and trigger-start

We protect the races of the concurrent state transitions between atomic PCM ops, but the checks between the non-atomic ops (hw_params, hw_free and prepare) and the atomic ops aren't perfect; there is a check of the conflicting PCM state at the beginning of hw_params & co, but the atomic PCM ops can be still issued during the non-atomic PCM operations. An example such scenario is that a thread A re-issues the PREPARE or HW_PARAMS for the already prepared stream, while another thread B triggers the PCM start in the middle of the prepare operation. Although this usually doesn't lead to much serious issues, it can give some inconsistency as reported by syzkaller (such as ODEBUG warning).

There are various atomic PCM ops, and basically the only problem is the PCM start as it operates from the PREPARED state. Other trigger commands (stop, etc) are for the running or the other special state, hence they are filtered as pre-condition.

This patch is for preventing the PCM trigger-start during the non- atomic operations in order to address the problems above. Fortunately, the hw_params, hw_free and prepare operations call snd_pcm_buffer_access_lock(), and this can be used for checking the concurrent operations at the PCM trigger -- which sets the runtime->buffer_accessing to a negative (if possible), so the PCM trigger just needs to check the runtime->buffer_accessing value; if it's negative, it means the concurrent non-atomic PCM ops is running.

Metrics

CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 7.8

AV:L - The race is reached only through local ALSA PCM character devices (/dev/snd/pcmCD) via concurrent open/ioctl syscalls (SNDRV_PCM_IOCTL_HW_PARAMS, HW_FREE, PREPARE versus START). There is no network or Bluetooth path into snd_pcm_pre_start(); USB-gadget snd_pcm_kernel_ioctl is a lower-severity physical path. AC:L - The attacker controls both sides by issuing PREPARE/HW_PARAMS/HW_FREE on one thread while another issues SNDRV_PCM_IOCTL_START on the same prepared PCM fd. Syzbot produced a C reproducer of the dummy hrtimer race, so success does not depend on conditions outside attacker control. PR:L - snd_pcm_open() and the PCM ioctl path perform no capability check. Any local user who can open /dev/snd/pcm* (audio group or systemd-logind uaccess on desktops and phones) can trigger the race; real root or init-namespace CAP_SYS_ADMIN is not required. UI:N - The attacker performs every step themselves—open, hw_params, prepare, start, and close—on their own PCM file descriptors and threads. No separate victim action such as mounting a filesystem or opening a malicious file is required. S:U - The dangling hrtimer and any DMA-buffer use-after-free remain inside the host kernel ALSA PCM subsystem. This is standard kernel memory corruption, not a VM escape, IOMMU/DMA boundary bypass, or other cross-authority impact. C:H - Syzbot reports ODEBUG "free active" of the dummy_hrtimer_pcm hrtimer in dummy_pcm_close, so dummy_hrtimer_callback can run after kfree. On real hardware, START during hw_free can DMA from a freed PCM buffer. Per CNA UAF guidance this enables high-impact disclosure. I:H - The freed dummy_hrtimer_pcm (or hardware DMA pages freed by hw_free/hw_params while trigger-start is running) can be reclaimed; the hrtimer callback then invokes snd_pcm_period_elapsed on attacker-controlled memory, and in-flight DMA can write freed pages, yielding write and control-flow primitives. A:H - Freeing an armed hrtimer and racing PCM start against buffer teardown dereference freed kernel memory, causing oops or panic. Syzbot reproduced the ODEBUG WARN on dummy close, and the UAF remains a system-wide crash even without a full exploit.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to b1d12144557fceed5de6e22e2c2e30a40ed37702 (excl.)
  • affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to b2edc017f94c08bdd0b046a586e43ac771a2f942 (excl.)
  • affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to b599e7f16441386754ec083fa62a549bccb02fca (excl.)
  • affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to ad29779736cfd6f5595f0cab300dd7611418e363 (excl.)
  • affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to 5abeb4f9f2023f001d693b4e5e1ebbf25e25d0eb (excl.)
  • affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to 7ad2ea7c10044b08ecf7b04376916faf12e17a99 (excl.)
  • affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to 50afadf1ea66597116eb14e73c24da7ae99b759f (excl.)
  • affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to acac7b5e07349a9d10d78873afb4b93cd1dc721f (excl.)
  • affected from 0 to 5.10.270 (excl.)
  • affected from 0 to 5.15.221 (excl.)
  • affected from 0 to 6.1.188 (excl.)
  • affected from 0 to 6.6.157 (excl.)
  • affected from 0 to 6.12.110 (excl.)
  • affected from 0 to 6.18.51 (excl.)
  • affected from 0 to 7.2.5 (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • unaffected from 5.10.270 to 5.10.* (incl.)
  • unaffected from 5.15.221 to 5.15.* (incl.)
  • unaffected from 6.1.188 to 6.1.* (incl.)
  • unaffected from 6.6.157 to 6.6.* (incl.)
  • unaffected from 6.12.110 to 6.12.* (incl.)
  • unaffected from 6.18.51 to 6.18.* (incl.)
  • unaffected from 7.2.5 to 7.2.* (incl.)
  • unaffected from 7.3-rc2 to * (incl.)

References