cvelo
P4 · InfoEPSS 0.2%

ALSA: pcm: Remove channel-map controls before freeing substreams

  • CVE-2026-139277
  • GHSA-mcwf-g764-pp76
  • EUVD-2026-138982

Description

Show the whole description

In the Linux kernel, the following vulnerability has been resolved: ALSA: pcm: Remove channel-map controls before freeing substreams A late HDA codec bind on an already registered card builds new PCMs before registering them. add_std_chmaps() publishes generic channel-map controls during this BUILD stage. If an earlier chmap succeeds and a later allocation fails, probe cleanup frees the BUILD PCM while the card's control device remains accessible. These generic controls are added directly by snd_pcm_add_chmap_ctls(); snd_hda_ctls_clear() only removes codec-tracked mixer controls. BUILD devices also skip dev_disconnect. snd_pcm_free_stream() then frees the substreams before free_chmap() withdraws their generic control: Late HDA codec bind / rollback Control GET on the live card ------------------------------ ---------------------------- hda_codec_driver_probe() snd_hda_codec_build_pcms() PCM is BUILD snd_hda_codec_build_controls() add_std_chmaps() publish an earlier chmap later allocation: -ENOMEM snd_hda_codec_cleanup_for_unbind() snd_hda_ctls_clear() generic chmap remains codec_release_pcms() snd_device_free() BUILD: skip dev_disconnect snd_pcm_free_stream() kfree(substream) snd_ctl_elem_read() down_read(controls_rwsem) pcm_chmap_ctl_get() walk freed substream free_chmap() snd_ctl_remove() wait for GET up_read(controls_rwsem) The control read lock cannot protect a substream already freed before control removal starts. The failure above occurs before snd_card_register(), so the PCM has not transitioned out of BUILD. Move free_chmap() before the substream free loop. Its snd_ctl_remove() withdraws the control and drains readers under controls_rwsem before any substream is released. Normal registered-device disconnect already removes the control, so the later call remains harmless on that path.

Text from the CVE.org record.

Recommendation

  • Linux

    • If you run a version from 4.4.16 to before 4.5update to 4.5 or laterMinor version change: check the release notes
    • If you run a version from 4.1.30 to before 4.2update to 4.2 or laterMinor version change: check the release notes
    • If you run a version from 3.16.39 to before 3.17update to 3.17 or laterMinor version change: check the release notes

    Some affected versions have no stated fix.

Taken from the version ranges of the CVE.org record. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.

Affected

  • Linux

    Affected versionsFixed in
    from 4.4.16 to before 4.54.5
    from 4.1.30 to before 4.24.2
    from 3.16.39 to before 3.173.17
    from 4.6.5 to before 4.7none stated
    4.7none stated
    before 4.7: not affectednone stated
    from 5.10.275 up to 5.10.*: not affectednone stated
    from 5.15.226 up to 5.15.*: not affectednone stated

    and 6 more

Product versions from the CVE.org record.

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.