]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda/via: Avoid potential array out-of-bound in add_secret_dac_path()
authorArtemii Karasev <karasev@ispras.ru>
Thu, 19 Jan 2023 08:22:59 +0000 (00:22 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2023 10:28:01 +0000 (11:28 +0100)
commit9e0504d798556d9e55df4759e27c1735e080c85a
treee6494936925a33c15ad8608cbcb5341ae6de38cd
parent392445733268a24be9d2eea6ad2b4048f77d55cf
ALSA: hda/via: Avoid potential array out-of-bound in add_secret_dac_path()

[ Upstream commit bc9a4959b0d9a00cddabf7d20cad44d64fbbd142 ]

snd_hda_get_connections() can return a negative error code.
It may lead to accessing 'conn' array at a negative index.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Artemii Karasev <karasev@ispras.ru>
Fixes: 7fc889b1d227 ("ALSA: hda - Expose secret DAC-AA connection of some VIA codecs")
Link: https://lore.kernel.org/r/20230119082259.3634-1-karasev@ispras.ru
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/pci/hda/patch_via.c