Patch "ASoC: SOF: amd: Fix NULL pointer crash in acp_sof_ipc_msg_data function" has been added to the 6.3-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ASoC: SOF: amd: Fix NULL pointer crash in acp_sof_ipc_msg_data function

to the 6.3-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-sof-amd-fix-null-pointer-crash-in-acp_sof_ipc_m.patch
and it can be found in the queue-6.3 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 5cf6763c4d2a22a0e6e07fd919c84578c5687870
Author: V sujith kumar Reddy <Vsujithkumar.Reddy@xxxxxxx>
Date:   Mon May 8 12:35:08 2023 +0530

    ASoC: SOF: amd: Fix NULL pointer crash in acp_sof_ipc_msg_data function
    
    [ Upstream commit 051d71e073614a72ad423d6dacba37a7eeff274d ]
    
    Check substream and runtime variables before assigning.
    
    Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@xxxxxxx
    Link: https://lore.kernel.org/r/20230508070510.6100-1-Vsujithkumar.Reddy@xxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/soc/sof/amd/acp-ipc.c b/sound/soc/sof/amd/acp-ipc.c
index 4e0c48a361599..749e856dc6011 100644
--- a/sound/soc/sof/amd/acp-ipc.c
+++ b/sound/soc/sof/amd/acp-ipc.c
@@ -209,7 +209,12 @@ int acp_sof_ipc_msg_data(struct snd_sof_dev *sdev, struct snd_sof_pcm_stream *sp
 		acp_mailbox_read(sdev, offset, p, sz);
 	} else {
 		struct snd_pcm_substream *substream = sps->substream;
-		struct acp_dsp_stream *stream = substream->runtime->private_data;
+		struct acp_dsp_stream *stream;
+
+		if (!substream || !substream->runtime)
+			return -ESTRPIPE;
+
+		stream = substream->runtime->private_data;
 
 		if (!stream)
 			return -ESTRPIPE;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux