]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: SOF: IPC3: fix message bounds on ipc ops
authorCurtis Malainey <cujomalainey@chromium.org>
Tue, 13 Feb 2024 12:38:34 +0000 (14:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 08:25:14 +0000 (09:25 +0100)
commit1be2669565b3795e2a1e2b97adb059410d8d8d53
tree32b6747ed09e2e09c55b964f7b58d8fecc827169
parent19758688bd05fd9581fd7a65d4a95f88b278dea4
ASoC: SOF: IPC3: fix message bounds on ipc ops

commit fcbe4873089c84da641df75cda9cac2e9addbb4b upstream.

commit 74ad8ed65121 ("ASoC: SOF: ipc3: Implement rx_msg IPC ops")
introduced a new allocation before the upper bounds check in
do_rx_work. As a result A DSP can cause bad allocations if spewing
garbage.

Fixes: 74ad8ed65121 ("ASoC: SOF: ipc3: Implement rx_msg IPC ops")
Reported-by: Tim Van Patten <timvp@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://msgid.link/r/20240213123834.4827-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/sof/ipc3.c