Skip to content
Medium 4.1

ALSA: jack: Remove debugfs before freeing unregistered jacks

CVE-2026-139421 First seen on SecPulse

Affected packages

PackageAffected → Fixed
LinuxLinux —
LinuxKernel
≥ 6.1.93, < 6.1.193→ 6.1.193
≥ 6.6.33, < 6.6.163→ 6.6.163
≥ 6.9.4, < 6.10→ 6.10
≥ 6.10.0, < 6.12.119→ 6.12.119
≥ 6.13.0, < 6.18.65→ 6.18.65
≥ 6.19.0, < 7.3.6→ 7.3.6

Fix status by distribution

Records published by each distribution for this CVE. Fixed versions differ by release; check each link.

Original description The description as published by the source.

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

ALSA: jack: Remove debugfs before freeing unregistered jacks

Jack debugfs files store a raw snd_jack_kctl pointer, so their
callbacks must be drained before the attachment is freed.
snd_jack_dev_free() unlinks and frees the attachments before calling
snd_jack_dev_disconnect(). Its late snd_jack_remove_debugfs() call
then has no entries left to traverse.

With CONFIG_SND_JACK_INJECTION_DEBUG and input support enabled, an
HDA codec rebind on a live card can publish a non-phantom jack's type
file while its component is still in SNDRV_DEV_BUILD. A later
jack-control allocation failure permits the following order:

  1. hda_codec_driver_probe() creates a jack and publishes its debugfs
    files before reaching snd_card_register().
  2. A later control-build failure calls
    snd_hda_codec_cleanup_for_unbind(), then snd_hda_jack_tbl_clear()
    and snd_device_free(). __snd_device_disconnect() skips BUILD
    components. snd_jack_dev_free() frees the attachment before its
    late disconnect, leaving the debugfs files published.
  3. After cleanup, a reader opens the surviving type file and
    jack_type_read() dereferences the freed attachment's jack pointer.

The card's debugfs root remains live throughout this sequence. The
result is a use-after-free even without an overlapping read. An
already admitted callback is also not drained by this cleanup.

Call snd_jack_remove_debugfs() before unlinking any cont…

Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details