Skip to contentSkip to conversation

CVE-2026-23089: ALSA: usb-audio: Fix use-after-free in snd_usb_mixer_free()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Feb 4

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

ALSA: usb-audio: Fix use-after-free in snd_usb_mixer_free()

When snd_usb_create_mixer() fails, snd_usb_mixer_free() frees mixer->id_elems but the controls already added to the card still reference the freed memory. Later when snd_card_register() runs, the OSS mixer layer calls their callbacks and hits a use-after-free read.

Call trace:
  get_ctl_value+0x63f/0x820 sound/usb/mixer.c:411
  get_min_max_with_quirks.isra.0+0x240/0x1f40 sound/usb/mixer.c:1241
  mixer_ctl_feature_info+0x26b/0x490 sound/usb/mixer.c:1381
  snd_mixer_oss_build_test+0x174/0x3a0 sound/core/oss/mixer_oss.c:887
  ...
  snd_card_register+0x4ed/0x6d0 sound/core/init.c:923
  usb_audio_probe+0x5ef/0x2a90 sound/usb/card.c:1025

Fix by calling snd_ctl_remove() for all mixer controls before freeing id_elems. We save the next pointer first because snd_ctl_remove() frees the current element.

The Linux kernel CVE team has assigned CVE-2026-23089 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 2.6.13 with commit 6639b6c2367f884ca172b78d69f7da17bfab2e5e and fixed in 6.6.122 with commit 7bff0156d13f0ad9436e5178b979b063d59f572a
	Issue introduced in 2.6.13 with commit 6639b6c2367f884ca172b78d69f7da17bfab2e5e and fixed in 6.12.68 with commit e6f103a22b08daf5df2f4aa158081840e5910963
	Issue introduced in 2.6.13 with commit 6639b6c2367f884ca172b78d69f7da17bfab2e5e and fixed in 6.18.8 with commit dc1a5dd80af1ee1f29d8375b12dd7625f6294dad
	Issue introduced in 2.6.13 with commit 6639b6c2367f884ca172b78d69f7da17bfab2e5e and fixed in 6.19-rc7 with commit 930e69757b74c3ae083b0c3c7419bfe7f0edc7b2

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-23089

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
sound/usb/mixer.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/7bff0156d13f0ad9436e5178b979b063d59f572a
	https://git.kernel.org/stable/c/e6f103a22b08daf5df2f4aa158081840e5910963
	https://git.kernel.org/stable/c/dc1a5dd80af1ee1f29d8375b12dd7625f6294dad
	https://git.kernel.org/stable/c/930e69757b74c3ae083b0c3c7419bfe7f0edc7b2