]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
ASoC: SOF: ipc3: Check for upper size limit for the received message
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Tue, 7 Mar 2023 11:49:17 +0000 (13:49 +0200)
committerRoxana Nicolescu <roxana.nicolescu@canonical.com>
Wed, 17 May 2023 11:33:43 +0000 (13:33 +0200)
commit97c1d81ebb852e06cfb5916dd9c2d3a143ee141f
tree02e43f8b344d07fb0b0970d8ee7e6b14d563ab23
parent397a97a8e1e626debc7dc6c661274df2959950e4
ASoC: SOF: ipc3: Check for upper size limit for the received message

BugLink: https://bugs.launchpad.net/bugs/2016878
[ Upstream commit 989a3e4479177d0f4afab8be1960731bc0ffbbd0 ]

The sof_ipc3_rx_msg() checks for minimum size of a new rx message but it is
missing the check for upper limit.
Corrupted or compromised firmware might be able to take advantage of this
to cause out of bounds reads outside of the message area.

Reported-by: Curtis Malainey <cujomalainey@chromium.org>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Curtis Malainey <curtis@malainey.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230307114917.5124-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
sound/soc/sof/ipc3.c