]> git.itanic.dy.fi Git - linux-stable/commit
ALSA: hda: Fix Oops by 9.1 surround channel names
authorTakashi Iwai <tiwai@suse.de>
Tue, 16 May 2023 18:44:12 +0000 (20:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 May 2023 16:30:20 +0000 (17:30 +0100)
commitfcf637461019e9a5a0c12fc5c42a9db1779b0634
tree12666fd300a647d2679c6d34ff1ed0f6288b7e78
parentc7cf2cec5160092f8c04f5c650df1020d4d7a8b0
ALSA: hda: Fix Oops by 9.1 surround channel names

commit 3b44ec8c5c44790a82f07e90db45643c762878c6 upstream.

get_line_out_pfx() may trigger an Oops by overflowing the static array
with more than 8 channels.  This was reported for MacBookPro 12,1 with
Cirrus codec.

As a workaround, extend for the 9.1 channels and also fix the
potential Oops by unifying the code paths accessing the same array
with the proper size check.

Reported-by: Olliver Schinagl <oliver@schinagl.nl>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/64d95eb0-dbdb-cff8-a8b1-988dc22b24cd@schinagl.nl
Link: https://lore.kernel.org/r/20230516184412.24078-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/pci/hda/hda_generic.c