This is a note to let you know that I've just added the patch titled ASoC: topology: Properly access value coming from topology file to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: asoc-topology-properly-access-value-coming-from-topo.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 1abc901d72b018a16a67263823602d390d8a6615 Author: Amadeusz Sławiński <amadeuszx.slawinski@xxxxxxxxxxxxxxx> Date: Sat Jan 28 00:11:01 2023 +0100 ASoC: topology: Properly access value coming from topology file [ Upstream commit c5d184c92df2b631fb81fe2ce6e96bfc5ba720e5 ] When accessing values coming from topology, le32_to_cpu should be used. One of recent commits missed that. Fixes: 86e2d14b6d1a ("ASoC: topology: Add header payload_size verification") Reviewed-by: Cezary Rojewski <cezary.rojewski@xxxxxxxxx> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@xxxxxxxxxxxxxxx> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@xxxxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20230127231111.937721-2-amadeuszx.slawinski@xxxxxxxxxxxxxxx Signed-off-by: Mark Brown <broonie@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index a79a2fb260b87..d68c48555a7e3 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -2408,7 +2408,7 @@ static int soc_valid_header(struct soc_tplg *tplg, return -EINVAL; } - if (soc_tplg_get_hdr_offset(tplg) + hdr->payload_size >= tplg->fw->size) { + if (soc_tplg_get_hdr_offset(tplg) + le32_to_cpu(hdr->payload_size) >= tplg->fw->size) { dev_err(tplg->dev, "ASoC: invalid header of type %d at offset %ld payload_size %d\n", le32_to_cpu(hdr->type), soc_tplg_get_hdr_offset(tplg),