]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: asihpi: Fix potential OOB array access
authorTakashi Iwai <tiwai@suse.de>
Thu, 8 Aug 2024 09:14:42 +0000 (11:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:11:28 +0000 (15:11 +0200)
commit36ee4021bcc37b834996e79740d095d6f8dd948f
tree2d4e2215a8d68163793b1af7362a92f03fa69562
parentdacec3a3248f38153b924673029c17e8bc0de228
ALSA: asihpi: Fix potential OOB array access

[ Upstream commit 7b986c7430a6bb68d523dac7bfc74cbd5b44ef96 ]

ASIHPI driver stores some values in the static array upon a response
from the driver, and its index depends on the firmware.  We shouldn't
trust it blindly.

This patch adds a sanity check of the array index to fit in the array
size.

Link: https://patch.msgid.link/20240808091454.30846-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/pci/asihpi/hpimsgx.c