]> 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)
committerTakashi Iwai <tiwai@suse.de>
Tue, 16 May 2023 18:44:46 +0000 (20:44 +0200)
commit3b44ec8c5c44790a82f07e90db45643c762878c6
treedb1c1ad2653102fd6d8cc8126c3f0e8282ff9b58
parentcc638dba23266897c80b9bc87f33de44565fab38
ALSA: hda: Fix Oops by 9.1 surround channel names

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>
sound/pci/hda/hda_generic.c