alsa-lib versions 1.2.2 up to and including 1.2.15.2, prior to commit 5f7fe33, contain a heap-based buffer overflow in the topology mixer control decoder. The tplgdecodecontrolmixer1() function reads the numchannels field from untrusted .tplg data and uses it as a loop bound without validating it against the fixed-size channel array (SNDTPLGMAXCHAN). A crafted topology file with an excessive numchannels value can cause out-of-bounds heap writes, leading to a crash.
In the Linux kernel, the following vulnerability has been resolved:
ALSA: rawmidi - fix the uninitalized userpversion
The userpversion was uninitialized for the user space file structure in the open function, because the file private structure use kmalloc for the allocation.
The kernel ALSA sequencer code clears the file structure, so no additional fixes are required.
BugLink: https://github.com/alsa-project/alsa-lib/issues/178