Unverified Commit 5ed8ff86 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!10403 Fix CVE-2024-41069

Merge Pull Request from: @ci-robot 
 
PR sync from: Zheng Yejian <zhengyejian1@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/VUBAQHBORZX3LQZ4J2IFWC3UXPKKW62J/ 
Amadeusz Sławiński (3):
  ASoC: topology: Fix references to freed memory
  ASoC: topology: Do not assign fields that are already set
  ASoC: topology: Fix route memory corruption


-- 
2.25.1
 
https://gitee.com/src-openeuler/kernel/issues/IAGELE 
 
Link:https://gitee.com/openeuler/kernel/pulls/10403

 

Reviewed-by: default avatarYe Weihua <yeweihua4@huawei.com>
Reviewed-by: default avatarXu Kuohai <xukuohai@huawei.com>
Signed-off-by: default avatarZhang Peng <zhangpeng362@huawei.com>
parents 4ad15c7f 03234700
Loading
Loading
Loading
Loading
+13 −8
Original line number Diff line number Diff line
@@ -1060,15 +1060,20 @@ static int soc_tplg_dapm_graph_elems_load(struct soc_tplg *tplg,
			break;
		}

		route->source = elem->source;
		route->sink = elem->sink;
		route->source = devm_kstrdup(tplg->dev, elem->source, GFP_KERNEL);
		route->sink = devm_kstrdup(tplg->dev, elem->sink, GFP_KERNEL);
		if (!route->source || !route->sink) {
			ret = -ENOMEM;
			break;
		}

		/* set to NULL atm for tplg users */
		route->connected = NULL;
		if (strnlen(elem->control, SNDRV_CTL_ELEM_ID_NAME_MAXLEN) == 0)
			route->control = NULL;
		else
			route->control = elem->control;
		if (strnlen(elem->control, SNDRV_CTL_ELEM_ID_NAME_MAXLEN) != 0) {
			route->control = devm_kstrdup(tplg->dev, elem->control, GFP_KERNEL);
			if (!route->control) {
				ret = -ENOMEM;
				break;
			}
		}

		/* add route dobj to dobj_list */
		route->dobj.type = SND_SOC_DOBJ_GRAPH;