Skip to content

Commit

Permalink
ASoC: soc-pcm: Add NULL check in BE reparenting
Browse files Browse the repository at this point in the history
Add NULL check in dpcm_be_reparent API, to handle
kernel NULL pointer dereference error.
The issue occurred in fuzzing test.

Signed-off-by: Srinivasa 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: Mark Brown <broonie@kernel.org>
Srinivasa Rao Mandadapu authored and Mark Brown committed Nov 22, 2022

Unverified

No user is associated with the committer email.
1 parent f5f8ad3 commit db8f91d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/soc/soc-pcm.c
Original file line number Diff line number Diff line change
@@ -1247,6 +1247,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;

for_each_dpcm_fe(be, stream, dpcm) {
if (dpcm->fe == fe)

0 comments on commit db8f91d

Please sign in to comment.