Commit 63f952f4 authored by Srinivasa Rao Mandadapu's avatar Srinivasa Rao Mandadapu Committed by He Yujie
Browse files

ASoC: soc-pcm: Add NULL check in BE reparenting

stable inclusion
from stable-v4.19.269
commit e7166d6821c15f3516bcac8ae3f155924da1908c
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAYRF7
CVE: CVE-2022-48992

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e7166d6821c15f3516bcac8ae3f155924da1908c



--------------------------------

[ Upstream commit db8f91d4 ]

Add NULL check in dpcm_be_reparent API, to handle
kernel NULL pointer dereference error.
The issue occurred in fuzzing test.

Signed-off-by: default avatarSrinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Link: https://lore.kernel.org/r/1669098673-29703-1-git-send-email-quic_srivasam@quicinc.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarHe Yujie <coka.heyujie@huawei.com>
parent e833ccea
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1263,6 +1263,8 @@ static void dpcm_be_reparent(struct snd_soc_pcm_runtime *fe,
		return;

	be_substream = snd_soc_dpcm_get_substream(be, stream);
	if (!be_substream)
		return;

	list_for_each_entry(dpcm, &be->dpcm[stream].fe_clients, list_fe) {
		if (dpcm->fe == fe)