cvelo
P4 · Info

ALSA: pcm: Protect channel-map reads against runtime detach

  • CVE-2026-143435
  • EUVD-2026-145064

Summary

A race in the Linux kernel ALSA PCM subsystem lets a channel-map control read (SNDRV_CTL_IOCTL_ELEM_READ) overlap the final close of the same PCM substream. The control callback checks the substream runtime and later reads its channel count while holding only controls_rwsem, but the final close clears and frees that runtime under pcm open_mutex. The result can be a NULL pointer dereference or access to freed memory. The fix copies the channel count under open_mutex and uses that value for the map lookup, using a trylock that returns -EBUSY to avoid a lock-ordering deadlock with snd_pcm_dev_disconnect(). The record lists no CVSS score and it is not in the CISA known exploited list.

AI summary · verify against the vendor advisory

Description

Show the whole description

In the Linux kernel, the following vulnerability has been resolved: ALSA: pcm: Protect channel-map reads against runtime detach Channel-map controls remain accessible between PCM opens. In-tree HDA code publishes the generic controls through add_std_chmaps(), so a SNDRV_CTL_IOCTL_ELEM_READ can overlap the final close of the same PCM substream. pcm_chmap_ctl_get() checks substream->runtime and later reads its channel count. Final close clears and frees that runtime under pcm->open_mutex, while the control callback holds only controls_rwsem: Control GET Final PCM close ----------- --------------- snd_ctl_elem_read() down_read(controls_rwsem) pcm_chmap_ctl_get() check substream->runtime lock(pcm->open_mutex) snd_pcm_release_substream() snd_pcm_detach_substream() substream->runtime = NULL kfree(runtime) unlock(pcm->open_mutex) substream->runtime->channels NULL or freed-pointer access up_read(controls_rwsem) Reloading the cleared field can fault through NULL, while retaining the old pointer can access freed storage. controls_rwsem keeps the control alive, but does not serialize the matching PCM close. Copy the channel count under open_mutex and use that scalar for the map lookup. Use trylock with -EBUSY because snd_pcm_dev_disconnect() takes open_mutex before removing controls under controls_rwsem; blocking in the reverse order from GET could deadlock.

Text from the CVE.org record.

Recommendation

No source states a fixed version. Check the vendor advisory.

Affected

  • Linux

    Affected versionsFixed in
    3.7none stated
    before 3.7: not affectednone stated
    from 6.1.193 up to 6.1.*: not affectednone stated
    from 6.6.163 up to 6.6.*: not affectednone stated
    from 6.12.119 up to 6.12.*: not affectednone stated
    from 6.18.65 up to 6.18.*: not affectednone stated
    from 7.3.6 up to 7.3.*: not affectednone stated
    from 7.4-rc1 onwards: not affectednone stated

Product versions from the CVE.org record.

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.